jstring changes
This commit is contained in:
1 parent
8f8c14d7b2
commit
f39bdc98f6
9 files changed
+92
-19
No files matched your search
@@ -11,19 +11,44 @@ namespace coreutils {
|
||||
/// Use the JString object when you need a JSON interface to C++. JString uses
|
||||
/// an MString to store a JSON string representing the object(s) contained.
|
||||
/// The [] operator is overriden from the ZString and provides a method to
|
||||
/// access the objects elements using a named path as the index to the items.
|
||||
/// access the objects elements using a named path as the index to the items.
|
||||
///
|
||||
|
||||
class JString : public MString {
|
||||
|
||||
public:
|
||||
|
||||
MString & operator[](char *key);
|
||||
JString();
|
||||
JString(const char *data);
|
||||
|
||||
MString & operator[](ZString &key);
|
||||
void set(ZString path, const char *value);
|
||||
|
||||
///
|
||||
/// Use the find method to look through an object for member specified by
|
||||
/// the key in parameter 1. The cursor must be pointing to the { character
|
||||
/// that begins the object's list.
|
||||
///
|
||||
|
||||
ZString find(ZString path);
|
||||
|
||||
void operator=(ZString &value);
|
||||
JString& operator=(const char *value);
|
||||
|
||||
// ZString operator[](const char *path);
|
||||
JString& operator[](const char *path);
|
||||
// operator const ZString () const {
|
||||
// return *this;
|
||||
// }
|
||||
|
||||
// MString & operator[](ZString &key);
|
||||
|
||||
// MString & operator[](std::string key);
|
||||
|
||||
private:
|
||||
bool locate(ZString path);
|
||||
bool notfirst;
|
||||
MString path;
|
||||
|
||||
MString & operator[](std::string key);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user