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

pretendable_object.hpp

Go to the documentation of this file.
00001 //
00002 // See license.txt for license information.
00003 //
00004 // pretendable_object.hpp
00005 //
00006 // 17-Mar-2006  phamilton  Created
00007 //
00008 
00009 #ifndef incCOMMON_PRETENDABLE_OBJECT
00010 #define incCOMMON_PRETENDABLE_OBJECT
00011 
00012 // forwards
00013 #include <string>
00014 #include "object.hpp"
00015 
00016 namespace ph {
00017 namespace common {
00018 
00019 // forwards
00020 
00021 class pretendable_object_base
00022 /**
00023         Abstract class representing the interface for an object that can pretend to
00024         be another.
00025 */
00026 {
00027 public:
00028         virtual ~pretendable_object_base() {}
00029                 
00030         virtual bool is_any_object() = 0;
00031                 //!< Return true if this object can pretend to be any other object. In future
00032                 //! there may be some way that an object can pretend to be certain other objects.
00033                 
00034         virtual object_base *realobject() = 0;
00035                 //!< Get the real object that this object points to. This is used in iterators
00036                 //! and dereferencing the object directly. It's also so that "anyobject"
00037                 //! can work correctly.
00038 };
00039 
00040 }; // common
00041 }; // ph
00042 
00043 #endif // incCOMMON_PRETENDABLE_OBJECT

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