lintel 0.2.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
lintel::db::Arguments Class Reference

#include <Arguments.h>

Public Member Functions

 Arguments (ConnectionType connectionType)
 
void add (Argument &argument)
 
std::size_t size () const
 
bool empty () const
 
Argument & of (std::size_t iterator)
 
const Argument & of (std::size_t iterator) const
 
const Argument & of (const std::string &name) const
 
Iterator begin ()
 
Iterator end ()
 
ConstIterator begin () const
 
ConstIterator end () const
 

Detailed Description

A collection of Argument objects with random-access iteration and lookup by name.

Constructor & Destructor Documentation

◆ Arguments()

lintel::db::Arguments::Arguments ( ConnectionType  connectionType)
explicit

Constructs an Arguments container with the given connection type.

Parameters
connectionTypethe connection type used for typed deserialization

Member Function Documentation

◆ add()

void lintel::db::Arguments::add ( Argument &  argument)
Parameters
argumentthe argument to add

◆ begin() [1/2]

Iterator lintel::db::Arguments::begin ( )
inline
Returns
mutable iterator to the beginning

◆ begin() [2/2]

ConstIterator lintel::db::Arguments::begin ( ) const
inline
Returns
const iterator to the beginning

◆ empty()

bool lintel::db::Arguments::empty ( ) const
Returns
true if there are no arguments

◆ end() [1/2]

Iterator lintel::db::Arguments::end ( )
inline
Returns
mutable iterator past the end

◆ end() [2/2]

ConstIterator lintel::db::Arguments::end ( ) const
inline
Returns
const iterator past the end

◆ of() [1/3]

const Argument & lintel::db::Arguments::of ( const std::string &  name) const

Looks up an argument by name.

Parameters
namethe argument name
Returns
const reference to the matching argument

◆ of() [2/3]

Argument & lintel::db::Arguments::of ( std::size_t  iterator)

Accesses an argument by position (mutable).

Parameters
iteratorthe index
Returns
reference to the argument at that index

◆ of() [3/3]

const Argument & lintel::db::Arguments::of ( std::size_t  iterator) const

Accesses an argument by position (const).

Parameters
iteratorthe index
Returns
const reference to the argument at that index

◆ size()

std::size_t lintel::db::Arguments::size ( ) const
Returns
number of arguments

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