[DEV] update json new API

This commit is contained in:
Edouard DUPIN 2015-01-13 21:18:31 +01:00
parent 1cc5144acc
commit 9ae33b1aca
3 changed files with 11 additions and 11 deletions

View File

@ -165,16 +165,16 @@ std::shared_ptr<ege::Element> ege::Environement::createElement(const std::string
return tmpElement;
}
std::shared_ptr<ege::Element> ege::Environement::createElement(const std::string& _type, std::string& _description, bool _autoAddElement) {
return createElement(_type, _autoAddElement, ege::typeString, static_cast<void*>(&_description));
std::shared_ptr<ege::Element> ege::Environement::createElement(const std::string& _type, std::shared_ptr<std::string> _description, bool _autoAddElement) {
return createElement(_type, _autoAddElement, ege::typeString, std::static_pointer_cast<void>(&_description));
}
std::shared_ptr<ege::Element> ege::Environement::createElement(const std::string& _type, ejson::Value* _value, bool _autoAddElement) {
return createElement(_type, _autoAddElement, ege::typeJson, static_cast<void*>(_value));
std::shared_ptr<ege::Element> ege::Environement::createElement(const std::string& _type, std::shared_ptr<ejson::Value> _value, bool _autoAddElement) {
return createElement(_type, _autoAddElement, ege::typeJson, std::static_pointer_cast<void>(_value));
}
std::shared_ptr<ege::Element> ege::Environement::createElement(const std::string& _type, exml::Node* _node, bool _autoAddElement) {
return createElement(_type, _autoAddElement, ege::typeXml, static_cast<void*>(_node));
std::shared_ptr<ege::Element> ege::Environement::createElement(const std::string& _type, std::shared_ptr<exml::Node> _node, bool _autoAddElement) {
return createElement(_type, _autoAddElement, ege::typeXml, std::static_pointer_cast<void>(_node));
}

View File

@ -177,10 +177,10 @@ namespace ege {
* @return nullptr if an error occured OR the pointer on the element and it is already added on the system.
* @note Pointer is return in case of setting properties on it...
*/
std::shared_ptr<ege::Element> createElement(const std::string& _type, bool _autoAddElement=true, enum ege::property _property=ege::typeNone, void* _value=nullptr);
std::shared_ptr<ege::Element> createElement(const std::string& _type, std::string& _description, bool _autoAddElement=true);
std::shared_ptr<ege::Element> createElement(const std::string& _type, ejson::Value* _value, bool _autoAddElement=true);
std::shared_ptr<ege::Element> createElement(const std::string& _type, exml::Node* _node, bool _autoAddElement=true);
std::shared_ptr<ege::Element> createElement(const std::string& _type, bool _autoAddElement=true, enum ege::property _property=ege::typeNone, std::shared_ptr<void> _value=nullptr);
std::shared_ptr<ege::Element> createElement(const std::string& _type, std::shared_ptr<std::string> _description, bool _autoAddElement=true);
std::shared_ptr<ege::Element> createElement(const std::string& _type, std::shared_ptr<ejson::Value> _value, bool _autoAddElement=true);
std::shared_ptr<ege::Element> createElement(const std::string& _type, std::shared_ptr<exml::Node> _node, bool _autoAddElement=true);
public:
class ResultNearestElement {
public:

View File

@ -54,7 +54,7 @@ namespace ege {
* @param[in] _value pointer on the value type
* @return true, the element is corectly initialized.
*/
virtual bool init(enum property _property, void* _value) {
virtual bool init(enum property _property, std::shared_ptr<void> _value) {
return false;
};
virtual bool unInit() {