#include <Interpreter.h>
Static Public Member Functions | |
static void | reset (char *input_string) |
Reset the lex input. | |
static int | copy_into (char *buf, int max_size) |
Method lex will call to read from the input string. | |
Static Private Attributes | |
static char * | string_ = 0 |
Pointers to keep track of the input string. | |
static char * | current_ = 0 |
static char * | end_ = 0 |
Definition at line 78 of file Interpreter.h.
int TAO_Lex_String_Input::copy_into | ( | char * | buf, | |
int | max_size | |||
) | [static] |
Method lex will call to read from the input string.
Definition at line 76 of file Interpreter.cpp.
References current_, end_, and ACE_OS::memcpy().
00077 { 00078 int chars_left = static_cast<int> (TAO_Lex_String_Input::end_ - 00079 TAO_Lex_String_Input::current_); 00080 int n = max_size > chars_left ? chars_left : max_size; 00081 00082 if (n > 0) 00083 { 00084 ACE_OS::memcpy (buf, 00085 TAO_Lex_String_Input::current_, 00086 n); 00087 TAO_Lex_String_Input::current_ += n; 00088 } 00089 00090 return n; 00091 }
void TAO_Lex_String_Input::reset | ( | char * | input_string | ) | [static] |
Reset the lex input.
Definition at line 94 of file Interpreter.cpp.
References current_, end_, string_, and ACE_OS::strlen().
Referenced by TAO_Interpreter::build_tree().
00095 { 00096 TAO_Lex_String_Input::string_ = input_string; 00097 TAO_Lex_String_Input::current_ = input_string; 00098 TAO_Lex_String_Input::end_ = input_string + 00099 ACE_OS::strlen (TAO_Lex_String_Input::string_); 00100 }
char * TAO_Lex_String_Input::current_ = 0 [static, private] |
char * TAO_Lex_String_Input::end_ = 0 [static, private] |
char * TAO_Lex_String_Input::string_ = 0 [static, private] |
Pointers to keep track of the input string.
Definition at line 90 of file Interpreter.h.
Referenced by reset().