Skip to content

Commit

Permalink
Documentation pass for simtime, share/take methods, and knowledge_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
dskyle-shieldai committed Jun 19, 2018
1 parent 72b339f commit aaca105
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 77 deletions.
42 changes: 25 additions & 17 deletions include/madara/knowledge/KnowledgeBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ namespace madara
KnowledgeReferenceSettings (false));

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a string, returns NULL shared_ptr
**/
std::shared_ptr<std::string> share_string(const std::string & key,
Expand All @@ -214,7 +214,7 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a string, returns NULL shared_ptr
**/
std::shared_ptr<std::string> share_string(const VariableReference & key,
Expand All @@ -234,8 +234,9 @@ namespace madara
}

/**
* Returns a shared_ptr, while resetting this record to empty.
* @return a shared_ptr, while resetting this record to empty.
* If this record is not a string, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::string> take_string(const std::string & key,
const KnowledgeReferenceSettings & settings =
Expand All @@ -254,8 +255,9 @@ namespace madara
}

/**
* Returns a shared_ptr, while resetting this record to empty.
* @return a shared_ptr, while resetting this record to empty.
* If this record is not a string, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::string> take_string(const VariableReference & key,
const KnowledgeReferenceSettings & settings =
Expand All @@ -274,7 +276,7 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not an integer array, returns NULL shared_ptr
**/
std::shared_ptr<std::vector<KnowledgeRecord::Integer>>
Expand All @@ -295,7 +297,7 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not an integer array, returns NULL shared_ptr
**/
std::shared_ptr<std::vector<KnowledgeRecord::Integer>>
Expand All @@ -316,8 +318,9 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not an integer array, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::vector<KnowledgeRecord::Integer>>
take_integers(const std::string & key,
Expand All @@ -337,8 +340,9 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not an integer array, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::vector<KnowledgeRecord::Integer>>
take_integers(const VariableReference & key,
Expand All @@ -358,7 +362,7 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a doubles array, returns NULL shared_ptr
**/
std::shared_ptr<std::vector<double>>
Expand All @@ -379,7 +383,7 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a doubles array, returns NULL shared_ptr
**/
std::shared_ptr<std::vector<double>>
Expand All @@ -400,8 +404,9 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a doubles array, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::vector<double>>
take_doubles(const std::string & key,
Expand All @@ -421,8 +426,9 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a doubles array, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::vector<double>>
take_doubles(const VariableReference & key,
Expand All @@ -442,7 +448,7 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a binary file, returns NULL shared_ptr
**/
std::shared_ptr<std::vector<unsigned char>>
Expand All @@ -463,7 +469,7 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a binary file, returns NULL shared_ptr
**/
std::shared_ptr<std::vector<unsigned char>>
Expand All @@ -484,8 +490,9 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a binary file, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::vector<unsigned char>>
take_binary(const std::string & key,
Expand All @@ -505,8 +512,9 @@ namespace madara
}

/**
* Returns a shared_ptr, sharing with the internal one.
* @return a shared_ptr, sharing with the internal one.
* If this record is not a binary file, returns NULL shared_ptr
* and this record is unmodified.
**/
std::shared_ptr<std::vector<unsigned char>>
take_binary(const VariableReference & key,
Expand Down Expand Up @@ -1231,7 +1239,7 @@ namespace madara
std::string setup_unique_hostport (const std::string & host = "");

/**
* Returns a non-const reference to the Transport Settings
* @return a non-const reference to the Transport Settings
* @return settings reference
**/
madara::transport::TransportSettings & transport_settings (void);
Expand Down

0 comments on commit aaca105

Please sign in to comment.