docs(DObject.h): usage examples added to DObject.h
This commit is contained in:
@@ -24,6 +24,47 @@
|
||||
*
|
||||
* The DObject class is designed to store arbitrary data alongside descriptive metadata.
|
||||
* It supports plugin registration to allow extensible functionality.
|
||||
*
|
||||
* The general purpose of this is to simplify memory managment, function interfaces,
|
||||
* and interoperability with other languages by wrapping all of that up inside of
|
||||
* one location (DObject). There are still a limited number of types that DOBject can
|
||||
* represent these include
|
||||
* - bool
|
||||
* - short int
|
||||
* - int
|
||||
* - long int
|
||||
* - float
|
||||
* - double
|
||||
* - long double
|
||||
* - std::string
|
||||
* - std::monostate
|
||||
* - std::vector<int>
|
||||
* - std::vector<float>
|
||||
* - std::vector<double>
|
||||
* - std::vector<std::string>
|
||||
* - std::vector<std::vector<int>>
|
||||
* - std::vector<std::vector<float>>
|
||||
* - std::vector<std::vector<double>>
|
||||
* - std::vector<std::vector<std::vector<int>>>
|
||||
* - std::vector<std::vector<std::vector<float>>>
|
||||
* - std::vector<std::vector<std::vector<double>>
|
||||
*
|
||||
*
|
||||
* If more types are needed, they can be added to the DataType variant.
|
||||
*
|
||||
* In general the usage of this might look like
|
||||
* @code
|
||||
* DObject obj;
|
||||
* std::vector<int> data = {1, 2, 3, 4, 5};
|
||||
* obj.setData(data);
|
||||
* std::cout << "Data is " << obj << std::end;
|
||||
* someFunction(&obj);
|
||||
* @endcode
|
||||
*
|
||||
* All memory managment should be taken care of
|
||||
* as all datatypes accepted by the varient are either primatives or
|
||||
* include their own built in memory managment (i.e. this means that
|
||||
* wherever possible vectors should be used in place of raw arrays).
|
||||
*/
|
||||
class DObject {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user