Base Framework
|
#include <base/objectmodel/ObjectModel.h>
Inherits ObjectModel::Value.
Classes | |
class | Element |
Public Types | |
typedef Pair< Reference< String >, Reference< Value > > | Association |
![]() | |
enum | Type { TYPE_VOID, TYPE_BOOLEAN, TYPE_INTEGER, TYPE_FLOAT, TYPE_STRING, TYPE_BINARY, TYPE_ARRAY, TYPE_OBJECT, TYPE_COMMENT } |
Public Member Functions | |
virtual Type | getType () const noexcept override |
MemorySize | getSize () const noexcept |
bool | isEmpty () const noexcept |
bool | hasKey (const Reference< String > &key) const noexcept |
bool | hasKey (const base::String &key) const noexcept |
bool | hasKey (const char *key) const noexcept |
bool | removeKey (const Reference< String > &key) noexcept |
bool | removeKey (const base::String &key) noexcept |
bool | removeKey (const char *key) noexcept |
Reference< Value > | getValue (const Reference< String > &key) const noexcept |
Reference< Value > | getValue (const base::String &key) const noexcept |
Reference< Value > | getValue (const char *key) const noexcept |
void | setValue (const Reference< String > &key, const Reference< Value > &value) |
void | setValue (const Reference< String > &key, const base::String &value) |
void | setValue (const base::String &key, const Reference< Value > &value) |
void | setValue (const base::String &key, NullPtr) |
void | setValue (const base::String &key, const bool value) |
void | setValue (const base::String &key, const int64 value) |
void | setValue (const base::String &key, const double value) |
void | setValue (const base::String &key, const base::String &value) |
void | setValue (const char *key, const char *value) |
Element | getValueImpl (const Reference< String > &key) |
Element | operator[] (const Reference< String > &key) |
Element | operator[] (const base::String &key) |
Element | operator[] (const Literal &key) |
Element | operator[] (const char *key) |
base::Array< Association >::ReadIterator | begin () const |
base::Array< Association >::ReadIterator | end () const |
Reference< Value > | getPath (const char *path, bool forceNull=false) |
Reference< Value > | getPath (const base::String &path, bool forceNull=false) |
bool | getBoolean (const char *path, bool defaultValue) |
int64 | getInteger (const char *path, int64 defaultValue) |
double | getFloat (const char *path, double defaultValue) |
base::String | getString (const char *path, const base::String &defaultValue) |
Reference< Array > | getArray (const char *path) |
Reference< Object > | getObject (const char *path) |
![]() | |
base::String | toString (unsigned int flags=DEFAULT_FORMATTING) const noexcept |
base::String | toStringNoFormatting () const noexcept |
![]() | |
ReferenceCountedObject () noexcept | |
ReferenceCountedObject (const ReferenceCountedObject ©) noexcept | |
ReferenceCountedObject (ReferenceCountedObject &&move) noexcept | |
ReferenceCountedObject & | operator= (const ReferenceCountedObject ©) noexcept |
ReferenceCountedObject & | operator= (ReferenceCountedObject &&move) noexcept |
MemorySize | getNumberOfReferences_INTERNAL () const noexcept |
virtual bool | useGarbageCollector () const noexcept |
![]() | |
DynamicObject () noexcept | |
bool | isValidObject () const noexcept |
virtual | ~DynamicObject () noexcept(false) |
_COM_AZURE_DEV__BASE__OVERRIDE_ALLOC () | |
Public Attributes | |
base::Array< Association > | values |
Returns the array for the given path. Returns the default value if doesn't exist. Raises exception if value isn't an array.
bool ObjectModel::Object::getBoolean | ( | const char * | path, |
bool | defaultValue | ||
) |
Returns the boolean for the given path. Returns the default value if doesn't exist. Raises exception if value isn't a boolean.
double ObjectModel::Object::getFloat | ( | const char * | path, |
double | defaultValue | ||
) |
Returns the float for the given path. Returns the default value if doesn't exist. Raises exception if value isn't a float.
int64 ObjectModel::Object::getInteger | ( | const char * | path, |
int64 | defaultValue | ||
) |
Returns the integer for the given path. Returns the default value if doesn't exist. Raises exception if value isn't an integer.
Returns the object for the given path. Returns the default value if doesn't exist. Raises exception if value isn't an object.
Returns the value at the given path.
https://tools.ietf.org/html/rfc6901
path | The path of the desired value. |
forceNull | Avoid exception if value doesn't exist. Returns nullptr otherwise. |
|
noexcept |
Returns the number of keys in the object.
base::String ObjectModel::Object::getString | ( | const char * | path, |
const base::String & | defaultValue | ||
) |
Returns the string for the given path. Returns the default value if doesn't exist. Raises exception if value isn't a string.
|
inlineoverridevirtualnoexcept |
Returns the type.
Implements ObjectModel::Value.
Returns the value for the given key. Returns nullptr is key doesn't exist.
Returns true if the key exists.
|
inlinenoexcept |
Returns the size of the array.
Removes key if it exists.