Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

RegexConverterBox::Subexpr Struct Reference

#include <RegexConverterBox.h>

List of all members.


Detailed Description

A subexpression matched by a regular expression.

Comprises a range of bytes in the input received over the network.


Public Member Functions

 Subexpr ()
 Dummy constructor.
 Subexpr (const char *begin, const char *end)
 Constructs a subexpression comprising a range of bytes.
string as_string () const
 Returns the subexpression as a string.
template<typename CharArray> bool toStringField (CharArray &buf) const
 Saves the subexpression as a string field.
bool toStringField (char *field, unsigned int size) const
 Saves the subexpression as a string field.
int32 toInt () const throw ( AuroraException )
 Converts the subexpression to a 32 bit integer value.
int64 toLong () const throw ( AuroraException )
 Converts the subexpression to a 64 bit integer value.
single toSingle () const throw ( AuroraException )
 Converts the subexpression to a 32 bit floating-point value.
double toDouble () const throw ( AuroraException )
 Converts the subexpression to a 64 bit floating-point value.

Public Attributes

const char * begin
 The beginning of the subexpression.
const char * end
 The end of the subexpression.


Constructor & Destructor Documentation

RegexConverterBox::Subexpr::Subexpr  ) 
 

Dummy constructor.

RegexConverterBox::Subexpr::Subexpr const char *  begin,
const char *  end
 

Constructs a subexpression comprising a range of bytes.


Member Function Documentation

string RegexConverterBox::Subexpr::as_string  )  const
 

Returns the subexpression as a string.

double RegexConverterBox::Subexpr::toDouble  )  const throw ( AuroraException )
 

Converts the subexpression to a 64 bit floating-point value.

Exceptions:
AuroraException if the subexpression is not a valid double precision floating-point value

int32 RegexConverterBox::Subexpr::toInt  )  const throw ( AuroraException )
 

Converts the subexpression to a 32 bit integer value.

Exceptions:
AuroraException if the subexpression is not a valid 32 bit integer

int64 RegexConverterBox::Subexpr::toLong  )  const throw ( AuroraException )
 

Converts the subexpression to a 64 bit integer value.

Exceptions:
AuroraException if the subexpression is not a valid 64 bit integer

single RegexConverterBox::Subexpr::toSingle  )  const throw ( AuroraException )
 

Converts the subexpression to a 32 bit floating-point value.

Exceptions:
AuroraException if the subexpression is not a valid single precision floating-point value

bool RegexConverterBox::Subexpr::toStringField char *  field,
unsigned int  size
const
 

Saves the subexpression as a string field.

Parameters:
field a buffer in which to save the subexpression
size the maximum number of characters to save
Returns:
true if the subexpression was completely copied, or false if it was truncated

template<typename CharArray>
bool RegexConverterBox::Subexpr::toStringField CharArray &  buf  )  const
 

Saves the subexpression as a string field.

Parameters:
buf a string field in a tuple structure; must be of type char[]
Returns:
true if the subexpression was completely copied, or false if it was truncated


Member Data Documentation

const char* RegexConverterBox::Subexpr::begin
 

The beginning of the subexpression.

const char* RegexConverterBox::Subexpr::end
 

The end of the subexpression.


The documentation for this struct was generated from the following files:
Generated on Fri Nov 12 15:15:24 2004 for Borealis by doxygen 1.3.8