Base class for all Alias Data types.
#include <AlObject.h>
class AlObject : protected AlHashable
virtual ~AlObject();
virtual AlObjectType type() const = 0;
virtual const char* name() const;
virtual statusCode setName( const char* );
virtual statusCode deleteObject();
virtual AlObject* copyWrapper() const;
// Down casting methods
AlAnimatable* asAnimatablePtr();
AlClusterable* asClusterablePtr();
AlSettable* asSettablePtr();
AlPickable* asPickablePtr();
AlCamera* asCameraPtr();
AlCameraNode* asCameraNodePtr();
AlCluster* asClusterPtr();
AlClusterNode* asClusterNodePtr();
AlClusterMember* asClusterMemberPtr();
AlCurveCV* asCurveCVPtr();
AlCurve* asCurvePtr();
AlCurveNode* asCurveNodePtr();
AlCurveOnSurface* asCurveOnSurfacePtr();
AlDagNode* asDagNodePtr();
AlFace* asFacePtr();
AlFaceNode* asFaceNodePtr();
AlGroupNode* asGroupNodePtr();
AlLight* asLightPtr();
AlLightNode* asLightNodePtr();
AlAmbientLight* asAmbientLightPtr();
AlAreaLight* asAreaLightPtr();
AlDirectionLight* asDirectionLightPtr();
AlLinearLight* asLinearLightPtr();
AlNonAmbientLight* asNonAmbientLightPtr();
AlPointLight* asPointLightPtr();
AlSpotLight* asSpotLightPtr();
AlVolumeLight* asVolumeLightPtr();
AlSphereLight* asSphereLightPtr();
AlCylinderLight* asCylinderLightPtr();
AlBoxLight* asBoxLightPtr();
AlConeLight* asConeLightPtr();
AlTorusLight* asTorusLightPtr();
AlSurfaceCV* asSurfaceCVPtr();
AlSurface* asSurfacePtr();
AlSurfaceNode* asSurfaceNodePtr();
AlSet* asSetPtr();
AlSetMember* asSetMemberPtr();
AlShader* asShaderPtr();
AlTexture* asTexturePtr();
AlEnvironment* asEnvironmentPtr();
AlKeyframe* asKeyframePtr();
AlChannel* asChannelPtr();
AlAction* asActionPtr();
AlParamAction* asParamActionPtr();
AlMotionAction* asMotionActionPtr();
AlAttributes* asAttributesPtr();
AlArcAttributes* asArcAttributesPtr();
AlLineAttributes* asLineAttributesPtr();
AlCurveAttributes* asCurveAttributesPtr();
AlPlaneAttributes* asPlaneAttributesPtr();
AlConicAttributes* asConicAttributesPtr();
AlRevSurfAttributes* asRevSurfAttributesPtr();
AlJoint* asJointPtr();
AlConstraint* asConstraintPtr();
AlPointConstraint* asPointConstraintPtr();
AlOrientationConstraint* asOrientationConstraintPtr();
AlAimConstraint* asAimConstraintPtr();
AlTextureNode* asTextureNodePtr();
AlShellNode* asShellNodePtr();
AlShell* asShellPtr();
AlTrimRegion* asTrimRegionPtr();
AlTrimBoundary* asTrimBoundaryPtr();
AlTrimCurve* asTrimCurvePtr();
AlContact* asContactPtr();
AlCommandRef* asCommandRefPtr();
AlCommand* asCommandPtr();
AlLayer* asLayerPtr();
AlOrthographicCamera* asOrthographicCameraPtr();
AlPerspectiveCamera* asPerspectiveCameraPtr();
AlWindow* asWindowPtr();
AlImagePlane* asImagePlanePtr();
AlCharacterSpace* asCharacterSpacePtr();
AlCharacter* asCharacterPtr();
AlCharSnippet* asCharSnippetPtr();
AlCharTransition* asCharTransitionPtr();
AlIKHandle* asIKHandlePtr();
AlIKHandleNode* asIKHandleNodePtr();
AlLocator* asLocatorPtr();
AlAnnotationLocator* asAnnotationLocatorPtr();
AlDistanceLocator* asDistanceLocatorPtr();
AlAngleLocator* asAngleLocatorPtr();
AlRadialLocator* asRadialLocatorPtr();
AlDeviationLocator* asDeviationLocatorPtr();
AlMinmaxLocator* asMinmaxLocatorPtr();
AlPointLocator* asPointPtr();
AlSpaceLocator* asSpacePointPtr();
AlCurveLocator* asCurvePointPtr();
AlCurveOnSurfaceLocator* asCurveOnSurfacePointPtr();
AlSurfaceLocator* asSurfacePointPtr();
AlConstructionEntity* asConstructionEntityPtr();
AlConstructionVector* asConstructionVectorPtr();
AlConstructionPlane* asConstructionPlanePtr();
AlCloud* asCloudPtr();
AlBlendCurve* asBlendCurvePtr();
AlBlendPoint* asBlendPointPtr();
AlCategory* asCategoryPtr();
// Functions that operate on AlObjects that are not a part of the class:
boolean AlIsValid( const AlObject* );
boolean AlAreEqual( const AlObject*, const AlObject* );
This is an abstract base class which holds a reference to an anonymous data structure. Derived classes will initialize the reference to refer to a particular data structure. This class provides a mechanism for completely hiding the internal data structures from the user.
This class gives some homogeneity between several different classes by providing methods that derived classes will redefine so that the name and type of the object can be obtained and so that object downcasting can be done safely.
There are a group of functions (the ’downcasting’ methods) for casting an AlObject to one of its derived classes. They have the form
Al{DerivedObject} *AlObject::as{DerivedObject}Ptr()
where {DerivedObject} is the name of the derived class. In this way, safe typecasting can be maintained.
boolean AlIsValid( AlObject* obj )
Central function that checks that a given OpenModel pointer is in fact a valid object. Three checks will be done. The first is done here, and simply checks that the pointer is non-null. The other two checks are done in the isValid method, which checks that the object’s data field is valid, and finally that the object is in the currently active stage (universe).
boolean AlAreEqual( const AlObject*, const AlObject* );
Checks whether two OpenModel pointers are referencing the same Alias object. Note that the two pointers may reference different OpenModel objects, but those objects may both reference the same Alias object. Use this function instead of just checking for pointer equality.
Note: if both pointers are NULL (and equal), FALSE is returned since we are not testing valid API objects.