|
@@ -22,6 +22,13 @@ namespace Core {
|
|
|
return key;
|
|
|
}
|
|
|
|
|
|
+ template<int L>
|
|
|
+ check_return Error toString(ArrayString<L>& s) const {
|
|
|
+ CORE_RETURN_ERROR(s.append(key));
|
|
|
+ CORE_RETURN_ERROR(s.append(" = "));
|
|
|
+ return s.append(value);
|
|
|
+ }
|
|
|
+
|
|
|
private:
|
|
|
template<typename... Args>
|
|
|
Node(const K& key_, Args&&... args)
|
|
@@ -256,20 +263,7 @@ namespace Core {
|
|
|
|
|
|
template<int L>
|
|
|
check_return Error toString(ArrayString<L>& s) const {
|
|
|
- CORE_RETURN_ERROR(s.append("["))
|
|
|
- bool c = false;
|
|
|
- for(const NodePointerList& list : nodePointers) {
|
|
|
- for(const NodePointer& n : list) {
|
|
|
- if(c) {
|
|
|
- CORE_RETURN_ERROR(s.append(", "))
|
|
|
- }
|
|
|
- CORE_RETURN_ERROR(s.append(n->data.key))
|
|
|
- CORE_RETURN_ERROR(s.append(" = "))
|
|
|
- CORE_RETURN_ERROR(s.append(n->data.value))
|
|
|
- c = true;
|
|
|
- }
|
|
|
- }
|
|
|
- return s.append("]");
|
|
|
+ return Core::toString(s, *this);
|
|
|
}
|
|
|
|
|
|
private:
|