Skip to content

Commit

Permalink
fix: completing method and parameters description
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioDonda committed Aug 13, 2024
1 parent ce05ec6 commit df461c2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/agent/agent_queue/include/agent_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class MultiTypeQueue
bool pop(MessageType type, const std::string moduleName = "");

/**
* @brief
* @brief deletes N messages from a queue
*
* @param type
* @param moduleName
Expand Down
50 changes: 25 additions & 25 deletions src/agent/agent_queue/include/persistence.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,61 +21,61 @@ class Persistence
virtual ~Persistence() = default;

/**
* @brief
* @brief Store a JSON message in the specified queue.
*
* @param message
* @param queueName
* @param moduleName
* @param message The JSON message to be stored.
* @param queueName The name of the queue.
* @param moduleName The name of the module.
* @return int
*/
virtual int Store(const json& message, const std::string& queueName, const std::string& moduleName = "") = 0;

/**
* @brief
* @brief Retrieve a JSON message from the specified queue.
*
* @param id
* @param queueName
* @param moduleName
* @return json
* @param id rowid of the message to be retrieved.
* @param queueName The name of the queue.
* @param moduleName The name of the module.
* @return json The retrieved JSON message.
*/
virtual json Retrieve(int id, const std::string& queueName, const std::string& moduleName = "") = 0;

/**
* @brief
* @brief Retrieve multiple JSON messages from the specified queue.
*
* @param n
* @param queueName
* @param moduleName
* @param n number of messages to be retrieved.
* @param queueName The name of the queue.
* @param moduleName The name of the module.
* @return json
*/
virtual json RetrieveMultiple(int n, const std::string& queueName, const std::string& moduleName = "") = 0;

/**
* @brief
* @brief Remove a JSON message from the specified queue.
*
* @param id
* @param queueName
* @param moduleName
* @param id number of messages to be removed.
* @param queueName The name of the queue.
* @param moduleName The name of the module.
* @return int
*/
virtual int Remove(int id, const std::string& queueName, const std::string& moduleName = "") = 0;

/**
* @brief
* @brief Remove multiple JSON messages from the specified queue.
*
* @param n
* @param queueName
* @param moduleName
* @param n number of messages to be removed.
* @param queueName The name of the queue.
* @param moduleName The name of the module.
* @return int
*/
virtual int RemoveMultiple(int n, const std::string& queueName, const std::string& moduleName = "") = 0;

/**
* @brief Get the Element Count object
* @brief Get the quantity of elements stored in the specified queue.
*
* @param queueName
* @param moduleName
* @return int
* @param queueName The name of the queue.
* @param moduleName The name of the module.
* @return int The quantity of elements stored in the specified queue.
*/
virtual int GetElementCount(const std::string& queueName, const std::string& moduleName = "") = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion src/agent/agent_queue/include/shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum MessageType
};

/**
* @brief Wrapper for Message data and type
* @brief Wrapper for Message, contains the message type, the json data and the module name.
*
*/
class Message
Expand Down
6 changes: 3 additions & 3 deletions src/agent/agent_queue/include/sqlitestorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SQLiteStorage : public Persistence
*
* @param message The JSON message to store.
* @param tableName The name of the table to store the message in.
* @param moduleName
* @param moduleName The name of the module that created the message.
* @return The number of stored elements.
*/
int Store(const json& message, const std::string& tableName, const std::string& moduleName = "") override;
Expand All @@ -73,7 +73,7 @@ class SQLiteStorage : public Persistence
* @brief Remove a JSON message by its ID.
*
* @param id The ID of the message to remove.
* @param moduleName
* @param moduleName The name of the module that created the message.
* @return The number of removed elements.
*/
int Remove(int id, const std::string& tableName, const std::string& moduleName = "") override;
Expand All @@ -82,7 +82,7 @@ class SQLiteStorage : public Persistence
* @brief Remove multiple JSON messages.
*
* @param n The number of messages to remove.
* @param moduleName
* @param moduleName The name of the module that created the message.
* @return The number of removed elements.
*/
int RemoveMultiple(int n, const std::string& tableName, const std::string& moduleName = "") override;
Expand Down

0 comments on commit df461c2

Please sign in to comment.