#include <CMD_Manager.h>

Public Member Functions | |
| CMD_Manager (const char *appname, int load_dsos=1) | |
| virtual | ~CMD_Manager () |
| virtual void | setContext () |
| void | sendInput (const char *input, bool create_block=true) |
| void | sendMultiLineInput (char *input, bool create_block=true) |
| void | execute (const char *cmd, int addToHistory=0, ostream *out=0, ostream *err=0, int doAliasExpansion=1, bool create_block=true) |
| void | completeCommand (const char *prefix, UT_String &command) const |
| void | matchCommands (const char *prefix, UT_StringArray &matches) const |
| void | installCommand (const char *name, const char *options, CMD_Callback cb, bool is_safe=true) |
| CMD_PostCmdCallback | setPostCmdCallback (CMD_PostCmdCallback callback, void *userdata) |
| void * | getPostCmdCallbackData () const |
| void | setCommandEchoCallback (CMD_CommandEchoCallback callback, void *userdata) |
| void * | getCommandEchoCallbackData () const |
| void | commandDump (ostream &os, const char *pattern=0, const char *prefix=0) const |
| void | commandHelp (ostream &os, const char *cmd) const |
| void | searchHelp (CMD_CommandList &list, const char *filename, const char *pattern) const |
| void | printHelp (ostream &os, const char *filename, const char *pattern=0) const |
| void | saveAliases (ostream &os) |
| void | saveVariables (ostream &os) |
| int | setHistoryCapture (int onOff) |
| CMD_Source * | pushSource (const char *filename, int verbose=0) |
| CMD_Source * | popSource (int checkLoop=1) |
| CMD_Source * | getSource () |
| int | getSourceLevel () |
| void | pushOutputStreams (ostream &out, ostream &err) |
| void | popOutputStreams () |
| void | unsetVariable (const char *name) |
| void | resetVariables () |
| void | setVariable (const char *name, const char *value, int local, int uplevel=0) |
| bool | hasVariable (const char *name) const |
| bool | getVariable (const char *name, UT_String &value) |
| bool | getVariable (const char *name, float &value) |
| bool | getVariable (const char *name, int &value) |
| bool | hasEnv (const char *name) const |
| bool | getEnv (const char *name, UT_String &value) |
| void | getVariableNames (UT_StringArray &names, int dirty=0) |
| int | clearDirtyVariables () |
| int | isVariableNameOk (const char *name) |
| void | setMotName (const char *path) |
| void | setJob (const char *path) |
| unsigned | getCommandsRun () const |
| ostream & | getError (int printMessage=1) |
| ostream * | setStandardOut (ostream &os) |
| ostream * | setStandardErr (ostream &os) |
| void | streamDeleted (ostream &os) |
| void | setPrompt (const char *prompt) |
| const char * | getPrompt (int level=-1) const |
| void | pushPrompt (const char *prompt) |
| void | popPrompt () |
| int | isLoopCommand (const char *str) |
| int | evaluateCondition (const char *expr) |
| int | evaluateCondition (int argc, const char *argv[]) |
| void | dumpHistory (ostream &os) const |
| void | clearHistory () |
| const char * | getHistoryCommand (int n) const |
| unsigned int | getHistoryCount () const |
| CMD_VariableTable * | getGlobalVariables () |
| CMD_AliasTable * | getAliases () |
| bool | getAlias (const char *name, UT_String &value) |
| void | setAlias (const char *name, const char *value) |
| void | destroyAlias (const char *name) |
| void | destroyAliases () |
| void | allowEnvironmentToOverwriteVariable (const char *name, bool onoff) |
| bool | isEnvironmentAllowedToOverwriteVariable (const char *name) |
| void | setIsLoadingGlobalVariables (bool onoff) |
| bool | isLoadingGlobalVariables () |
| Are we loading global variables from the hip file? | |
| void | saveCommandString (ostream &os, const UT_String &str) |
| void | getFrameRange (CMD_Args &args, int &fstart, int &fend, int &finc, char oframe= 'f', char ofinc= 'i') |
| void | setContinueLevel (int level) |
| int | getContinueLevel () const |
| void | bumpBreakLevel (int dir) |
| int | getBreakLevel () const |
| void | bumpLoopNestLevel (int dir) |
| int | getLoopNestLevel () const |
| CMD_Loop * | buildLoop (const char *text) |
| void | doPrompt () |
| void | getPrompt (UT_String &str) |
| void | setVerbose (int on_off) |
| int | getVerbose () const |
| void | setCommandEcho (bool on_off) |
| bool | getCommandEcho () const |
| void | setIORedirection (int on_off) |
| int | getIORedirection () const |
| const char * | getOptions (const char *cmdName) |
| int | isCommandDefined (const char *name) |
| void | getDSOCommands (CMD_CommandList &list) |
| bool | isLoading () const |
| void | beginLoading () |
| void | endLoading () |
| void | setSafeMode (int safe_mode) |
| int | isInSafeMode () const |
| void | setBrowserMode (int browser_mode) |
| int | isInBrowserMode () const |
| void | setStatusCode (int status_code) |
| int | getStatusCode () const |
| bool | openPort (int port, bool safe, bool quiet, bool wait, CMD_Args &args, const char *execute, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true) |
| bool | openPort (int port, bool safe, bool quiet, bool wait, ostream &error_output, const char *execute, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true) |
| bool | openPort (int port, bool safe, bool quiet, bool wait, CMD_Args &args, const char *const *execute_argv, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true) |
| bool | openPort (int port, bool safe, bool quiet, bool wait, ostream &error_output, const char *const *execute_argv, pid_t *pid, bool separateerrors, bool suppress=true, const char *ip_mask=0, FS_ServerSocketListener::ChildExitedCallback child_exited_callback=0, bool detach_console_for_execute=false, bool drain_queue_when_waiting_for_exec=true) |
| void | closePort (int port) |
| void | closeAutoPort () |
| bool | beginChannelBlock () |
| bool | endChannelBlock () |
| void | echoOff () |
| void | echoOn () |
Static Public Member Functions | |
| static bool | getContextExists () |
| static CMD_Manager * | getContext () |
| static void | saveProtectedString (ostream &os, const char *s) |
| static void | expandControlSequences (UT_String &str) |
| static int | getHScriptPort () |
| static void | cmd_python (CMD_Args &args) |
Protected Member Functions | |
| virtual bool | getVariableString (const char *name, UT_String &value, int &timeDepend, int thread) |
expr/channel.C, expr/command.C, expr/functions.C, FS/FS_Background.C, standalone/standalone.C, and ui/cmd_ui.C.
Definition at line 62 of file CMD_Manager.h.
| CMD_Manager::CMD_Manager | ( | const char * | appname, | |
| int | load_dsos = 1 | |||
| ) |
| virtual CMD_Manager::~CMD_Manager | ( | ) | [virtual] |
| void CMD_Manager::allowEnvironmentToOverwriteVariable | ( | const char * | name, | |
| bool | onoff | |||
| ) |
Specify whether a global hscript variable may be overwritten by an environment variable's value when loading the hip file, instead of just using the value saved in the hip file.
| bool CMD_Manager::beginChannelBlock | ( | ) |
| void CMD_Manager::beginLoading | ( | ) | [inline] |
Definition at line 286 of file CMD_Manager.h.
| CMD_Loop* CMD_Manager::buildLoop | ( | const char * | text | ) |
| void CMD_Manager::bumpBreakLevel | ( | int | dir | ) | [inline] |
Definition at line 252 of file CMD_Manager.h.
| void CMD_Manager::bumpLoopNestLevel | ( | int | dir | ) | [inline] |
Definition at line 254 of file CMD_Manager.h.
| int CMD_Manager::clearDirtyVariables | ( | ) |
| void CMD_Manager::clearHistory | ( | ) |
| void CMD_Manager::closeAutoPort | ( | ) |
| void CMD_Manager::closePort | ( | int | port | ) |
| static void CMD_Manager::cmd_python | ( | CMD_Args & | args | ) | [static] |
| void CMD_Manager::commandDump | ( | ostream & | os, | |
| const char * | pattern = 0, |
|||
| const char * | prefix = 0 | |||
| ) | const |
| void CMD_Manager::commandHelp | ( | ostream & | os, | |
| const char * | cmd | |||
| ) | const |
| void CMD_Manager::completeCommand | ( | const char * | prefix, | |
| UT_String & | command | |||
| ) | const |
| void CMD_Manager::destroyAlias | ( | const char * | name | ) |
| void CMD_Manager::destroyAliases | ( | ) |
| void CMD_Manager::doPrompt | ( | ) |
| void CMD_Manager::dumpHistory | ( | ostream & | os | ) | const |
| void CMD_Manager::echoOff | ( | ) |
| void CMD_Manager::echoOn | ( | ) |
| bool CMD_Manager::endChannelBlock | ( | ) |
| void CMD_Manager::endLoading | ( | ) | [inline] |
Definition at line 287 of file CMD_Manager.h.
| int CMD_Manager::evaluateCondition | ( | int | argc, | |
| const char * | argv[] | |||
| ) |
| int CMD_Manager::evaluateCondition | ( | const char * | expr | ) |
| void CMD_Manager::execute | ( | const char * | cmd, | |
| int | addToHistory = 0, |
|||
| ostream * | out = 0, |
|||
| ostream * | err = 0, |
|||
| int | doAliasExpansion = 1, |
|||
| bool | create_block = true | |||
| ) |
| static void CMD_Manager::expandControlSequences | ( | UT_String & | str | ) | [static] |
| bool CMD_Manager::getAlias | ( | const char * | name, | |
| UT_String & | value | |||
| ) |
| CMD_AliasTable* CMD_Manager::getAliases | ( | ) | [inline] |
Definition at line 219 of file CMD_Manager.h.
| int CMD_Manager::getBreakLevel | ( | ) | const [inline] |
Definition at line 253 of file CMD_Manager.h.
| bool CMD_Manager::getCommandEcho | ( | ) | const [inline] |
Definition at line 272 of file CMD_Manager.h.
| void* CMD_Manager::getCommandEchoCallbackData | ( | ) | const [inline] |
Definition at line 121 of file CMD_Manager.h.
| unsigned CMD_Manager::getCommandsRun | ( | ) | const [inline] |
Definition at line 178 of file CMD_Manager.h.
| static CMD_Manager* CMD_Manager::getContext | ( | ) | [inline, static] |
| static bool CMD_Manager::getContextExists | ( | ) | [inline, static] |
| int CMD_Manager::getContinueLevel | ( | ) | const [inline] |
Definition at line 251 of file CMD_Manager.h.
| void CMD_Manager::getDSOCommands | ( | CMD_CommandList & | list | ) |
| bool CMD_Manager::getEnv | ( | const char * | name, | |
| UT_String & | value | |||
| ) |
| ostream& CMD_Manager::getError | ( | int | printMessage = 1 |
) |
| void CMD_Manager::getFrameRange | ( | CMD_Args & | args, | |
| int & | fstart, | |||
| int & | fend, | |||
| int & | finc, | |||
| char | oframe = 'f', |
|||
| char | ofinc = 'i' | |||
| ) |
| CMD_VariableTable* CMD_Manager::getGlobalVariables | ( | ) | [inline] |
Definition at line 218 of file CMD_Manager.h.
| const char* CMD_Manager::getHistoryCommand | ( | int | n | ) | const |
| unsigned int CMD_Manager::getHistoryCount | ( | ) | const |
| static int CMD_Manager::getHScriptPort | ( | ) | [static] |
| int CMD_Manager::getIORedirection | ( | ) | const |
| int CMD_Manager::getLoopNestLevel | ( | ) | const [inline] |
Definition at line 262 of file CMD_Manager.h.
| const char* CMD_Manager::getOptions | ( | const char * | cmdName | ) |
| void* CMD_Manager::getPostCmdCallbackData | ( | ) | const [inline] |
Definition at line 112 of file CMD_Manager.h.
| void CMD_Manager::getPrompt | ( | UT_String & | str | ) |
| const char* CMD_Manager::getPrompt | ( | int | level = -1 |
) | const [inline] |
Definition at line 191 of file CMD_Manager.h.
| CMD_Source* CMD_Manager::getSource | ( | ) | [inline] |
Definition at line 145 of file CMD_Manager.h.
| int CMD_Manager::getSourceLevel | ( | ) | [inline] |
Definition at line 150 of file CMD_Manager.h.
| int CMD_Manager::getStatusCode | ( | ) | const [inline] |
Definition at line 296 of file CMD_Manager.h.
| bool CMD_Manager::getVariable | ( | const char * | name, | |
| int & | value | |||
| ) | [inline] |
Definition at line 165 of file CMD_Manager.h.
| bool CMD_Manager::getVariable | ( | const char * | name, | |
| float & | value | |||
| ) | [inline] |
Definition at line 163 of file CMD_Manager.h.
| bool CMD_Manager::getVariable | ( | const char * | name, | |
| UT_String & | value | |||
| ) | [inline] |
Definition at line 161 of file CMD_Manager.h.
| void CMD_Manager::getVariableNames | ( | UT_StringArray & | names, | |
| int | dirty = 0 | |||
| ) |
| virtual bool CMD_Manager::getVariableString | ( | const char * | name, | |
| UT_String & | value, | |||
| int & | timeDepend, | |||
| int | thread | |||
| ) | [protected, virtual] |
Reimplemented from CH_Manager.
| int CMD_Manager::getVerbose | ( | ) | const |
| bool CMD_Manager::hasEnv | ( | const char * | name | ) | const |
| bool CMD_Manager::hasVariable | ( | const char * | name | ) | const |
| void CMD_Manager::installCommand | ( | const char * | name, | |
| const char * | options, | |||
| CMD_Callback | cb, | |||
| bool | is_safe = true | |||
| ) |
| int CMD_Manager::isCommandDefined | ( | const char * | name | ) | [inline] |
Definition at line 279 of file CMD_Manager.h.
| bool CMD_Manager::isEnvironmentAllowedToOverwriteVariable | ( | const char * | name | ) |
Should we use the environment variable value when loading this variable from the hip file?
| int CMD_Manager::isInBrowserMode | ( | ) | const |
| int CMD_Manager::isInSafeMode | ( | ) | const |
| bool CMD_Manager::isLoading | ( | ) | const [inline] |
Definition at line 285 of file CMD_Manager.h.
| bool CMD_Manager::isLoadingGlobalVariables | ( | ) | [inline] |
| int CMD_Manager::isLoopCommand | ( | const char * | str | ) |
| int CMD_Manager::isVariableNameOk | ( | const char * | name | ) |
| void CMD_Manager::matchCommands | ( | const char * | prefix, | |
| UT_StringArray & | matches | |||
| ) | const |
| bool CMD_Manager::openPort | ( | int | port, | |
| bool | safe, | |||
| bool | quiet, | |||
| bool | wait, | |||
| ostream & | error_output, | |||
| const char *const * | execute_argv, | |||
| pid_t * | pid, | |||
| bool | separateerrors, | |||
| bool | suppress = true, |
|||
| const char * | ip_mask = 0, |
|||
| FS_ServerSocketListener::ChildExitedCallback | child_exited_callback = 0, |
|||
| bool | detach_console_for_execute = false, |
|||
| bool | drain_queue_when_waiting_for_exec = true | |||
| ) |
| bool CMD_Manager::openPort | ( | int | port, | |
| bool | safe, | |||
| bool | quiet, | |||
| bool | wait, | |||
| CMD_Args & | args, | |||
| const char *const * | execute_argv, | |||
| pid_t * | pid, | |||
| bool | separateerrors, | |||
| bool | suppress = true, |
|||
| const char * | ip_mask = 0, |
|||
| FS_ServerSocketListener::ChildExitedCallback | child_exited_callback = 0, |
|||
| bool | detach_console_for_execute = false, |
|||
| bool | drain_queue_when_waiting_for_exec = true | |||
| ) |
| bool CMD_Manager::openPort | ( | int | port, | |
| bool | safe, | |||
| bool | quiet, | |||
| bool | wait, | |||
| ostream & | error_output, | |||
| const char * | execute, | |||
| pid_t * | pid, | |||
| bool | separateerrors, | |||
| bool | suppress = true, |
|||
| const char * | ip_mask = 0, |
|||
| FS_ServerSocketListener::ChildExitedCallback | child_exited_callback = 0, |
|||
| bool | detach_console_for_execute = false, |
|||
| bool | drain_queue_when_waiting_for_exec = true | |||
| ) |
| bool CMD_Manager::openPort | ( | int | port, | |
| bool | safe, | |||
| bool | quiet, | |||
| bool | wait, | |||
| CMD_Args & | args, | |||
| const char * | execute, | |||
| pid_t * | pid, | |||
| bool | separateerrors, | |||
| bool | suppress = true, |
|||
| const char * | ip_mask = 0, |
|||
| FS_ServerSocketListener::ChildExitedCallback | child_exited_callback = 0, |
|||
| bool | detach_console_for_execute = false, |
|||
| bool | drain_queue_when_waiting_for_exec = true | |||
| ) |
| void CMD_Manager::popOutputStreams | ( | ) |
| void CMD_Manager::popPrompt | ( | ) |
| CMD_Source* CMD_Manager::popSource | ( | int | checkLoop = 1 |
) |
| void CMD_Manager::printHelp | ( | ostream & | os, | |
| const char * | filename, | |||
| const char * | pattern = 0 | |||
| ) | const |
| void CMD_Manager::pushOutputStreams | ( | ostream & | out, | |
| ostream & | err | |||
| ) |
| void CMD_Manager::pushPrompt | ( | const char * | prompt | ) |
| CMD_Source* CMD_Manager::pushSource | ( | const char * | filename, | |
| int | verbose = 0 | |||
| ) |
| void CMD_Manager::resetVariables | ( | ) |
| void CMD_Manager::saveAliases | ( | ostream & | os | ) |
| void CMD_Manager::saveCommandString | ( | ostream & | os, | |
| const UT_String & | str | |||
| ) |
| static void CMD_Manager::saveProtectedString | ( | ostream & | os, | |
| const char * | s | |||
| ) | [static] |
| void CMD_Manager::saveVariables | ( | ostream & | os | ) |
| void CMD_Manager::searchHelp | ( | CMD_CommandList & | list, | |
| const char * | filename, | |||
| const char * | pattern | |||
| ) | const |
| void CMD_Manager::sendInput | ( | const char * | input, | |
| bool | create_block = true | |||
| ) |
| void CMD_Manager::sendMultiLineInput | ( | char * | input, | |
| bool | create_block = true | |||
| ) |
| void CMD_Manager::setAlias | ( | const char * | name, | |
| const char * | value | |||
| ) |
| void CMD_Manager::setBrowserMode | ( | int | browser_mode | ) |
| void CMD_Manager::setCommandEcho | ( | bool | on_off | ) | [inline] |
Definition at line 270 of file CMD_Manager.h.
| void CMD_Manager::setCommandEchoCallback | ( | CMD_CommandEchoCallback | callback, | |
| void * | userdata | |||
| ) |
| virtual void CMD_Manager::setContext | ( | ) | [virtual] |
Reimplemented from CH_Manager.
| void CMD_Manager::setContinueLevel | ( | int | level | ) | [inline] |
Definition at line 250 of file CMD_Manager.h.
| int CMD_Manager::setHistoryCapture | ( | int | onOff | ) | [inline] |
Definition at line 137 of file CMD_Manager.h.
| void CMD_Manager::setIORedirection | ( | int | on_off | ) |
| void CMD_Manager::setIsLoadingGlobalVariables | ( | bool | onoff | ) | [inline] |
Say that we're loading the global variables from a hip file or that we're done loading them.
Definition at line 237 of file CMD_Manager.h.
| void CMD_Manager::setJob | ( | const char * | path | ) |
| void CMD_Manager::setMotName | ( | const char * | path | ) |
| CMD_PostCmdCallback CMD_Manager::setPostCmdCallback | ( | CMD_PostCmdCallback | callback, | |
| void * | userdata | |||
| ) |
| void CMD_Manager::setPrompt | ( | const char * | prompt | ) |
| void CMD_Manager::setSafeMode | ( | int | safe_mode | ) |
| ostream* CMD_Manager::setStandardErr | ( | ostream & | os | ) |
| ostream* CMD_Manager::setStandardOut | ( | ostream & | os | ) |
| void CMD_Manager::setStatusCode | ( | int | status_code | ) | [inline] |
Definition at line 294 of file CMD_Manager.h.
| void CMD_Manager::setVariable | ( | const char * | name, | |
| const char * | value, | |||
| int | local, | |||
| int | uplevel = 0 | |||
| ) |
| void CMD_Manager::setVerbose | ( | int | on_off | ) |
| void CMD_Manager::streamDeleted | ( | ostream & | os | ) |
| void CMD_Manager::unsetVariable | ( | const char * | name | ) |
1.5.9