[DEV] continue removing STL
This commit is contained in:
parent
3006c24262
commit
626c4327e1
@ -6,8 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.hpp>
|
#include <etk/types.hpp>
|
||||||
#include <etk/Hash.hpp>
|
#include <etk/Map.hpp>
|
||||||
#include <algorithm>
|
|
||||||
#include <ejson/Value.hpp>
|
#include <ejson/Value.hpp>
|
||||||
#include <ejson/iterator.hpp>
|
#include <ejson/iterator.hpp>
|
||||||
|
|
||||||
|
@ -342,11 +342,11 @@ bool ejson::internal::Object::add(const etk::String& _name, ememory::SharedPtr<e
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ejson::internal::Object::remove(const etk::String& _name) {
|
void ejson::internal::Object::remove(const etk::String& _name) {
|
||||||
m_value.remove(_name);
|
m_value.erase(_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ejson::internal::Object::remove(size_t _id) {
|
void ejson::internal::Object::remove(size_t _id) {
|
||||||
m_value.remove(getKey(_id));
|
m_value.erase(getKey(_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ejson::internal::Object::transfertIn(ememory::SharedPtr<ejson::internal::Value> _obj) {
|
bool ejson::internal::Object::transfertIn(ememory::SharedPtr<ejson::internal::Value> _obj) {
|
||||||
|
@ -6,8 +6,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.hpp>
|
#include <etk/types.hpp>
|
||||||
#include <etk/Hash.hpp>
|
#include <etk/Map.hpp>
|
||||||
#include <algorithm>
|
|
||||||
#include <ejson/internal/Value.hpp>
|
#include <ejson/internal/Value.hpp>
|
||||||
|
|
||||||
namespace ejson {
|
namespace ejson {
|
||||||
@ -20,7 +19,8 @@ namespace ejson {
|
|||||||
/**
|
/**
|
||||||
* @brief basic element of a xml structure
|
* @brief basic element of a xml structure
|
||||||
*/
|
*/
|
||||||
Object() {
|
Object() :
|
||||||
|
m_value(0, false) { // Force unorder map
|
||||||
m_type = ejson::valueType::object;
|
m_type = ejson::valueType::object;
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
@ -36,8 +36,7 @@ namespace ejson {
|
|||||||
*/
|
*/
|
||||||
static ememory::SharedPtr<Object> create(const etk::String& _data);
|
static ememory::SharedPtr<Object> create(const etk::String& _data);
|
||||||
protected:
|
protected:
|
||||||
// TODO : Change this with a generic methode ...
|
etk::Map<etk::String, ememory::SharedPtr<ejson::internal::Value>> m_value; //!< value of the node (for element this is the name, for text it is the inside text ...)
|
||||||
etk::Hash<ememory::SharedPtr<ejson::internal::Value> > m_value; //!< value of the node (for element this is the name, for text it is the inside text ...)
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief check if an element exist.
|
* @brief check if an element exist.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user