add missing comments to verb header

This commit is contained in:
Chris Cromer 2023-02-16 00:34:45 -03:00
parent 5a884fa2a0
commit 6062004f67
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
1 changed files with 72 additions and 0 deletions

View File

@ -7,46 +7,118 @@
namespace obelisk namespace obelisk
{ {
/**
* @brief The Verb model represents a verb which is used to connnect
* entities.
*
*/
class Verb class Verb
{ {
private: private:
/**
* @brief The ID of the Verb in the knowledge base.
*
*/
int id_; int id_;
/**
* @brief The name of the Verb.
*
*/
std::string name_; std::string name_;
public: public:
/**
* @brief Construct a new Verb object.
*
*/
Verb() : Verb() :
id_(0), id_(0),
name_("") name_("")
{ {
} }
/**
* @brief Construct a new Verb object.
*
* @param[in] id The ID of the Verb.
*/
Verb(int id) : Verb(int id) :
id_(id), id_(id),
name_("") name_("")
{ {
} }
/**
* @brief Construct a new Verb object.
*
* @param[in] name The name of the Verb.
*/
Verb(std::string name) : Verb(std::string name) :
id_(0), id_(0),
name_(name) name_(name)
{ {
} }
/**
* @brief Construct a new Verb object.
*
* @param[in] id The ID of the Verb.
* @param[in] name The name of the Verb.
*/
Verb(int id, std::string name) : Verb(int id, std::string name) :
id_(id), id_(id),
name_(name) name_(name)
{ {
} }
/**
* @brief Create the Verb table in the KnowledgeBase.
*
* @return const char* Returns the query used to create the table.
*/
static const char* createTable(); static const char* createTable();
/**
* @brief Get the ID of the Verb.
*
* @return int& Returns the ID.
*/
int& getId(); int& getId();
/**
* @brief Set the ID of the Verb.
*
* @param[in] id Set the ID of the Verb.
*/
void setId(int id); void setId(int id);
/**
* @brief Get the name of the Verb.
*
* @return std::string& The Verb name.
*/
std::string& getName(); std::string& getName();
/**
* @brief Set the name of the Verb.
*
* @param[in] name The Verb name.
*/
void setName(std::string name); void setName(std::string name);
/**
* @brief Select a verb by name from the KnowledgeBase.
*
* @param[in] dbConnection The database connection to use.
*/
void selectVerb(sqlite3* dbConnection); void selectVerb(sqlite3* dbConnection);
/**
* @brief Insert a new verb into the KnowledgeBase.
*
* @param[in] dbConnection The database connection to use.
*/
void insertVerb(sqlite3* dbConnection); void insertVerb(sqlite3* dbConnection);
}; };
} // namespace obelisk } // namespace obelisk