All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Definition at line 31 of file Field.cpp.

References m_alias.

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.

Definition at line 38 of file Field.cpp.

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

Constructor.

Parameters
propertyNameThe property name.
aliasThe property alias.

Definition at line 44 of file Field.cpp.

References m_alias, and m_field.

te::da::Field::Field ( const Field rhs)

Copy constructor.

Definition at line 52 of file Field.cpp.

References m_alias, and m_field.

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

Destructor.

Definition at line 60 of file Field.cpp.

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.

Definition at line 90 of file Field.cpp.

Referenced by te::serialize::xml::Save().

te::da::Field & te::da::Field::operator= ( const Field rhs)

Assignment operator.

Definition at line 64 of file Field.cpp.

References m_alias, and m_field.

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.

Definition at line 85 of file Field.cpp.

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.

Definition at line 75 of file Field.cpp.

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.

Referenced by Field(), and operator=().

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

A valid expression.

Definition at line 123 of file Field.h.

Referenced by Field(), and operator=().


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