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

Protected Member Functions | |
| ETCL_Interpreter (void) | |
| Constructor. | |
| virtual | ~ETCL_Interpreter (void) |
| Destructor. | |
| int | build_tree (const char *constraints) |
Static Protected Member Functions | |
| static int | is_empty_string (const char *str) |
Protected Attributes | |
| ETCL_Constraint * | root_ |
Static Private Attributes | |
| static ACE_SYNCH_MUTEX | parserMutex__ |
| This mutex protects the <build_tree> method from reentrance. | |
ETCL_Interpreter is the superclass for all ETCL interpreters. Its build tree method invokes the yacc parser to parse a constraint or preference string.
Definition at line 45 of file ETCL_Interpreter.h.
| ETCL_Interpreter::ETCL_Interpreter | ( | void | ) | [protected] |
| ETCL_Interpreter::~ETCL_Interpreter | ( | void | ) | [protected, virtual] |
| int ETCL_Interpreter::build_tree | ( | const char * | constraints | ) | [protected] |
Using the Yacc generated parser, construct an expression tree representing constraints from the tokens returned by it.
Definition at line 25 of file ETCL_Interpreter.cpp.
{
ACE_GUARD_RETURN (ACE_SYNCH_MUTEX,
guard,
ETCL_Interpreter::parserMutex__,
-1);
Lex_String_Input::reset ((char*)constraints);
yyval.constraint = 0;
int return_value = ::yyparse ();
if (return_value == 0 && yyval.constraint != 0)
{
this->root_ = yyval.constraint;
}
else
{
this->root_ = 0;
}
return return_value;
}
| int ETCL_Interpreter::is_empty_string | ( | const char * | str | ) | [static, protected] |
Definition at line 50 of file ETCL_Interpreter.cpp.
{
int return_value = 0;
if (str != 0)
{
int i = 0;
while (str[i] != '\0')
{
if (str[i] != ' ')
{
break;
}
++i;
}
if (str[i] == '\0')
{
return_value = 1;
}
}
return return_value;
}
ETCL_Parser_Export ACE_SYNCH_MUTEX ETCL_Interpreter::parserMutex__ [static, private] |
This mutex protects the <build_tree> method from reentrance.
Definition at line 66 of file ETCL_Interpreter.h.
ETCL_Constraint* ETCL_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 63 of file ETCL_Interpreter.h.
1.7.0