Public Member Functions
CSIObjectRefArray Class Reference

Detailed Description

An array of SIObjects.

See also:
SIObject
Application::FindObjects
Model::FindObjects
Since:
9.5 (2011)
Example:
        using namespace XSI;
        Application app;
        CSIObjectRefArray lights = app.FindObjects( XSI::siLightID );

        for ( LONG i=0; i< lights.GetCount(); i++ )
        {
            app.LogMessage( "Light: " +
                lights[i].GetFullName() + L":" +
                lights[i].GetFullName() );
        }

#include <xsi_siobject.h>

Inheritance diagram for CSIObjectRefArray:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CSIObjectRefArray ()
 CSIObjectRefArray (const CSIObjectRefArray &)
 ~CSIObjectRefArray ()
CSIObjectRefArrayoperator= (const CSIObjectRefArray &in_refArray)
CRef GetItem (const CString &in_name) const
void Add (const CRef &in_item)
void RemoveItem (const CString &in_name)

Constructor & Destructor Documentation

Default constructor.

Copy constructor. Performs a shallow copy, so any change to one instance will appear in any of the copies.

Default destructor.


Member Function Documentation

CSIObjectRefArray& operator= ( const CSIObjectRefArray in_refArray)

Assign a CSIObjectRefArray object to this one.

Parameters:
in_refArrayA constant CSIObjectRefArray object.
Returns:
A new reference object.
CRef GetItem ( const CString in_name) const [virtual]

Returns a CRef object matching a given name. The method returns an invalid CRef if the name doesn't match. The array doesn't handle objects with identical names, accessing multiple objects by name will always return the first one.

Parameters:
in_nameThe name of an object to retrieve.
Returns:
A new CRef object.
See also:
SIObject::GetName
CRef::IsValid

Reimplemented from CRefArray.

void Add ( const CRef in_item) [virtual]

Adds a CRef object at the end of this array. The CRef must be Valid and refer to a SIObject, otherwise it is ignored.

Parameters:
in_itemCRef object.

Reimplemented from CRefArray.

void RemoveItem ( const CString in_name)

Removes an object from the CSIObjectRefArray. The array doesn't handle objects with identical names, removing multiple objects by name will always remove the first one.

Parameters:
in_nameName of the object to remove.

The documentation for this class was generated from the following file: