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

ph::common::persistable_object_base Class Reference

#include <persistable_object.hpp>

Inheritance diagram for ph::common::persistable_object_base:

persist_test::base persist_test::c_base persist_test::bar persist_test::foo persist_test::root persist_test::c_ref persist_test::c_vector

Detailed Description

Abstract class representing the interface for an object to be persisted.

NOTE: This class is completely independant of reflection, although it is obvious that reflection combined with persistance is the perfect solution for complex objects. It is kept separate for the purposes of reusability.

Definition at line 24 of file persistable_object.hpp.

Public Member Functions

virtual ~persistable_object_base ()
virtual object_basecreate (const std::string &type, const std::string &name, persistable_object_context *context)=0
virtual object_baseget_composite_object (const std::string &name)=0
virtual bool has (const std::string &name) const =0
virtual void set (const std::string &name, const std::string &value)=0
virtual std::string get (const std::string &name) const =0
virtual bool write (object_writer *writer) const
virtual void set_file_path (const std::string &path)


Constructor & Destructor Documentation

virtual ph::common::persistable_object_base::~persistable_object_base  )  [inline, virtual]
 

Definition at line 35 of file persistable_object.hpp.


Member Function Documentation

virtual object_base* ph::common::persistable_object_base::create const std::string &  type,
const std::string &  name,
persistable_object_context context
[pure virtual]
 

Allow one object to create another. this is dependant on the way you want to build new objects, but usually it involves the Abstract Factory pattern.

Implemented in persist_test::base, and persist_test::c_base.

virtual object_base* ph::common::persistable_object_base::get_composite_object const std::string &  name  )  [pure virtual]
 

return the object if it is a composite one.

Implemented in persist_test::bar, persist_test::c_base, persist_test::foo, and persist_test::root.

virtual bool ph::common::persistable_object_base::has const std::string &  name  )  const [pure virtual]
 

Does this member name exist?

Implemented in persist_test::bar, persist_test::c_base, persist_test::foo, and persist_test::root.

virtual void ph::common::persistable_object_base::set const std::string &  name,
const std::string &  value
[pure virtual]
 

Set the value of a member in the class with a particular name.

Implemented in persist_test::bar, persist_test::c_base, persist_test::foo, and persist_test::root.

Referenced by ph::common::set_persistable_obj_name(), and ph::common::set_persistable_obj_type().

virtual std::string ph::common::persistable_object_base::get const std::string &  name  )  const [pure virtual]
 

Get the value of a member in the class with a particular name.

Implemented in persist_test::bar, persist_test::c_base, persist_test::foo, and persist_test::root.

Referenced by ph::common::get_persistable_obj_name(), and ph::common::get_persistable_obj_type().

virtual bool ph::common::persistable_object_base::write object_writer writer  )  const [inline, virtual]
 

Write out the object using the writer passed in.

Reimplemented in persist_test::bar, persist_test::foo, and persist_test::root.

Definition at line 60 of file persistable_object.hpp.

virtual void ph::common::persistable_object_base::set_file_path const std::string &  path  )  [inline, virtual]
 

This object is coming as the root object from a file. Allow it to receive the path to this file.

Definition at line 65 of file persistable_object.hpp.


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