Commit Graph

1 Commits

Author SHA1 Message Date
lmat
8a7f426f3b Implement KvpValue in c++ using boost::variant
KvpValue is now instantiated as a boost::variant and passed around as an opaque
pointer in C. The C interface is basically unchanged and a c++ interface exists
in kvp-value.hpp

The c++ implementation for KvpValue is called KvpValueImpl and is in kvp-value.cpp.
We don't use structured exception handling at this point, so c++ functions are
marked 'noexcept'.

The logic is within the c++ implementations. C wrapper functions do little besides
ensure that the pointer is not nullptr before calling into c++.
The logic in kvp_value_glist_to_string was moved to the c++ class. It's an
implementation detail, but unfortunately, it was being exposed through a pointer,
so I had to modify the test just a bit to not use it directly.

In order to work around what seems to be a bug in an Apple compiler, it was decided
to create an header file private to kvp-value and kvp_frame that holds the definition
of KvpFrame so that it was visible to both translation units.
2014-10-07 09:43:14 -07:00