CONZEPT 16 C++ API
C16::Tables Class Referenceabstract

Tables of a database. More...

#include "C16/Tables.hpp"

Detailed Description

Tables of a database.

Examples

Iteration

#include "C16/Library.hpp"
using namespace C16;
void tables_iterate(const Database& database)
{
for (const Table& table : database.tables())
{
...
}
}

Classes

class  IteratorConst
 const-Iterator for tables of a database. More...
 

Public Member Functions

virtual Databasedatabase () const =0
 Gets the database of the tables. More...
 
virtual const Tableget (int number) const =0
 Gets a table by means of its number. More...
 
virtual const Tableget (const std::string &name) const =0
 Gets a table by means of its name. More...
 
virtual const Tableget_if_existent (int number) const =0
 Gets a table by means of its number, if existent. More...
 
virtual const Tableget_if_existent (const std::string &name) const =0
 Gets a table by means of its name, if existent. More...
 
IteratorConst begin () const noexcept
 Gets a const-iterator of the first table. More...
 
IteratorConst end () const noexcept
 Gets a const-iterator of the table following the last table. More...
 
IteratorConst rbegin () const noexcept
 Gets a const-iterator of the last table. More...
 
IteratorConst rend () const noexcept
 Gets a const-iterator of the table preceding the first table. More...
 

Member Function Documentation

◆ database()

virtual Database& C16::Tables::database ( ) const
pure virtual

Gets the database of the tables.

◆ get() [1/2]

virtual const Table& C16::Tables::get ( int  number) const
pure virtual

Gets a table by means of its number.

Parameters
numberNumber of the table
Exceptions
Exception::InexistenceTable inexistent.

◆ get() [2/2]

virtual const Table& C16::Tables::get ( const std::string &  name) const
pure virtual

Gets a table by means of its name.

Parameters
nameName of the table (case insensitive)
Exceptions
Exception::InexistenceTable inexistent.

◆ get_if_existent() [1/2]

virtual const Table* C16::Tables::get_if_existent ( int  number) const
pure virtual

Gets a table by means of its number, if existent.

Parameters
numberNumber of the table
Return values
!= nullptrPointer to the table.
nullptrTable inexistent.

◆ get_if_existent() [2/2]

virtual const Table* C16::Tables::get_if_existent ( const std::string &  name) const
pure virtual

Gets a table by means of its name, if existent.

Parameters
nameName of the table (case insensitive)
Return values
!= nullptrPointer to the table.
nullptrTable inexistent.

◆ begin()

IteratorConst C16::Tables::begin ( ) const
noexcept

Gets a const-iterator of the first table.

◆ end()

IteratorConst C16::Tables::end ( ) const
noexcept

Gets a const-iterator of the table following the last table.

◆ rbegin()

IteratorConst C16::Tables::rbegin ( ) const
noexcept

Gets a const-iterator of the last table.

◆ rend()

IteratorConst C16::Tables::rend ( ) const
noexcept

Gets a const-iterator of the table preceding the first table.

C16::Database::tables
const Tables & tables() const
Gets the tables of the database.
Library.hpp
CONZEPT 16 C++ API.
C16::Database
Database hosted by a server.
Definition: Database.hpp:38
C16::Tables::database
virtual Database & database() const =0
Gets the database of the tables.
C16
Namespace.
Definition: Array.hpp:6
C16::Table
Table of a database.
Definition: Table.hpp:21