CONZEPT 16 C++ API
|
Procedure buffer to operate on procedures of a database. More...
#include "C16/Procedure.hpp"
Procedure buffer to operate on procedures of a database.
Classes | |
class | Compilation |
Compilation of a procedure. More... | |
class | Execution |
Execution of a procedure. More... | |
Public Member Functions | |
Procedure (Database &database) | |
Constructs a procedure buffer. More... | |
Execution | execution (const std::string &function_name) const |
Gets an execution of a function of the procedure. More... | |
template<typename ... Arguments> | |
Variant | execute (const std::string &function_name, Arguments &&... arguments) const |
Executes a function of the procedure. More... | |
Compilation::Error | compile () const |
Compiles the procedure and gets its error. More... | |
Compilation::Result | compile_result (Compilation::ErrorLanguage error_language=Compilation::ErrorLanguage::ENGLISH_US) const |
Compiles the procedure and gets its result. More... | |
![]() | |
Text (Database &database) | |
Constructs a text buffer. More... | |
Database & | database () const |
Gets the database of the text buffer. More... | |
bool | loaded () const |
Gets if a text is loaded into the text buffer. More... | |
const std::string & | name () const |
Gets the name of the loaded text. More... | |
long int | size () const |
Gets the size of the loaded text in units of bytes. More... | |
long int | line_count () const |
Gets the line count of the loaded text. More... | |
const Value::Date & | created_date () const |
Gets the date of the creation of the loaded text. More... | |
const Value::Time & | created_time () const |
Gets the time of the creation of the loaded text. More... | |
const std::string & | created_user () const |
Gets the user who created the loaded text. More... | |
const Value::Date & | modified_date () const |
Gets the date of the last modification of the loaded text. More... | |
const Value::Time & | modified_time () const |
Gets the time of the last modification of the loaded text. More... | |
const std::string & | modified_user () const |
Gets the user who last modified the loaded text. More... | |
const std::string & | group () const |
Gets the group of the loaded text. More... | |
void | group_set (const std::string &group) |
Sets the group of the loaded text. More... | |
int | right_read () const |
Gets the right required by a user to read the loaded text. More... | |
void | right_read_set (int right_read) |
Sets the right required by a user to read the loaded text. More... | |
int | right_write () const |
Gets the right required by a user to write the loaded text. More... | |
void | right_write_set (int right_write) |
Sets the right required by a user to write the loaded text. More... | |
bool | personal () const |
Gets if the loaded text is private. More... | |
void | personal_set (bool personal) |
Sets if the loaded text is private. More... | |
const std::string & | personal_user () const |
Gets the user who set the loaded text to private. More... | |
bool | encrypted () const |
Gets if the loaded text is encrypted. More... | |
void | encrypted_set (bool encrypted) |
Sets if the loaded text is encrypted. More... | |
std::string | content (LineBreak line_break=LineBreak::LF) const |
Gets the content of the loaded text. More... | |
Result | content_set (const std::string &content, LineBreak line_break=LineBreak::LF) |
Sets the content of the loaded text. More... | |
Result | read (const std::string &name, Place place=Place::KEY, Locking locking=Locking::NONE) |
Reads a text by means of a reference name and a place into the text buffer. More... | |
Result | read (Place place, Locking locking=Locking::NONE) |
Reads a text by means of a place into the text buffer. More... | |
Result | reload (Locking locking=Locking::NONE) |
Reloads the loaded text. More... | |
void | unload () |
Unloads the loaded text. More... | |
Result | write (Locking locking=Locking::NONE) |
Writes the loaded text. More... | |
Result | create (const std::string &name, Locking locking=Locking::NONE) |
Creates and loads a text. More... | |
Result | erase () const |
Deletes the loaded text. More... | |
Result | rename (const std::string &name) |
Renames the loaded text. More... | |
Result | copy (const std::string &name) const |
Copies the loaded text. More... | |
Additional Inherited Members | |
![]() | |
enum | LineBreak { LineBreak::NUL, LineBreak::CR, LineBreak::LF, LineBreak::CR_LF } |
Line break. More... | |
![]() | |
static const int | NAME_LENGTH_LIMIT = 20 |
Name length limit. More... | |
static const int | GROUP_LENGTH_LIMIT = 20 |
Group length limit. More... | |
|
explicit |
Constructs a procedure buffer.
database | Database the procedure buffer relates to |
Execution C16::Procedure::execution | ( | const std::string & | function_name | ) | const |
Gets an execution of a function of the procedure.
function_name | Name of the function |
Referenced by execute().
|
inline |
Executes a function of the procedure.
function_name | Name of the function |
arguments | Arguments |
Exception | Procedure execution exception occurred. |
References C16::Procedure::Execution::arguments_add(), C16::Procedure::Execution::execute_error_throw(), and execution().
Compilation::Error C16::Procedure::compile | ( | ) | const |
Compiles the procedure and gets its error.
Exception::Invalidity | Name invalid. |
Compilation::Result C16::Procedure::compile_result | ( | Compilation::ErrorLanguage | error_language = Compilation::ErrorLanguage::ENGLISH_US | ) | const |
Compiles the procedure and gets its result.
error_language | Language of the error text |
Exception::Invalidity | Name invalid. No procedure loaded. |