- Timestamp:
- Aug 19, 2010, 4:57:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/CommandExecutor.cc
r6417 r7189 104 104 { 105 105 if (useTcl) 106 return TclBind::eval(command); 107 108 CommandExecutor::parseIfNeeded(command); 109 return CommandExecutor::getEvaluation().execute(); 110 } 111 112 MultiType CommandExecutor::getReturnValue() 113 { 114 return CommandExecutor::getEvaluation().getReturnvalue(); 115 } 116 117 std::string CommandExecutor::getReturnValueString() 118 { 119 return CommandExecutor::getEvaluation().getReturnvalue().getString(); 106 { 107 bool success; 108 TclBind::eval(command, &success); 109 return success; 110 } 111 else 112 { 113 CommandExecutor::parseIfNeeded(command); 114 return CommandExecutor::getEvaluation().execute(); 115 } 116 } 117 118 MultiType CommandExecutor::queryMT(const std::string& command, bool* success, bool useTcl) 119 { 120 if (useTcl) 121 { 122 return TclBind::eval(command, success); 123 } 124 else 125 { 126 CommandExecutor::parseIfNeeded(command); 127 return CommandExecutor::getEvaluation().query(success); 128 } 129 } 130 131 std::string CommandExecutor::query(const std::string& command, bool* success, bool useTcl) 132 { 133 if (useTcl) 134 { 135 return TclBind::eval(command, success); 136 } 137 else 138 { 139 CommandExecutor::parseIfNeeded(command); 140 return CommandExecutor::getEvaluation().query(success).getString(); 141 } 120 142 } 121 143
Note: See TracChangeset
for help on using the changeset viewer.