develop #15

Merged
cromer merged 64 commits from develop into master 2023-02-23 01:11:48 -03:00
Showing only changes of commit 26a861772c - Show all commits

View File

@ -5,43 +5,104 @@
namespace obelisk namespace obelisk
{ {
/**
* @brief The Action model represents an action to take when a fact is true
* or false.
*
*/
class Action class Action
{ {
private: private:
/**
* @brief The ID of the action in the knowledge base.
*
*/
int id_; int id_;
/**
* @brief The name of the action.
*
*/
std::string name_; std::string name_;
public: public:
/**
* @brief Construct a new Action object.
*
*/
Action() : Action() :
id_(0), id_(0),
name_("") name_("")
{ {
} }
/**
* @brief Construct a new Action object.
*
* @param[in] id The ID of the action.
*/
Action(int id) : Action(int id) :
id_(id), id_(id),
name_("") name_("")
{ {
} }
/**
* @brief Construct a new Action object.
*
* @param[in] name The name of the action.
*/
Action(std::string name) : Action(std::string name) :
id_(0), id_(0),
name_(name) name_(name)
{ {
} }
/**
* @brief Construct a new Action object.
*
* @param[in] id The ID of the action.
* @param[in] name The name of the action.
*/
Action(int id, std::string name) : Action(int id, std::string name) :
id_(id), id_(id),
name_(name) name_(name)
{ {
} }
/**
* @brief Create the action table in the knowledge base.
*
* @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 action.
*
* @return int& Returns the ID.
*/
int& getId(); int& getId();
/**
* @brief Set the ID of the action.
*
* @param[in] id Set the ID of the action.
*/
void setId(int id); void setId(int id);
/**
* @brief Get the name of the action.
*
* @return std::string& The action name.
*/
std::string& getName(); std::string& getName();
/**
* @brief Set the name of the action.
*
* @param[in] name The name of the action.
*/
void setName(std::string name); void setName(std::string name);
}; };
} // namespace obelisk } // namespace obelisk