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

Texts of a database. More...

#include "C16/Texts.hpp"

Inheritance diagram for C16::Texts:
C16::Procedures

Detailed Description

Texts of a database.

Public Member Functions

virtual Databasedatabase () const =0
 Gets the database of the texts. More...
 
virtual Result create (const std::string &name, Locking locking=Locking::NONE)=0
 Creates a text. More...
 
virtual Result erase (const std::string &name)=0
 Deletes a text. More...
 
virtual Result rename (const std::string &name, const std::string &name_renamed)=0
 Renames a text. More...
 
virtual Result copy (const std::string &name, const std::string &name_copy)=0
 Copies a text. More...
 

Member Function Documentation

◆ database()

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

Gets the database of the texts.

◆ create()

virtual Result C16::Texts::create ( const std::string &  name,
Locking  locking = Locking::NONE 
)
pure virtual

Creates a text.

Parameters
nameName of the text (1 to Text::NAME_LENGTH_LIMIT characters)
lockingLocking to apply to the text
Locking::NONEDoes not lock the text.
Locking::LOCK_EXCLUSIVEApplies an exclusive lock to the text.
Returns
Result
Return values
Result::OKText created and locking applied.
Result::EXISTSText with same name (case insensitive) already existent.
Result::DEADLOCKDeadlock occurred.
Exceptions
Exception::InvalidityName invalid.
Exception::InvalidityLocking invalid.
See also
Text::create

◆ erase()

virtual Result C16::Texts::erase ( const std::string &  name)
pure virtual

Deletes a text.

Parameters
nameName of the text (case insensitive, 1 to Text::NAME_LENGTH_LIMIT characters)
Returns
Result
Return values
Result::OKText deleted.
Result::LOCKEDText locked.
Result::NO_KEYText inexistent.
Result::NO_RIGHTSPermissions insufficient.
Result::DEADLOCKDeadlock occurred.
Exceptions
Exception::InvalidityName invalid.
See also
Text::erase

◆ rename()

virtual Result C16::Texts::rename ( const std::string &  name,
const std::string &  name_renamed 
)
pure virtual

Renames a text.

Parameters
nameName of the text (case insensitive, 1 to Text::NAME_LENGTH_LIMIT characters)
name_renamedName of the text after renaming it (1 to Text::NAME_LENGTH_LIMIT characters)
Returns
Result
Return values
Result::OKText renamed.
Result::LOCKEDText locked.
Result::NO_KEYText inexistent.
Result::EXISTSText with same name (case insensitive) already existent.
Result::NO_RIGHTSPermissions insufficient.
Exceptions
Exception::InvalidityName invalid.
See also
Text::rename

◆ copy()

virtual Result C16::Texts::copy ( const std::string &  name,
const std::string &  name_copy 
)
pure virtual

Copies a text.

Parameters
nameName of the text (case insensitve, 1 to Text::NAME_LENGTH_LIMIT characters)
name_copyName of the copy of the text (1 to Text::NAME_LENGTH_LIMIT characters)
Returns
Result
Return values
Result::OKText copied.
Result::LOCKEDText locked.
Result::NO_KEYText inexistent.
Result::EXISTSText with same name (case insensitive) already existent.
Result::NO_RIGHTSPermissions insufficient.
Result::DEADLOCKDeadlock occurred.
Exceptions
Exception::InvalidityName invalid.
See also
Text::copy