sptk2 logo
SPTK Home Page

sptk::CParamList Class Reference
[Database Support]

Query parameters list. More...

#include <CParams.h>

List of all members.

Public Member Functions

 CParamList ()
 Default constructor.
 ~CParamList ()
 Destructor.
void clear ()
 Removes all the parameters from the list.
CParamfind (const char *paramName)
 Returns parameter by name.
void remove (uint32_t ndx)
 Removes a parameter from the list and from the memory.
CParamoperator[] (uint32_t index) const
 Parameter access by index.
CParamoperator[] (const char *paramName) const
 Parameter access by name.
CParamoperator[] (const std::string &paramName) const
 Parameter access by name.
uint32_t size () const
 Returns parameter count.
void rewind ()
 Sets the parameter stream iterator to the first parameter.
void enumerate (CParamVector &params)
 Returns the parameter pointers.
CParamnext ()

Protected Member Functions

void add (CParam *item)
 Adds a parameter to the list.

Friends

class CQuery


Detailed Description

Query parameters list.

Has internal index to speed up the parameter search by name.

See also:
CQuery

CParam


Member Function Documentation

void sptk::CParamList::clear (  ) 

Removes all the parameters from the list.

Releases any allocated resources

void sptk::CParamList::enumerate ( CParamVector &  params  ) 

Returns the parameter pointers.

A parameter is included for every parameter position in the query.

Parameters:
params CParamVector&, parameters vector

CParam* sptk::CParamList::find ( const char *  paramName  ) 

Returns parameter by name.

If the parameter isn't found, returns 0

Parameters:
paramName const char *, parameter name
Returns:
parameter pointer, or 0 if not found

CParam& sptk::CParamList::next (  ) 

Sets the parameter stream iterator to the next parameter. After the last parameter is reached, the iterator is switch to the first parameter

Returns:
current parameter

CParam& sptk::CParamList::operator[] ( const std::string &  paramName  )  const [inline]

Parameter access by name.

Parameters:
paramName const std::string&, parameter name

CParam& sptk::CParamList::operator[] ( const char *  paramName  )  const

Parameter access by name.

Parameters:
paramName const char *, parameter name

CParam& sptk::CParamList::operator[] ( uint32_t  index  )  const [inline]

Parameter access by index.

Parameters:
index uint32_t, parameter index

void sptk::CParamList::remove ( uint32_t  ndx  ) 

Removes a parameter from the list and from the memory.

Parameters:
ndx uint32_t, parameter index in the list


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

Mon Mar 5 11:56:08 2012: SPTK 3.5.7