oos::container_item< T, C > Class Template Reference

Base class for all container items. More...

#include <object_container.hpp>

Inherits oos::value_item< T >.

Public Types

typedef oos::object_ref< C > container_ref
 
typedef C container_type
 
typedef T value_type
 
typedef container_type::size_type size_type
 
- Public Types inherited from oos::value_item< T >
typedef T value_type
 

Public Member Functions

 container_item (const container_ref &c)
 
 container_item (const container_ref &c, const value_type &v)
 
virtual void deserialize (object_reader &deserializer)
 
virtual void serialize (object_writer &serializer) const
 
container_ref container () const
 
- Public Member Functions inherited from oos::value_item< T >
 value_item (const value_type &v)
 
value_type value () const
 
void value (const value_type &v)
 
- Public Member Functions inherited from oos::object
 object ()
 Create a new object. More...
 
virtual ~object ()
 
const char * classname () const
 Returns the classname of the object. More...
 
long id () const
 Returns the unique identifier of the object. More...
 
void id (long oid)
 Sets the id of the object. More...
 
object_storeostore () const
 Returns the object store. More...
 
template<class T >
bool set (const std::string &name, const T &val)
 
template<class T >
bool get (const std::string &name, T &val)
 
template<class T >
bool get (const std::string &name, T &val, int precision)
 
template<class T >
void modify (T &attr, const T &val)
 
void modify (char *attr, int max_size, const char *val, int size)
 
template<class T >
void modify (oos::object_ref< T > &attr, const oos::object_ptr< T > &val)
 
void modify (varchar_base &attr, const std::string &val)
 
void modify (varchar_base &attr, const varchar_base &val)
 

Additional Inherited Members

- Protected Member Functions inherited from oos::object
object_proxy * proxy () const
 Returns the object_proxy of the object. More...
 
void mark_modified ()
 Marks this object as modified in its object_store. More...
 

Detailed Description

template<class T, class C>
class oos::container_item< T, C >

Base class for all container items.

Template Parameters
TType of the container item
CType of the container The class is the base class for all container item classes. It holds the item and a reference to the container to which the item belongs.

Member Typedef Documentation

template<class T , class C >
typedef oos::object_ref<C> oos::container_item< T, C >::container_ref

Shortcut for the container ref type.

template<class T , class C >
typedef C oos::container_item< T, C >::container_type

Shortcut for the container type.

template<class T , class C >
typedef container_type::size_type oos::container_item< T, C >::size_type

Shortcut for the size type.

template<class T , class C >
typedef T oos::container_item< T, C >::value_type

Shortcut for the value type.

Constructor & Destructor Documentation

template<class T , class C >
oos::container_item< T, C >::container_item ( const container_ref c)
inlineexplicit

Creates a container_item with a given reference to its container.

Parameters
cThe container reference to set.
template<class T , class C >
oos::container_item< T, C >::container_item ( const container_ref c,
const value_type v 
)
inline

Creates a container_item with a given reference to its container and a value.

Parameters
cThe container reference to set.
vThe value of the container_item

Member Function Documentation

template<class T , class C >
container_ref oos::container_item< T, C >::container ( ) const
inline

Return a reference to the container

Returns
A reference to the container
template<class T , class C >
virtual void oos::container_item< T, C >::deserialize ( object_reader deserializer)
inlinevirtual

Deserializes an object from the given object_atomizer object.

Parameters
deserializerThe object_atomizer to deserialize from.

Reimplemented from oos::value_item< T >.

template<class T , class C >
virtual void oos::container_item< T, C >::serialize ( object_writer serializer) const
inlinevirtual

Serializes an object to the given object_atomizer object.

Parameters
serializerThe object_atomizer to serialize to.

Reimplemented from oos::value_item< T >.


The documentation for this class was generated from the following file:
  • object/object_container.hpp