te::da::Field Class Reference

The Field class can be used to model an expression that takes part of the output items of a SELECT. More...

#include <Field.h>

Public Member Functions

 Field (const Expression &e, const std::string &alias=std::string(""))
 Constructor. More...
 
 Field (Expression *e, std::string *alias=0)
 Constructor. More...
 
 Field (const std::string &propertyName, const std::string &alias=std::string(""))
 Constructor. More...
 
 Field (const Field &rhs)
 Copy constructor. More...
 
std::string * getAlias () const
 It returns the alias for the outout expression. More...
 
ExpressiongetExpression () const
 It returns the expression set for an output select query. More...
 
Fieldoperator= (const Field &rhs)
 
void setAlias (std::string *alias)
 As you know, sometimes is better to give an alias to an output expression. More...
 
void setExpression (Expression *e)
 It sets the an expression that can be used in a Select query. More...
 
 ~Field ()
 Destructor. More...
 

Private Attributes

std::auto_ptr< std::string > m_alias
 An alias for the output name. More...
 
std::auto_ptr< Expressionm_field
 A valid expression. More...
 

Detailed Description

The Field class can be used to model an expression that takes part of the output items of a SELECT.

See also
Fields

Definition at line 50 of file Field.h.

Constructor & Destructor Documentation

te::da::Field::Field ( const Expression e,
const std::string &  alias = std::string("") 
)

Constructor.

Parameters
eThe output expression to be used in a Select clause.
aliasAn alias to the output expression.
te::da::Field::Field ( Expression e,
std::string *  alias = 0 
)

Constructor.

Parameters
eThe output expression to be used in a Select clause.
aliasAn alias to the output expression.
Note
The Field will take the ownership of Expression and alias.
te::da::Field::Field ( const std::string &  propertyName,
const std::string &  alias = std::string("") 
)

Constructor.

Parameters
propertyNameThe property name.
aliasThe property alias.
te::da::Field::Field ( const Field rhs)

Copy constructor.

te::da::Field::~Field ( )

Destructor.

Member Function Documentation

std::string* te::da::Field::getAlias ( ) const

It returns the alias for the outout expression.

Returns
The alias for the outout expression.
Expression* te::da::Field::getExpression ( ) const

It returns the expression set for an output select query.

Returns
The expression set for an output select query.
Field& te::da::Field::operator= ( const Field rhs)

Assignment operator.

void te::da::Field::setAlias ( std::string *  alias)

As you know, sometimes is better to give an alias to an output expression.

Parameters
aliasAn aliast fo the output expression.
Note
The Field object will take the ownership of the alias.
void te::da::Field::setExpression ( Expression e)

It sets the an expression that can be used in a Select query.

Parameters
eAn expression that can be used in a Select query.
Note
The Field will take the ownership of the given expression.

Member Data Documentation

std::auto_ptr<std::string> te::da::Field::m_alias
private

An alias for the output name.

Definition at line 124 of file Field.h.

std::auto_ptr<Expression> te::da::Field::m_field
private

A valid expression.

Definition at line 123 of file Field.h.


The documentation for this class was generated from the following file: