#include <Link.h>
Inheritance diagram for LinkBase:

Public Methods | |
| bool | __eq__ (const LinkBase &other) |
| bool | __ne__ (const LinkBase &other) |
| LinkBase () | |
| Construct a LinkBase with no path or object reference (null pointer). | |
| LinkBase (const char *path) | |
| Assign an object path with no referenced object (null pointer). | |
| LinkBase (const Path &path, Object *ptr) | |
| Assign an object path and bind to a specific object. | |
| LinkBase (Object *ptr) | |
| Assign an object reference, but no path. | |
| virtual | ~LinkBase () |
| Decrements the object's reference count and destroys the object if the count reaches zero. | |
| LinkBase (const LinkBase &r) | |
| Light-weight copy with reference counting. | |
| LinkBase & | operator= (const LinkBase &r) |
| Light-weight copy with reference counting. | |
| virtual void | serialize (Archive &) |
| Serialize to or from a data archive. | |
| virtual std::string | asString () const |
| String representation. | |
| virtual std::string | typeString () const |
| Return a string representation of the type. | |
| bool | operator== (LinkBase const &p) const |
| Comparison with other simdata pointers. | |
| void | setPath (ObjectID path) |
| Assign to a specific Object ID. | |
| void | setPath (const char *path) |
| Assign to an object path string (after converting to an Object ID). | |
| void | setNone () |
| Assign to Object ID 0 (no-path). | |
| const ObjectID | getPath () const |
| Get the path's Object ID. | |
| bool | isNone () const |
| Test for 'no-path' (Object ID == 0). | |
| bool | operator== (Path const &p) const |
| Test for equality of two paths. | |
| bool | operator!= (Path const &p) const |
| Test for equality of two paths. | |
| virtual void | parseXML (const char *cdata) |
| Parse cdata from within the XML tags for this object. | |
| virtual void | convertXML () |
| Convert XML data to internal format prior to serialization. | |
| bool | __eq__ (const ReferencePointer &other) |
| bool | __ne__ (const ReferencePointer &other) |
| bool | unique () const |
| Returns true if this is the only reference to an object. | |
| void | setNull () |
| Clear pointer. | |
| bool | isNull () const |
| Test for null pointer. | |
| bool | operator! () const |
| Test for null pointer. | |
| bool | valid () const |
| Test for non-null pointer. | |
| bool | operator== (ReferencePointer const &p) const |
| Comparison with other simdata pointers. | |
| virtual Object * | __get__ () |
Protected Methods | |
| void | _load (DataArchive *archive, ObjectID path=0) |
| Create a new object instance from source data. | |
| void | _assign_safe (Object *ptr) |
| Rebind to a new object, testing for type compatibility. | |
| void | _assign_fast (Object *ptr) |
| Rebind to a new object, without testing for type compatibility. | |
| void | _release () |
| Rebind to null. | |
| virtual void | _update (Object *p) |
| Change object pointer without reference counting. | |
| Object * | _get () const |
| Get the current object pointer. | |
Protected Attributes | |
| ObjectID | _path |
| Object * | _reference |
| The actual object pointer. | |
Friends | |
| class | Ref |
This class combines the Path type with reference-counting for Object types. It should seldom be used directly. See Link<> and Ref<> for details on how to refer to Objects (and other Referenced types).
|
|
Construct a LinkBase with no path or object reference (null pointer).
|
|
|
Assign an object path with no referenced object (null pointer).
|
|
||||||||||||
|
Assign an object path and bind to a specific object.
|
|
|
Assign an object reference, but no path.
|
|
|
Decrements the object's reference count and destroys the object if the count reaches zero.
|
|
|
Light-weight copy with reference counting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rebind to a new object, without testing for type compatibility. Use this method only when you know that the pointer you are assignng from has the correct type. |
|
|
Rebind to a new object, testing for type compatibility. This method calls _update(), which is overridden in the Pointer<> class to attempt a dynamic cast to the template type and throws an exception if the cast fails. |
|
|
Get the current object pointer.
|
|
||||||||||||
|
Create a new object instance from source data.
|
|
|
Rebind to null.
|
|
|
Change object pointer without reference counting. This method is extended in the Link<> class to test for type compatibility. Reimplemented in Link< T >. |
|
|
String representation.
Reimplemented from Path. |
|
|
Convert XML data to internal format prior to serialization. This method is currently only called by the XML parser for Object classes. If another BaseType class requires this method, a call must be added to the appropriate XML handler in the parser. |
|
|
Get the path's Object ID.
|
|
|
Test for 'no-path' (Object ID == 0).
|
|
|
Test for null pointer.
|
|
|
Test for null pointer.
|
|
|
Test for equality of two paths.
|
|
|
Light-weight copy with reference counting.
|
|
|
Comparison with other simdata pointers.
|
|
|
Test for equality of two paths.
|
|
|
Comparison with other simdata pointers.
|
|
|
Parse cdata from within the XML tags for this object.
Reimplemented in SimDate, EnumLink, GeoPos, LLA, UTM, Matrix3, Quat, Real, and Vector3. |
|
|
Serialize to or from a data archive. Saves the path, and also saves the referenced object if the path is 'None'. Packing a None and Null LinkBase is an error. Reads the saved path and binds to the correct object. If the path is None, the object is unpacked from the subsequent data. Otherwise the object is created by asking the current DataArchive to instantiate an instance of the path. Reimplemented from Path. |
|
|
Assign to Object ID 0 (no-path).
|
|
|
Clear pointer.
|
|
|
Assign to an object path string (after converting to an Object ID).
|
|
|
Assign to a specific Object ID.
|
|
|
Return a string representation of the type.
Reimplemented from Path. Reimplemented in Link< T >. |
|
|
Returns true if this is the only reference to an object.
|
|
|
Test for non-null pointer.
|
|
|
|
|
|
|
|
|
The actual object pointer.
|
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:41 2003, using Doxygen 1.2.18. |