|
|
@ -27,17 +27,25 @@ public: |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void clear() { m_members.clear(); } |
|
|
|
// Capacity
|
|
|
|
void emplace(const std::string& name, Value value); |
|
|
|
|
|
|
|
|
|
|
|
bool empty() const { return m_members.empty(); } |
|
|
|
|
|
|
|
size_t size() const { return m_members.size(); } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Member access
|
|
|
|
|
|
|
|
|
|
|
|
Value& operator[](const std::string& name); |
|
|
|
Value& operator[](const std::string& name); |
|
|
|
|
|
|
|
|
|
|
|
Value& at(const std::string& name) { return m_members.at(name); } |
|
|
|
Value& at(const std::string& name) { return m_members.at(name); } |
|
|
|
const Value& at(const std::string& name) const { return m_members.at(name); } |
|
|
|
const Value& at(const std::string& name) const { return m_members.at(name); } |
|
|
|
|
|
|
|
|
|
|
|
size_t size() const { return m_members.size(); } |
|
|
|
|
|
|
|
const std::map<std::string, Value>& members() const { return m_members; } |
|
|
|
const std::map<std::string, Value>& members() const { return m_members; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Modifiers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void clear() { m_members.clear(); } |
|
|
|
|
|
|
|
void emplace(const std::string& name, Value value); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
std::map<std::string, Value> m_members; |
|
|
|
std::map<std::string, Value> m_members; |
|
|
|
}; |
|
|
|
}; |
|
|
|