Moving ValueCloneAllocator to Values.h to address forward declared template argument issue.

release/4.3a0
Nathan Michael 2014-07-04 10:18:43 -04:00 committed by cbeall3
parent c8c25b16ab
commit a84ba5c677
2 changed files with 8 additions and 10 deletions

View File

@ -33,15 +33,6 @@
namespace gtsam {
/* ************************************************************************* */
class GTSAM_EXPORT ValueCloneAllocator {
public:
static Value* allocate_clone(const Value& a) { return a.clone_(); }
static void deallocate_clone(const Value* a) { a->deallocate_(); }
private:
ValueCloneAllocator() {}
};
/* ************************************************************************* */
template<class ValueType>
struct _ValuesKeyValuePair {

View File

@ -52,10 +52,17 @@ namespace gtsam {
// Forward declarations / utilities
class VectorValues;
class ValueCloneAllocator;
class ValueAutomaticCasting;
template<typename T> static bool _truePredicate(const T&) { return true; }
/* ************************************************************************* */
class GTSAM_EXPORT ValueCloneAllocator {
public:
static Value* allocate_clone(const Value& a) { return a.clone_(); }
static void deallocate_clone(const Value* a) { a->deallocate_(); }
ValueCloneAllocator() {}
};
/**
* A non-templated config holding any types of Manifold-group elements. A
* values structure is a map from keys to values. It is used to specify the