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

generic_context.hpp

Go to the documentation of this file.
00001 // See license.txt for license information.
00002 //
00003 // generic_context.hpp
00004 //
00005 // 2-Nov-2005  phamilton  Created
00006 //
00007 
00008 #ifndef incGENERIC_CONTEXT
00009 #define incGENERIC_CONTEXT
00010 
00011 // forwards
00012 #include "../xmlobj_context.hpp"
00013 
00014 namespace ph {
00015 namespace xmlobj {
00016 namespace generic {
00017 
00018 class XMLOBJ_DECL generic_context : public xmlobj_context
00019 /**
00020         Concrete subclass of xmlobj_context which allows create to return
00021         a generic object.
00022         
00023         This needs to be subclassed so that all other objects can be registered.
00024         
00025         You can use this class as a direct replacement for "xmlobj_context", 
00026         and when you do, you can create new objects that are not registered
00027         as part of your XML object. Sort of like a generic DOM.
00028 */
00029 {
00030 public:
00031         generic_context(reflect::object_navigator_factory *navfactory) :
00032                 xmlobj_context(navfactory)
00033                         {};
00034         
00035         // xmlobj_context overrides
00036         virtual bool register_objects() 
00037                 { return true; }
00038                 
00039         // persist::persistable_object_context overrides
00040         virtual ph::common::object_base *create(
00041                 const std::string &type, const std::string &name);
00042 };
00043 
00044 }; // generic
00045 }; // xmlobj
00046 }; // ph
00047 
00048 #endif // incGENERIC_CONTEXT

Generated on Wed Apr 5 22:03:24 2006 for cppxmlobj by  doxygen 1.4.3