diff --git a/include/matador/object/collection.hpp b/include/matador/object/collection.hpp new file mode 100644 index 0000000..01e49dd --- /dev/null +++ b/include/matador/object/collection.hpp @@ -0,0 +1,17 @@ +#ifndef COLLECTION_HPP +#define COLLECTION_HPP + +#include + +namespace matador::object { + +template < class Type > +class collection { +public: + +private: + +}; + +} +#endif //COLLECTION_HPP diff --git a/include/matador/object/dictionary.hpp b/include/matador/object/dictionary.hpp new file mode 100644 index 0000000..41c4090 --- /dev/null +++ b/include/matador/object/dictionary.hpp @@ -0,0 +1,14 @@ +#ifndef DICTIONARY_HPP +#define DICTIONARY_HPP + +namespace matador::object { + +template < class Key, class Value > +class dictionary { +public: + +private: +}; + +} +#endif //DICTIONARY_HPP diff --git a/include/matador/object/object_proxy.hpp b/include/matador/object/object_proxy.hpp new file mode 100644 index 0000000..9ecbf44 --- /dev/null +++ b/include/matador/object/object_proxy.hpp @@ -0,0 +1,26 @@ +#ifndef OBJECT_PROXY_HPP +#define OBJECT_PROXY_HPP + +#include + +namespace matador::object { + +class basic_object_proxy { +public: + virtual ~basic_object_proxy() = default; + + virtual void *get() const = 0; +}; + +template +class object_proxy : public basic_object_proxy { +public: + void *get() const override { return static_cast(this)->get(); } + + Type* operator->() const { return obj_.get(); } +private: + std::shared_ptr obj_{}; +}; + +} +#endif //OBJECT_PROXY_HPP diff --git a/source/core/CMakeLists.txt b/source/core/CMakeLists.txt index 5805faa..5610b61 100644 --- a/source/core/CMakeLists.txt +++ b/source/core/CMakeLists.txt @@ -6,6 +6,8 @@ add_library(matador-core STATIC ../../include/matador/object/many_to_many_relation.hpp ../../include/matador/object/object_definition.hpp ../../include/matador/object/object_info.hpp + ../../include/matador/object/object_proxy.hpp + ../../include/matador/object/object_ptr.hpp ../../include/matador/object/schema.hpp ../../include/matador/object/schema_node.hpp ../../include/matador/object/schema_node_iterator.hpp