Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cargo::FromKVStoreVisitorBase< RecursiveVisitor > Class Template Reference

Base class for KVStore visitors. More...

#include <from-kvstore-visitor-base.hpp>

Classes

class  GetTupleVisitor
 

Public Member Functions

FromKVStoreVisitorBaseoperator= (const FromKVStoreVisitorBase &)=delete
 
template<typename T >
void visit (const std::string &name, T &value)
 

Protected Member Functions

template<typename T >
void visitImpl (const std::string &name, T &value)
 
 FromKVStoreVisitorBase (KVStore &store, const std::string &prefix)
 
 FromKVStoreVisitorBase (const FromKVStoreVisitorBase &visitor, const std::string &prefix)
 

Protected Attributes

KVStoremStore
 
std::string mKeyPrefix
 

Private Member Functions

template<typename T , typename std::enable_if< isStreamableIn< T >::value, int >::type = 0>
void getInternal (const std::string &name, T &value)
 
template<typename T , typename std::enable_if< isVisitable< T >::value, int >::type = 0>
void getInternal (const std::string &name, T &value)
 
template<typename T , typename std::enable_if< std::is_enum< T >::value, int >::type = 0>
void getInternal (const std::string &name, T &value)
 
template<typename T >
void getInternal (const std::string &name, std::vector< T > &values)
 
template<typename T , size_t N>
void getInternal (const std::string &name, std::array< T, N > &values)
 
template<typename V >
void getInternal (const std::string &name, std::map< std::string, V > &values)
 
template<typename T , typename std::enable_if< isLikeTuple< T >::value, int >::type = 0>
void getInternal (const std::string &name, T &values)
 

Detailed Description

template<typename RecursiveVisitor>
class cargo::FromKVStoreVisitorBase< RecursiveVisitor >

Base class for KVStore visitors.

A curiously recurring template pattern example. This base-class provides a set of recursively called function templates. A child class can modify the base class behaviour in certain cases by defining:

  • a set of functions that match those cases
  • a template function that match any other case and calls the base class function

Constructor & Destructor Documentation

template<typename RecursiveVisitor>
cargo::FromKVStoreVisitorBase< RecursiveVisitor >::FromKVStoreVisitorBase ( KVStore store,
const std::string &  prefix 
)
inlineprotected
template<typename RecursiveVisitor>
cargo::FromKVStoreVisitorBase< RecursiveVisitor >::FromKVStoreVisitorBase ( const FromKVStoreVisitorBase< RecursiveVisitor > &  visitor,
const std::string &  prefix 
)
inlineprotected

Member Function Documentation

template<typename RecursiveVisitor>
template<typename T , typename std::enable_if< isStreamableIn< T >::value, int >::type = 0>
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::getInternal ( const std::string &  name,
T &  value 
)
inlineprivate
template<typename RecursiveVisitor>
template<typename T , typename std::enable_if< isVisitable< T >::value, int >::type = 0>
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::getInternal ( const std::string &  name,
T &  value 
)
inlineprivate
template<typename RecursiveVisitor>
template<typename T , typename std::enable_if< std::is_enum< T >::value, int >::type = 0>
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::getInternal ( const std::string &  name,
T &  value 
)
inlineprivate
template<typename RecursiveVisitor>
template<typename T >
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::getInternal ( const std::string &  name,
std::vector< T > &  values 
)
inlineprivate
template<typename RecursiveVisitor>
template<typename T , size_t N>
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::getInternal ( const std::string &  name,
std::array< T, N > &  values 
)
inlineprivate
template<typename RecursiveVisitor>
template<typename V >
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::getInternal ( const std::string &  name,
std::map< std::string, V > &  values 
)
inlineprivate
template<typename RecursiveVisitor>
template<typename T , typename std::enable_if< isLikeTuple< T >::value, int >::type = 0>
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::getInternal ( const std::string &  name,
T &  values 
)
inlineprivate
template<typename RecursiveVisitor>
FromKVStoreVisitorBase& cargo::FromKVStoreVisitorBase< RecursiveVisitor >::operator= ( const FromKVStoreVisitorBase< RecursiveVisitor > &  )
delete
template<typename RecursiveVisitor>
template<typename T >
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::visit ( const std::string &  name,
T &  value 
)
inline
template<typename RecursiveVisitor>
template<typename T >
void cargo::FromKVStoreVisitorBase< RecursiveVisitor >::visitImpl ( const std::string &  name,
T &  value 
)
inlineprotected

Member Data Documentation

template<typename RecursiveVisitor>
std::string cargo::FromKVStoreVisitorBase< RecursiveVisitor >::mKeyPrefix
protected
template<typename RecursiveVisitor>
KVStore& cargo::FromKVStoreVisitorBase< RecursiveVisitor >::mStore
protected

The documentation for this class was generated from the following file: