54 #ifndef _GAMS_UTILITY_CONTAINERIZE_H_
55 #define _GAMS_UTILITY_CONTAINERIZE_H_
61 #include "madara/knowledge/KnowledgeBase.h"
119 const std::string& name =
"");
135 madara::knowledge::KnowledgeBase& kb,
136 const std::string& name =
"");
156 REGION_TYPE_ID = 0x00000001,
157 PRIORITIZED_REGION_TYPE_ID = 0x00000002,
158 SEARCH_AREA_TYPE_ID = 0x00000004,
159 INVALID = 0x80000000,
170 const std::string& name,
const Class_ID& expected)
const;
179 const std::string& name);
189 madara::knowledge::KnowledgeBase& kb,
190 const std::string& name)
const = 0;
198 madara::knowledge::KnowledgeBase& kb,
199 const std::string& name) = 0;
207 madara::knowledge::KnowledgeBase& kb,
208 const std::string& name) = 0;
A class meant to assist with retrieving information into GAMS containers.
std::string name_
name of this object
void set_knowledge_base(madara::knowledge::KnowledgeBase *kb)
Set knowledge base to use.
virtual bool check_valid_type(madara::knowledge::KnowledgeBase &kb, const std::string &name) const =0
Check if object is of correct type.
Containerize(const std::string &n="")
Constructor.
bool from_container(const std::string &name="")
Load object from knowledge base.
virtual bool from_container_impl(madara::knowledge::KnowledgeBase &kb, const std::string &name)=0
Load object from knowledge base.
virtual ~Containerize()
Destructor.
std::string get_name() const
Get name of the object.
void set_name(const std::string &n)
Set name of the object.
madara::knowledge::KnowledgeBase * prev_kb_
previous knowledge base used for sending objects
bool from_container(madara::knowledge::KnowledgeBase &kb, const std::string &name="")
Load object from knowledge base.
void to_container(madara::knowledge::KnowledgeBase &kb, const std::string &name="")
Store object in knowledge base.
virtual void to_container_impl(madara::knowledge::KnowledgeBase &kb, const std::string &name)=0
Store object in knowledge base.
void modify()
Resend the information in the container using same knowledge base as previous to_container.
static Class_ID get_type(madara::knowledge::KnowledgeBase &kb, const std::string &name)
Gets type of object in database.
Class_ID
These are used to check on the type of the object in from_container.
static const std::string object_type_suffix_
object type suffix
void to_container(const std::string &name="")
Store object in knowledge base used previously.
bool is_valid_type(madara::knowledge::KnowledgeBase &kb, const std::string &name, const Class_ID &expected) const
Check if the type is correct.
Contains all GAMS-related tools, classes and code.