From 57768192674f3df29149de4f637f775d6447b638 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Wed, 22 Jan 2025 11:31:21 -0500 Subject: [PATCH] docs(DObject.h): usage examples added to DObject.h --- src/dobj/public/DObject.h | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/dobj/public/DObject.h b/src/dobj/public/DObject.h index fee5951..9a3102a 100644 --- a/src/dobj/public/DObject.h +++ b/src/dobj/public/DObject.h @@ -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 + * - std::vector + * - std::vector + * - std::vector + * - std::vector> + * - std::vector> + * - std::vector> + * - std::vector>> + * - std::vector>> + * - std::vector> + * + * + * 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 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: