This object represents a collection of commands.
The collection retrieved from Application::GetCommands contains the entire list of all the custom and built-in commands in the system. CommandArray::Filter can be used to reduce the list according to command categories. You can access a command by name via CommandArray::GetItem.
#include <xsi_command.h>
Public Member Functions | |
CommandArray () | |
~CommandArray () | |
CommandArray (const CRef &in_ref) | |
CommandArray (const CommandArray &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
CommandArray & | operator= (const CommandArray &in_obj) |
CommandArray & | operator= (const CRef &in_ref) |
Command | GetItem (LONG in_index) const |
Command | GetItem (const CString &in_name) const |
Command | operator[] (LONG in_index) |
const Command | operator[] (LONG in_index) const |
LONG | GetCount () const |
CommandArray | Filter (CStringArray &in_keywords) const |
CommandArray | Filter (CString &in_keyword) const |
CommandArray | ( | ) |
Default constructor.
~CommandArray | ( | ) |
Default destructor.
CommandArray | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
CommandArray | ( | const CommandArray & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from CBase.
siClassID GetClassID | ( | ) | const [virtual] |
CommandArray& operator= | ( | const CommandArray & | in_obj | ) |
Creates an object from another object.
in_obj | constant class object. |
CommandArray& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Command GetItem | ( | LONG | in_index | ) | const |
Returns a Command object based on its name.
in_name | The name of the command, which is the user-friendly version of the command name (SIObject::GetName), not the scripting name (Command::GetScriptingName) of the command. |
Command operator[] | ( | LONG | in_index | ) |
const Command operator[] | ( | LONG | in_index | ) | const |
Accessor to elements at a given index. This function can only be called by constant objects, the returned value is read-only.
in_index | constant Command object |
LONG GetCount | ( | ) | const |
CommandArray Filter | ( | CStringArray & | in_keywords | ) | const |
Returns a new instance of the command array containing only elements that match the specified categories. See SIObject::GetCategories.
Custom
keyword. in_keywords | Keywords to match |
CommandArray Filter | ( | CString & | in_keyword | ) | const |
Convenience version of CommandArray::Filter() for the case when only a single keyword is being specified.
in_keyword | Keyword to match |