Public Member Functions

ClassAdParser Class Reference

#include <source.h>

List of all members.

Public Member Functions

 ClassAdParser ()
 Constructor.
 ~ClassAdParser ()
 Destructor.
ClassAdParseClassAd (const std::string &buffer, bool full=false)
ClassAdParseClassAd (const std::string &buffer, int &offset)
ClassAdParseClassAd (const char *buffer, bool full=false)
ClassAdParseClassAd (const char *buffer, int &offset)
ClassAdParseClassAd (FILE *file, bool full=false)
ClassAdParseClassAd (std::istream &stream, bool full=false)
ClassAdParseClassAd (LexerSource *lexer_source, bool full=false)
bool ParseClassAd (const std::string &buffer, ClassAd &ad, bool full=false)
bool ParseClassAd (const std::string &buffer, ClassAd &classad, int &offset)
bool ParseClassAd (const char *buffer, ClassAd &classad, bool full=false)
bool ParseClassAd (const char *buffer, ClassAd &classad, int &offset)
bool ParseClassAd (FILE *file, ClassAd &classad, bool full=false)
bool ParseClassAd (std::istream &stream, ClassAd &classad, bool full=false)
bool ParseClassAd (LexerSource *lexer_source, ClassAd &ad, bool full=false)
bool ParseExpression (const std::string &buffer, ExprTree *&expr, bool full=false)
bool ParseExpression (LexerSource *lexer_source, ExprTree *&expr, bool full=false)
ExprTreeParseExpression (const std::string &buffer, bool full=false)
ExprTreeParseExpression (LexerSource *lexer_source, bool full=false)
ExprTreeParseNextExpression (void)
void SetDebug (bool d)
Lexer::TokenType PeekToken (void)
Lexer::TokenType ConsumeToken (void)
 ClassAdParser ()
 Constructor.
 ~ClassAdParser ()
 Destructor.
ClassAdParseClassAd (const std::string &buffer, bool full=false)
ClassAdParseClassAd (const std::string &buffer, int &offset)
ClassAdParseClassAd (const char *buffer, bool full=false)
ClassAdParseClassAd (const char *buffer, int &offset)
ClassAdParseClassAd (FILE *file, bool full=false)
ClassAdParseClassAd (std::istream &stream, bool full=false)
ClassAdParseClassAd (LexerSource *lexer_source, bool full=false)
bool ParseClassAd (const std::string &buffer, ClassAd &ad, bool full=false)
bool ParseClassAd (const std::string &buffer, ClassAd &classad, int &offset)
bool ParseClassAd (const char *buffer, ClassAd &classad, bool full=false)
bool ParseClassAd (const char *buffer, ClassAd &classad, int &offset)
bool ParseClassAd (FILE *file, ClassAd &classad, bool full=false)
bool ParseClassAd (std::istream &stream, ClassAd &classad, bool full=false)
bool ParseClassAd (LexerSource *lexer_source, ClassAd &ad, bool full=false)
bool ParseExpression (const std::string &buffer, ExprTree *&expr, bool full=false)
bool ParseExpression (LexerSource *lexer_source, ExprTree *&expr, bool full=false)
ExprTreeParseExpression (const std::string &buffer, bool full=false)
ExprTreeParseExpression (LexerSource *lexer_source, bool full=false)
ExprTreeParseNextExpression (void)
void SetDebug (bool d)
Lexer::TokenType PeekToken (void)
Lexer::TokenType ConsumeToken (void)

Detailed Description

This reads ClassAd strings from various sources and converts them into a ClassAd. It can read from C++ strings, C strings, FILEs, and streams.


Member Function Documentation

bool ClassAdParser::ParseClassAd ( const std::string &  buffer,
ClassAd ad,
bool  full = false 
)

Parse a ClassAd

Parameters:
buffer Buffer containing the string representation of the classad.
ad The classad to be populated
full If this parameter is true, the parse is considered to succeed only if the ClassAd was parsed successfully and no other tokens follow the ClassAd.
Returns:
true on success, false on failure
ClassAd* ClassAdParser::ParseClassAd ( const std::string &  buffer,
bool  full = false 
)

Parse a ClassAd

Parameters:
buffer Buffer containing the string representation of the classad.
full If this parameter is true, the parse is considered to succeed only if the ClassAd was parsed successfully and no other tokens follow the ClassAd.
Returns:
pointer to the ClassAd object if successful, or NULL otherwise
ClassAd* ClassAdParser::ParseClassAd ( const std::string &  buffer,
bool  full = false 
)

Parse a ClassAd

Parameters:
buffer Buffer containing the string representation of the classad.
full If this parameter is true, the parse is considered to succeed only if the ClassAd was parsed successfully and no other tokens follow the ClassAd.
Returns:
pointer to the ClassAd object if successful, or NULL otherwise
bool ClassAdParser::ParseClassAd ( const std::string &  buffer,
ClassAd ad,
bool  full = false 
)

Parse a ClassAd

Parameters:
buffer Buffer containing the string representation of the classad.
ad The classad to be populated
full If this parameter is true, the parse is considered to succeed only if the ClassAd was parsed successfully and no other tokens follow the ClassAd.
Returns:
true on success, false on failure
ExprTree* ClassAdParser::ParseExpression ( const std::string &  buffer,
bool  full = false 
)

Parse an expression

Parameters:
buffer Buffer containing the string representation of the expression.
full If this parameter is true, the parse is considered to succeed only if the expression was parsed successfully and no other tokens are left.
Returns:
pointer to the expression object if successful, or NULL otherwise
ExprTree* ClassAdParser::ParseExpression ( const std::string &  buffer,
bool  full = false 
)

Parse an expression

Parameters:
buffer Buffer containing the string representation of the expression.
full If this parameter is true, the parse is considered to succeed only if the expression was parsed successfully and no other tokens are left.
Returns:
pointer to the expression object if successful, or NULL otherwise
bool ClassAdParser::ParseExpression ( const std::string &  buffer,
ExprTree *&  expr,
bool  full = false 
)

Parse an expression

Parameters:
expr Reference to a ExprTree pointer, which will be pointed to the parsed expression. The previous value of the pointer will be destroyed.
full If this parameter is true, the parse is considered to succeed only if the expression was parsed successfully and no other tokens follow the expression.
Returns:
true if the parse succeeded, false otherwise.
bool ClassAdParser::ParseExpression ( const std::string &  buffer,
ExprTree *&  expr,
bool  full = false 
)

Parse an expression

Parameters:
expr Reference to a ExprTree pointer, which will be pointed to the parsed expression. The previous value of the pointer will be destroyed.
full If this parameter is true, the parse is considered to succeed only if the expression was parsed successfully and no other tokens follow the expression.
Returns:
true if the parse succeeded, false otherwise.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends