TAO_Interpreter is the superclass for all interpreters. Its build tree method invokes the yacc parser to parse a constraint or preference string. More...
#include <Interpreter.h>


Protected Member Functions | |
| TAO_Interpreter (void) | |
| Constructor. | |
| ~TAO_Interpreter (void) | |
| Destructor. | |
| int | build_tree (const char *preferences) |
Static Protected Member Functions | |
| static int | is_empty_string (const char *str) |
Protected Attributes | |
| TAO_Constraint * | root_ |
Static Private Attributes | |
| static TAO_SYNCH_MUTEX | parserMutex__ |
| This mutex protects the <build_tree> method from reentrance. | |
TAO_Interpreter is the superclass for all interpreters. Its build tree method invokes the yacc parser to parse a constraint or preference string.
Definition at line 33 of file Interpreter.h.
| TAO_Interpreter::TAO_Interpreter | ( | void | ) | [protected] |
| TAO_Interpreter::~TAO_Interpreter | ( | void | ) | [protected] |
| int TAO_Interpreter::build_tree | ( | const char * | preferences | ) | [protected] |
Using the Yacc generated parser, construct an expression tree representing <constraints> from the tokens returned by it.
Definition at line 21 of file Interpreter.cpp.
00022 { 00023 ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, 00024 guard, 00025 TAO_Interpreter::parserMutex__, 00026 -1); 00027 00028 TAO_Lex_String_Input::reset ((char*)constraints); 00029 int return_value = 0; 00030 00031 yyval.constraint_ = 0; 00032 return_value = ::yyparse (); 00033 00034 if (return_value == 0 && yyval.constraint_ != 0) 00035 this->root_ = yyval.constraint_; 00036 else 00037 { 00038 while (yylex () > 0) 00039 continue; 00040 this->root_ = 0; 00041 } 00042 00043 return return_value; 00044 }
| int TAO_Interpreter::is_empty_string | ( | const char * | str | ) | [static, protected] |
Definition at line 47 of file Interpreter.cpp.
TAO_SYNCH_MUTEX TAO_Interpreter::parserMutex__ [static, private] |
This mutex protects the <build_tree> method from reentrance.
Definition at line 54 of file Interpreter.h.
TAO_Constraint* TAO_Interpreter::root_ [protected] |
The root of the expression tree, not equal to null if build_tree successfully builds a tree from the constraints.
Definition at line 51 of file Interpreter.h.
1.6.1