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

Keys of a database. More...

#include "C16/Keys.hpp"

Detailed Description

Keys of a database.

Public Member Functions

virtual Databasedatabase () const =0
 Gets the database of the keys. More...
 
virtual const Keyget (int table_number, int number) const =0
 Gets a key by means of the number of the table and the number of the key. More...
 
virtual const Keyget (const std::string &name) const =0
 Gets a key by means of its name. More...
 
virtual const Keyget (int table_number, const std::string &name) const =0
 Gets a key by means of the number of the table and the name of the key. More...
 
virtual const Keyget_if_existent (int table_number, int number) const =0
 Gets a key by means of the number of the table and the number of the key, if existent. More...
 
virtual const Keyget_if_existent (const std::string &name) const =0
 Gets a key by means of its name, if existent. More...
 
virtual const Keyget_if_existent (int table_number, const std::string &name) const =0
 Gets a key by means of the number of the table and the name of the key, if existent. More...
 

Member Function Documentation

◆ database()

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

Gets the database of the keys.

◆ get() [1/3]

virtual const Key& C16::Keys::get ( int  table_number,
int  number 
) const
pure virtual

Gets a key by means of the number of the table and the number of the key.

Parameters
table_numberNumber of the table
numberNumber of the key
Exceptions
Exception::InexistenceKey inexistent.

◆ get() [2/3]

virtual const Key& C16::Keys::get ( const std::string &  name) const
pure virtual

Gets a key by means of its name.

Parameters
nameName of the key (case insensitive)
Exceptions
Exception::InexistenceKey inexistent.

◆ get() [3/3]

virtual const Key& C16::Keys::get ( int  table_number,
const std::string &  name 
) const
pure virtual

Gets a key by means of the number of the table and the name of the key.

Parameters
table_numberNumber of the table
nameName of the key (case insensitive)
Exceptions
Exception::InexistenceKey inexistent.

◆ get_if_existent() [1/3]

virtual const Key* C16::Keys::get_if_existent ( int  table_number,
int  number 
) const
pure virtual

Gets a key by means of the number of the table and the number of the key, if existent.

Parameters
table_numberNumber of the table
numberNumber of the key
Return values
!= nullptrPointer to the key.
nullptrKey inexistent.

◆ get_if_existent() [2/3]

virtual const Key* C16::Keys::get_if_existent ( const std::string &  name) const
pure virtual

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

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

◆ get_if_existent() [3/3]

virtual const Key* C16::Keys::get_if_existent ( int  table_number,
const std::string &  name 
) const
pure virtual

Gets a key by means of the number of the table and the name of the key, if existent.

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