Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

persist_test::c_ref Class Reference

#include <c_ref.hpp>

Inheritance diagram for persist_test::c_ref:

persist_test::c_base ph::common::ref_object_helper ph::common::composite_object_helper ph::common::composite_object_base ph::common::comparable_object_base ph::common::outerable_helper ph::common::outerable_object_base ph::common::deletable_object_base ph::common::persistable_object_base ph::common::object_base

Detailed Description

Definition at line 18 of file persist/test/c_ref.hpp.

Public Member Functions

 c_ref (ph::common::object_base *outer, const std::string &name)
const ph::common::object_baseobj () const
virtual void delete_object ()
virtual bool add (ph::common::object_base *obj, bool own)
virtual bool remove (ph::common::object_base *obj)
virtual bool singleton () const
virtual int count () const

Constructor & Destructor Documentation

persist_test::c_ref::c_ref ph::common::object_base outer,
const std::string &  name

Definition at line 26 of file persist/test/c_ref.hpp.

Member Function Documentation

const ph::common::object_base* persist_test::c_ref::obj  )  const [inline]

Definition at line 30 of file persist/test/c_ref.hpp.

References ph::common::ref_object_helper::_obj.

virtual void persist_test::c_ref::delete_object  )  [inline, virtual]

Delete the object. The default actually deletes it, so don't forget to call this guy.

Reimplemented from ph::common::deletable_object_base.

Definition at line 34 of file persist/test/c_ref.hpp.

References ph::common::ref_object_helper::helper_delete_object(), and ph::common::composite_object_base::owned().

virtual bool persist_test::c_ref::add ph::common::object_base obj,
bool  own
[inline, virtual]

Add a new object to the composite object. The client passes in their understanding of the ownership policy to make sure that it fits in with the composites ownership. If they don't match, then the object won't be added, and the client can take appropriate action.

Implements ph::common::composite_object_base.

Definition at line 38 of file persist/test/c_ref.hpp.

References ph::common::ref_object_helper::helper_add(), and ph::common::composite_object_base::owned().

virtual bool persist_test::c_ref::remove ph::common::object_base obj  )  [inline, virtual]

Remove and object from the composite. Objects which are removed are not subject to the ownership policy of the composite, since they are simply forgotten by it.

Implements ph::common::composite_object_base.

Definition at line 40 of file persist/test/c_ref.hpp.

References ph::common::ref_object_helper::helper_remove().

virtual bool persist_test::c_ref::singleton  )  const [inline, virtual]

If the composite can only hold one value (so a second add() will fail for example), then this returns true. It is used when reflecting through composites to prevent subscripts being required.

Implements ph::common::composite_object_base.

Definition at line 42 of file persist/test/c_ref.hpp.

References ph::common::ref_object_helper::helper_singleton().

virtual int persist_test::c_ref::count  )  const [inline, virtual]

Return the number of objects contained in this composite object.

Implements ph::common::composite_object_base.

Definition at line 44 of file persist/test/c_ref.hpp.

References ph::common::ref_object_helper::helper_count().

The documentation for this class was generated from the following file:
Generated on Wed Apr 5 22:03:32 2006 for cppxmlobj by  doxygen 1.4.3