TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
iConsole Struct Referenceabstract
Inheritance diagram for iConsole:
iUnknown

Detailed Description

Console interface.

Public Member Functions

virtual tConsoleSinkLstGetSinkList () const =0
 Get the console sink list. {Property}. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Namespaces

virtual void AddNamespace (const achar *aszNamespace)=0
 Add a namespace. More...
 
virtual tBool RemoveNamespace (const achar *aszNamespace)=0
 Remove a namespace. Delete all sinks, commands and variables in the namespace. More...
 

Variables

virtual tBool AddVariable (const achar *aszName, const achar *aszValue=NULL)=0
 Add a new string variable. More...
 
virtual tBool RemoveVariable (const achar *aszName)=0
 Remove a variable. More...
 
virtual tBool SetVariable (const achar *aszName, const achar *aszValue)=0
 Set the string value of a variable. More...
 
virtual cString GetVariable (const achar *aszName)=0
 Get the string value of a variable. More...
 

Commands

virtual tBool CommandExists (const achar *aszName)=0
 Return eTrue if the given command exists. More...
 
virtual tBool AddCommand (iCommandSink *pCmd)=0
 Add a command in the console. More...
 
virtual tBool RemoveCommand (const achar *aszName)=0
 Remove a command of the console. More...
 
virtual cString GetCommandDescription (const achar *aszCommand) const =0
 Get the description of a command. More...
 
virtual tBool RunCommand (const achar *aszCommand)=0
 Run a command. More...
 
virtual cString CompleteCommandLine (const achar *aaszCmd, tBool abNext=eTrue)=0
 Complete the given command line. More...
 
virtual tU32 GetNumCommands () const =0
 Get the number of commands in the queue. More...
 
virtual tBool PushCommand (const achar *aszCommand)=0
 Queue a command to be run later on. More...
 
virtual cString PopCommand ()=0
 Pop a command from the queue. More...
 
virtual tU32 PopAndRunAllCommands ()=0
 Pop and run all commands in the queue. More...
 

Member Function Documentation

virtual tConsoleSinkLst* GetSinkList ( ) const
pure virtual

Get the console sink list. {Property}.

virtual void AddNamespace ( const achar aszNamespace)
pure virtual

Add a namespace.

Remarks
if the namespace already exists add a reference to it.
virtual tBool RemoveNamespace ( const achar aszNamespace)
pure virtual

Remove a namespace. Delete all sinks, commands and variables in the namespace.

Returns
eFalse if the namespace don't exists, else return eTrue.
virtual tBool AddVariable ( const achar aszName,
const achar aszValue = NULL 
)
pure virtual

Add a new string variable.

Parameters
aszNamename of the variable to create.
aszValueis the string value to give to the variable.
Returns
eFalse if the variable already exists or that the namespace is not registered, else eTrue.
virtual tBool RemoveVariable ( const achar aszName)
pure virtual

Remove a variable.

Returns
eFalse if the variable can't be found and so can't be removed, else eTrue.
virtual tBool SetVariable ( const achar aszName,
const achar aszValue 
)
pure virtual

Set the string value of a variable.

Parameters
aszNamename of the variable to set.
aszValueis the string value to give to the variable.
Returns
eFalse if the variable don't exists and so can't be set, else eTrue.
virtual cString GetVariable ( const achar aszName)
pure virtual

Get the string value of a variable.

Parameters
aszNamename of the variable to get.
Returns
the value of the variable or an empty string if it doesn't exist
virtual tBool CommandExists ( const achar aszName)
pure virtual

Return eTrue if the given command exists.

virtual tBool AddCommand ( iCommandSink pCmd)
pure virtual

Add a command in the console.

Parameters
pCmdis the command sink that will be called when the command is runned.
Returns
eFalse if the command already exists or that the namespace don't exists, else eTrue.
virtual tBool RemoveCommand ( const achar aszName)
pure virtual

Remove a command of the console.

Parameters
aszNameis the name of the command to remove.
Returns
eFalse if the command can't be found and so can't be removed, else eTrue.
virtual cString GetCommandDescription ( const achar aszCommand) const
pure virtual

Get the description of a command.

virtual tBool RunCommand ( const achar aszCommand)
pure virtual

Run a command.

Parameters
aszCommandis the raw command to parse.
Returns
the value returned by the Run() method of iCommandSink or eFalse if the command don't exists.
virtual cString CompleteCommandLine ( const achar aaszCmd,
tBool  abNext = eTrue 
)
pure virtual

Complete the given command line.

Parameters
aaszCmdis the command line to complete.
abNextif eTrue returns the next match, else the previous one.
Returns
The completed command line, if no match is found returns an empty string.
virtual tU32 GetNumCommands ( ) const
pure virtual

Get the number of commands in the queue.

virtual tBool PushCommand ( const achar aszCommand)
pure virtual

Queue a command to be run later on.

Parameters
aszCommandis the raw command to parse.
Returns
eFalse if the command can't be queue, else eTrue.
virtual cString PopCommand ( )
pure virtual

Pop a command from the queue.

virtual tU32 PopAndRunAllCommands ( )
pure virtual

Pop and run all commands in the queue.