cartobase  5.0.5
object.h File Reference
#include <cartobase/config/cartobase_config.h>
#include <cartobase/type/types.h>
#include <cartobase/type/conversion.h>
#include <cartobase/type/string_conversion.h>
#include <cartobase/smart/rcptr.h>
#include <cartobase/exception/format.h>
#include <stdexcept>
#include <string>
#include <set>
#include <vector>
#include <list>
#include <typeinfo>
#include <cartobase/object/syntax.h>
Include dependency graph for object.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  carto::TypedObject< T >
 storage wrapper, derived but still abstract template class More...
 
class  carto::Interface
 
class  carto::ScalarInterface
 All scalar numbers implement the ScalarInterface (all ints, float, double...) More...
 
class  carto::StringInterface
 Objects whose value may be represented as a character string. More...
 
class  carto::SizeInterface
 All container objects inherit the SizeInterface. More...
 
class  carto::IterableInterface
 Container objects which can be iterated. More...
 
class  carto::IteratorInterface
 An iterator object is a reference to another object. More...
 
class  carto::KeyIteratorInterface
 Specialized IteratorInterface for key/value storage. More...
 
class  carto::DictionaryIteratorInterface
 Specialized IteratorInterface for dictionaries. More...
 
class  carto::IntKeyIteratorInterface
 Specialized IteratorInterface for dictionaries. More...
 
class  carto::ArrayInterface
 ArrayInterface represents any container whose elements can be accessed via an integer index. More...
 
class  carto::DynArrayInterface
 A dynamic array has resize and insertion capabilities (like a STL vector) More...
 
class  carto::DictionaryInterface
 Interface for dictionary-like objects. More...
 
class  carto::SyntaxedInterface
 A Syntaxed object is an object containing an additional character string giving it a kind of type (a syntactic attribute). More...
 
class  carto::NoneInterface
 Specialized NoneInterface for empty objects (null, None). More...
 
class  carto::GenericObject
 base abstract generic object class. More...
 
class  carto::Object
 
class  carto::TypedObject< T >
 storage wrapper, derived but still abstract template class More...
 
struct  carto::GenericObjectTypeDeclared< T >
 Class to force a compilation error when a generic object. More...
 
class  carto::TypedObject< const T >
 
class  carto::ValueObject< T >
 storage wrapper, derived and instanciable template class More...
 
class  carto::ReferenceObject< T >
 storage wrapper, derived and instanciable template class More...
 
class  carto::PointerObject< T >
 
struct  carto::GenericObjectTypeDeclared< Object >
 
struct  carto::GenericObjectTypeDeclared< GenericObject >
 
class  carto::DataTypeCode< ValueObject< T > >
 
class  carto::DataTypeCode< ReferenceObject< T > >
 

Namespaces

 carto
 

Macros

#define DECLARE_GENERIC_OBJECT_TYPE(T)
 
#define _TMP_   std::map< std::string, int >
 
#define _TMP_   std::map< std::string, unsigned >
 
#define _TMP_   std::map< std::string, char >
 
#define _TMP_   std::map< std::string, signed char >
 
#define _TMP_   std::map< std::string, unsigned char >
 
#define _TMP_   std::map< std::string, short >
 
#define _TMP_   std::map< std::string, unsigned short >
 
#define _TMP_   std::map< std::string, long >
 
#define _TMP_   std::map< std::string, unsigned long >
 
#define _TMP_   std::map< std::string, long long >
 
#define _TMP_   std::map< std::string, unsigned long long >
 
#define _TMP_   std::map< std::string, float >
 
#define _TMP_   std::map< std::string, double >
 
#define _TMP_   std::map< std::string, bool >
 
#define _TMP_   std::map< std::string, std::string >
 
#define _TMP_   std::map< std::string, Object >
 
#define TMP   std::map< int, Object >
 
#define TMP   std::map< float, Object >
 
#define TMP   std::map< Object, Object >
 
#define _TMP_   std::map< std::string, std::vector<int> >
 
#define _TMP_   std::map< std::string, std::vector<unsigned> >
 
#define _TMP_   std::map< std::string, std::vector<char> >
 
#define _TMP_   std::map< std::string, std::vector<signed char> >
 
#define _TMP_   std::map< std::string, std::vector<unsigned char> >
 
#define _TMP_   std::map< std::string, std::vector<short> >
 
#define _TMP_   std::map< std::string, std::vector<unsigned short> >
 
#define _TMP_   std::map< std::string, std::vector<long> >
 
#define _TMP_   std::map< std::string, std::vector<unsigned long> >
 
#define _TMP_   std::map< std::string, std::vector<long long> >
 
#define _TMP_   std::map< std::string, std::vector<unsigned long long> >
 
#define _TMP_   std::map< std::string, std::vector<float> >
 
#define _TMP_   std::map< std::string, std::vector<double> >
 
#define _TMP_   std::map< std::string, std::vector<std::string> >
 
#define _TMP_   std::map< std::string, std::vector<Object> >
 
#define _TMP_   rc_ptr< std::map< std::string, int > >
 
#define _TMP_   rc_ptr< std::map< std::string, unsigned > >
 
#define _TMP_   rc_ptr< std::map< std::string, char > >
 
#define _TMP_   rc_ptr< std::map< std::string, signed char > >
 
#define _TMP_   rc_ptr< std::map< std::string, unsigned char > >
 
#define _TMP_   rc_ptr< std::map< std::string, short > >
 
#define _TMP_   rc_ptr< std::map< std::string, unsigned short > >
 
#define _TMP_   rc_ptr< std::map< std::string, long > >
 
#define _TMP_   rc_ptr< std::map< std::string, unsigned long > >
 
#define _TMP_   rc_ptr< std::map< std::string, long long > >
 
#define _TMP_   rc_ptr< std::map< std::string, unsigned long long > >
 
#define _TMP_   rc_ptr< std::map< std::string, float > >
 
#define _TMP_   rc_ptr< std::map< std::string, double > >
 
#define _TMP_   rc_ptr< std::map< std::string, bool > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::string > >
 
#define _TMP_   rc_ptr< std::map< std::string, Object > >
 
#define _TMP_   rc_ptr< std::map< int, Object > >
 
#define _TMP_   rc_ptr< std::map< float, Object > >
 
#define TMP   rc_ptr< std::map< Object, Object > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<int> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<char> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<signed char> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned char> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<short> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned short> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<long> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned long> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<long long> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned long long> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<float> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<double> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<std::string> > >
 
#define _TMP_   rc_ptr< std::map< std::string, std::vector<Object> > >
 

Typedefs

typedef std::map< std::string, Object > carto::Dictionary
 Common type used for DictionaryInterface implementation. More...
 
typedef std::map< int, Object > carto::IntDictionary
 
typedef std::map< Object, Object > carto::ObjectDictionary
 
typedef std::vector< Object > carto::ObjectVector
 Common type used for ArrayInterface implementation. More...
 

Functions

Object carto::none ()
 An empty singleton object (holds a null pointer) More...
 
template<typename T >
void carto::object_to (Object o, T &r)
 
template<typename T >
void carto::object_to (Object, const T &)
 
template<>
void carto::object_to (Object o, bool &r)
 
template<>
void carto::object_to (Object o, unsigned char &r)
 
template<>
void carto::object_to (Object o, signed char &r)
 
template<>
void carto::object_to (Object o, char &r)
 
template<>
void carto::object_to (Object o, unsigned short &r)
 
template<>
void carto::object_to (Object o, short &r)
 
template<>
void carto::object_to (Object o, unsigned &r)
 
template<>
void carto::object_to (Object o, int &r)
 
template<>
void carto::object_to (Object o, float &r)
 
template<>
void carto::object_to (Object o, double &r)
 
template<>
void carto::object_to (Object o, std::string &r)
 
template<>
void carto::object_to (Object o, Object &r)
 

Macro Definition Documentation

◆ _TMP_ [1/64]

#define _TMP_   std::map< std::string, int >

Definition at line 1261 of file object.h.

Referenced by carto::GenericObjectTypeDeclared< GenericObject >::check().

◆ _TMP_ [2/64]

#define _TMP_   std::map< std::string, unsigned >

Definition at line 1261 of file object.h.

◆ _TMP_ [3/64]

#define _TMP_   std::map< std::string, char >

Definition at line 1261 of file object.h.

◆ _TMP_ [4/64]

#define _TMP_   std::map< std::string, signed char >

Definition at line 1261 of file object.h.

◆ _TMP_ [5/64]

#define _TMP_   std::map< std::string, unsigned char >

Definition at line 1261 of file object.h.

◆ _TMP_ [6/64]

#define _TMP_   std::map< std::string, short >

Definition at line 1261 of file object.h.

◆ _TMP_ [7/64]

#define _TMP_   std::map< std::string, unsigned short >

Definition at line 1261 of file object.h.

◆ _TMP_ [8/64]

#define _TMP_   std::map< std::string, long >

Definition at line 1261 of file object.h.

◆ _TMP_ [9/64]

#define _TMP_   std::map< std::string, unsigned long >

Definition at line 1261 of file object.h.

◆ _TMP_ [10/64]

#define _TMP_   std::map< std::string, long long >

Definition at line 1261 of file object.h.

◆ _TMP_ [11/64]

#define _TMP_   std::map< std::string, unsigned long long >

Definition at line 1261 of file object.h.

◆ _TMP_ [12/64]

#define _TMP_   std::map< std::string, float >

Definition at line 1261 of file object.h.

◆ _TMP_ [13/64]

#define _TMP_   std::map< std::string, double >

Definition at line 1261 of file object.h.

◆ _TMP_ [14/64]

#define _TMP_   std::map< std::string, bool >

Definition at line 1261 of file object.h.

◆ _TMP_ [15/64]

#define _TMP_   std::map< std::string, std::string >

Definition at line 1261 of file object.h.

◆ _TMP_ [16/64]

#define _TMP_   std::map< std::string, Object >

Definition at line 1261 of file object.h.

◆ _TMP_ [17/64]

#define _TMP_   std::map< std::string, std::vector<int> >

Definition at line 1261 of file object.h.

◆ _TMP_ [18/64]

#define _TMP_   std::map< std::string, std::vector<unsigned> >

Definition at line 1261 of file object.h.

◆ _TMP_ [19/64]

#define _TMP_   std::map< std::string, std::vector<char> >

Definition at line 1261 of file object.h.

◆ _TMP_ [20/64]

#define _TMP_   std::map< std::string, std::vector<signed char> >

Definition at line 1261 of file object.h.

◆ _TMP_ [21/64]

#define _TMP_   std::map< std::string, std::vector<unsigned char> >

Definition at line 1261 of file object.h.

◆ _TMP_ [22/64]

#define _TMP_   std::map< std::string, std::vector<short> >

Definition at line 1261 of file object.h.

◆ _TMP_ [23/64]

#define _TMP_   std::map< std::string, std::vector<unsigned short> >

Definition at line 1261 of file object.h.

◆ _TMP_ [24/64]

#define _TMP_   std::map< std::string, std::vector<long> >

Definition at line 1261 of file object.h.

◆ _TMP_ [25/64]

#define _TMP_   std::map< std::string, std::vector<unsigned long> >

Definition at line 1261 of file object.h.

◆ _TMP_ [26/64]

#define _TMP_   std::map< std::string, std::vector<long long> >

Definition at line 1261 of file object.h.

◆ _TMP_ [27/64]

#define _TMP_   std::map< std::string, std::vector<unsigned long long> >

Definition at line 1261 of file object.h.

◆ _TMP_ [28/64]

#define _TMP_   std::map< std::string, std::vector<float> >

Definition at line 1261 of file object.h.

◆ _TMP_ [29/64]

#define _TMP_   std::map< std::string, std::vector<double> >

Definition at line 1261 of file object.h.

◆ _TMP_ [30/64]

#define _TMP_   std::map< std::string, std::vector<std::string> >

Definition at line 1261 of file object.h.

◆ _TMP_ [31/64]

#define _TMP_   std::map< std::string, std::vector<Object> >

Definition at line 1261 of file object.h.

◆ _TMP_ [32/64]

#define _TMP_   rc_ptr< std::map< std::string, int > >

Definition at line 1261 of file object.h.

◆ _TMP_ [33/64]

#define _TMP_   rc_ptr< std::map< std::string, unsigned > >

Definition at line 1261 of file object.h.

◆ _TMP_ [34/64]

#define _TMP_   rc_ptr< std::map< std::string, char > >

Definition at line 1261 of file object.h.

◆ _TMP_ [35/64]

#define _TMP_   rc_ptr< std::map< std::string, signed char > >

Definition at line 1261 of file object.h.

◆ _TMP_ [36/64]

#define _TMP_   rc_ptr< std::map< std::string, unsigned char > >

Definition at line 1261 of file object.h.

◆ _TMP_ [37/64]

#define _TMP_   rc_ptr< std::map< std::string, short > >

Definition at line 1261 of file object.h.

◆ _TMP_ [38/64]

#define _TMP_   rc_ptr< std::map< std::string, unsigned short > >

Definition at line 1261 of file object.h.

◆ _TMP_ [39/64]

#define _TMP_   rc_ptr< std::map< std::string, long > >

Definition at line 1261 of file object.h.

◆ _TMP_ [40/64]

#define _TMP_   rc_ptr< std::map< std::string, unsigned long > >

Definition at line 1261 of file object.h.

◆ _TMP_ [41/64]

#define _TMP_   rc_ptr< std::map< std::string, long long > >

Definition at line 1261 of file object.h.

◆ _TMP_ [42/64]

#define _TMP_   rc_ptr< std::map< std::string, unsigned long long > >

Definition at line 1261 of file object.h.

◆ _TMP_ [43/64]

#define _TMP_   rc_ptr< std::map< std::string, float > >

Definition at line 1261 of file object.h.

◆ _TMP_ [44/64]

#define _TMP_   rc_ptr< std::map< std::string, double > >

Definition at line 1261 of file object.h.

◆ _TMP_ [45/64]

#define _TMP_   rc_ptr< std::map< std::string, bool > >

Definition at line 1261 of file object.h.

◆ _TMP_ [46/64]

#define _TMP_   rc_ptr< std::map< std::string, std::string > >

Definition at line 1261 of file object.h.

◆ _TMP_ [47/64]

#define _TMP_   rc_ptr< std::map< std::string, Object > >

Definition at line 1261 of file object.h.

◆ _TMP_ [48/64]

#define _TMP_   rc_ptr< std::map< int, Object > >

Definition at line 1261 of file object.h.

◆ _TMP_ [49/64]

#define _TMP_   rc_ptr< std::map< float, Object > >

Definition at line 1261 of file object.h.

◆ _TMP_ [50/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<int> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [51/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [52/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<char> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [53/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<signed char> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [54/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned char> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [55/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<short> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [56/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned short> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [57/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<long> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [58/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned long> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [59/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<long long> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [60/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<unsigned long long> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [61/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<float> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [62/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<double> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [63/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<std::string> > >

Definition at line 1261 of file object.h.

◆ _TMP_ [64/64]

#define _TMP_   rc_ptr< std::map< std::string, std::vector<Object> > >

Definition at line 1261 of file object.h.

◆ DECLARE_GENERIC_OBJECT_TYPE

#define DECLARE_GENERIC_OBJECT_TYPE (   T)
Value:
template <> \
struct GenericObjectTypeDeclared< T > \
{ \
static inline void check() {} \
}; \
template <> \
void DictionaryInterface::setProperty( const std::string &key, \
T const &value ); \
template <> \
bool DictionaryInterface::getProperty( const std::string &key, T &value ) const; \
extern template class TypedObject< T >; \
extern template class ValueObject< T >; \
extern template class ReferenceObject< T >; \
extern template class PointerObject< T >; \
extern template \
T const &GenericObject::value< T >() const; \
extern template \
T &GenericObject::value< T >(); \
extern template \
bool GenericObject::value( T &dest ) const; \
extern template \
void GenericObject::setValue( T const & x ); \
extern template bool DictionaryInterface:: \
getProperty( const std::string &, T & ) const; \
extern template void DictionaryInterface:: \
setProperty( const std::string &, T const & ); \

Definition at line 56 of file object.h.

Referenced by carto::GenericObjectTypeDeclared< GenericObject >::check(), carto::DataTypeCode< PropertySet >::name(), and carto::internal::SyntaxedInterfaceType< T >::setSyntax().

◆ TMP [1/4]

#define TMP   std::map< int, Object >

Definition at line 1215 of file object.h.

Referenced by carto::GenericObjectTypeDeclared< GenericObject >::check().

◆ TMP [2/4]

#define TMP   std::map< float, Object >

Definition at line 1215 of file object.h.

◆ TMP [3/4]

#define TMP   std::map< Object, Object >

Definition at line 1215 of file object.h.

◆ TMP [4/4]

#define TMP   rc_ptr< std::map< Object, Object > >

Definition at line 1215 of file object.h.