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

Public Types | |
| typedef std::vector< Link< T > > | vector |
| Convenience typedef. | |
Public Methods | |
| Link () | |
| Create a null Link. | |
| Link (const Path &path, T *ptr) | |
| Create a Link with both a path and an object. | |
| Link (const char *path) | |
| Create a Link with a path but no object (null). | |
| Link (T *t) | |
| Create a Link with an object reference, but no path. | |
| Link (const Link< T > &p) | |
| Fast copy constructor. | |
| Link (const LinkBase &p) | |
| Safe copy constructor. | |
| virtual std::string | typeString () const |
| Return a string representation of the type. | |
| T * | operator= (T *t) |
| Assign a pointer. | |
| T * | operator-> () |
| Dereference. | |
| const T * | operator-> () const |
| Const dereference. | |
| T & | operator * () |
| Dereference. | |
| const T & | operator * () const |
| Const dereference. | |
| const T * | get () const |
| Const dereference. | |
| T * | get () |
| Dereference. | |
| bool | __eq__ (const LinkBase &other) |
| bool | __eq__ (const ReferencePointer &other) |
| bool | __ne__ (const LinkBase &other) |
| bool | __ne__ (const ReferencePointer &other) |
| virtual void | serialize (Archive &) |
| Serialize to or from a data archive. | |
| virtual std::string | asString () const |
| String representation. | |
| bool | operator== (LinkBase const &p) const |
| Comparison with other simdata pointers. | |
| bool | operator== (Path const &p) const |
| Test for equality of two paths. | |
| bool | operator== (ReferencePointer 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. | |
| 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 | 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. | |
| virtual Object * | __get__ () |
Protected Methods | |
| virtual void | _update (Object *ptr) throw (ObjectTypeMismatch) |
| Internal pointer update. | |
| 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. | |
| Object * | _get () const |
| Get the current object pointer. | |
Protected Attributes | |
| ObjectID | _path |
| Object * | _reference |
| The actual object pointer. | |
Use this class for linking to other Objects in a data archive. The associated Objects will automatically be created by the archive loader as directed by the external XML data.
Once loaded, Link<> handles behaves very much like ordinary Ref<> handles. For storing and passing objects references, and for manually instantiating Objects from a data archive, you should use a Ref<> handle instead of Link<>.
|
|||||
|
Convenience typedef.
|
|
|||||||||
|
Create a null Link.
|
|
||||||||||||||||
|
Create a Link with both a path and an object.
|
|
||||||||||
|
Create a Link with a path but no object (null).
|
|
||||||||||
|
Create a Link with an object reference, but no path.
|
|
||||||||||
|
Fast copy constructor.
|
|
||||||||||
|
Safe copy constructor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
||||||||||
|
Internal pointer update. Changes the object pointer without reference counting, checking that the new object type matches the template type. Reimplemented from ReferencePointer. |
|
|
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. |
|
|||||||||
|
Dereference.
|
|
|||||||||
|
Const dereference.
|
|
|
Get the path's Object ID.
|
|
|
Test for 'no-path' (Object ID == 0).
|
|
|
Test for null pointer.
|
|
|||||||||
|
Const dereference.
|
|
|||||||||
|
Dereference.
|
|
|
Test for null pointer.
|
|
|
Test for equality of two paths.
|
|
|||||||||
|
Const dereference.
|
|
|||||||||
|
Dereference.
|
|
||||||||||
|
Assign a pointer.
|
|
|
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 LinkBase. |
|
|
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. |