FCDEntityReference Class Reference
[COLLADA Document Object Model.]

A COLLADA external reference for an entity instance. More...

#include <FCDEntityReference.h>

Inheritance diagram for FCDEntityReference:

FCDObject FUTracker FUParameterizable FUTrackable FUObject List of all members.

Public Member Functions

 FCDEntityReference (FCDocument *document, FCDObjectWithId *parent)
 Constructor.
virtual ~FCDEntityReference ()
 Destructor.
FCDPlaceHolderGetPlaceHolder ()
 Retrieves the placeholder if this references an entity from an external COLLADA document.
const FCDPlaceHolderGetPlaceHolder () const
 See above.
const fm::stringGetEntityId () const
 Retrieves the COLLADA id of the entity that is externally referenced.
bool IsExternal () const
 Retrieves whether this entity reference is an external entity reference.
bool IsLocal () const
 Retrieves whether this entity reference is a local entity reference.
void SetEntityId (const fm::string &id)
 Sets the COLLADA id of the referenced entity.
FUUri GetUri () const
 Retrieves the full URI of the external reference.
void SetUri (const FUUri &uri)
 Sets the URI of the external reference.
FCDEntityGetEntity ()
 Get the entity this external reference points to.
const FCDEntityGetEntity () const
 See above.
const FCDObjectWithIdGetClosestObjectWithId () const
 Get a pointer to the entity that either directly or indirectly exclusively contains this reference.
void SetClosestObjectWithId (FCDObjectWithId *obj)
 Set the pointer to the closest entity upstream that contains this reference.
void SetEntity (FCDEntity *entity)
 Set the entity we are referencing.

Detailed Description

A COLLADA external reference for an entity instance.

FCollada only exposes external references for entity instances. Other types of external references: geometry sources, morph targets, etc. are not supported.

The entity instance for an external reference cannot be modified and tracks it, so that if is it released manually, the reference is also released.

The placeholder and the document referenced by the entity instance can be modified manually or by the entity instance.

Also allowing external links by more than just entity instances. Controllers can reference external geometry targets.

Renaming this class to FCDEntityReference, as it used for tracking ALL entities. This lightens the Code load on all classes that track entities.

TODO: The following are non-compliant on the XRefs: Animations (instance_animation) <-- TODO QUICK Morphers (base_geom && morph_targets) Emitters (force links) Emitters (object_mesh) <-- TODO LAST


Constructor & Destructor Documentation

FCDEntityReference::FCDEntityReference FCDocument document,
FCDObjectWithId parent
 

Constructor.

Parameters:
document The FCollada document that owns the reference.
baseObject The parent object.


Member Function Documentation

const FCDObjectWithId* FCDEntityReference::GetClosestObjectWithId  )  const [inline]
 

Get a pointer to the entity that either directly or indirectly exclusively contains this reference.

This is not necessarily the class that contains the actual pointer, but it is the class that is responsible for managing the link to the entity referenced (ie, not an FCDEntityInstance, but the containing FCDEntity).

Returns:
A pointer the object that uses this class to reference an entity

FCDEntity* FCDEntityReference::GetEntity  )  [inline]
 

Get the entity this external reference points to.

This may cause the entity to load if it is not present already! See the FCollada::GetDereferenceFlag() for more information.

Returns:
the entity

const fm::string& FCDEntityReference::GetEntityId  )  const [inline]
 

Retrieves the COLLADA id of the entity that is externally referenced.

Returns:
The COLLADA id of the referenced entity.

FCDPlaceHolder* FCDEntityReference::GetPlaceHolder  )  [inline]
 

Retrieves the placeholder if this references an entity from an external COLLADA document.

Returns:
The COLLADA document placeholder.

FUUri FCDEntityReference::GetUri  )  const
 

Retrieves the full URI of the external reference.

This points to the COLLADA document and the id of the referenced entity.

Returns:
The referenced entity URI.

bool FCDEntityReference::IsExternal  )  const [inline]
 

Retrieves whether this entity reference is an external entity reference.

This function intentionally hides the FCDObject::IsExternal function.

Returns:
Whether the entity reference is an external entity reference.

bool FCDEntityReference::IsLocal  )  const [inline]
 

Retrieves whether this entity reference is a local entity reference.

This function intentionally hides the FCDObject::IsLocal function.

Returns:
Whether the entity reference is a local entity reference.

void FCDEntityReference::SetClosestObjectWithId FCDObjectWithId obj  )  [inline]
 

Set the pointer to the closest entity upstream that contains this reference.

Parameters:
obj An object with Id that either directly or indirectly exclusively contains this reference

void FCDEntityReference::SetEntity FCDEntity entity  ) 
 

Set the entity we are referencing.

If this is from an external document, it will create the appropriate FCDPlaceholder etc. The new entity to reference

void FCDEntityReference::SetEntityId const fm::string id  )  [inline]
 

Sets the COLLADA id of the referenced entity.

Parameters:
id The COLLADA id of the referenced entity.

void FCDEntityReference::SetUri const FUUri uri  ) 
 

Sets the URI of the external reference.

This points to the COLLADA document and the id of the referenced entity.

Parameters:
uri The referenced entity URL.


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 16:58:38 2008 for FCollada by  doxygen 1.4.6-NO