OpendTect 8.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Friends | List of all members
OD::JSON::Object Class Reference

ValueSet where the values and subsets have a key. More...

#include <odjson.h>

Inheritance diagram for OD::JSON::Object:
[legend]

Public Member Functions

 Object (const Object &)
 
 Object (ValueSet *p=nullptr)
 
 ~Object ()
 
Objectclone () const override
 
template<class T >
bool get (const char *, Array1D< T > &) const
 
template<class T >
bool get (const char *, Array2D< T > &) const
 
template<class T >
bool get (const char *, Interval< T > &) const
 
ArraygetArray (const BufferStringSet &bskey)
 
const ArraygetArray (const BufferStringSet &bskey) const
 
ArraygetArray (const char *ky)
 
const ArraygetArray (const char *ky) const
 
bool getBoolValue (const char *) const
 
bool getBoolValue (const OD::String &str) const
 
bool getBoolValue (idx_type idx) const override
 
ValueSetgetChild (const BufferStringSet &bskey)
 
const ValueSetgetChild (const BufferStringSet &bskey) const
 
ValueSetgetChild (const char *ky)
 
const ValueSetgetChild (const char *ky) const
 
double getDoubleValue (const char *) const
 
double getDoubleValue (const OD::String &str) const
 
double getDoubleValue (idx_type idx) const override
 
FilePath getFilePath (const char *) const
 
FilePath getFilePath (const OD::String &str) const
 
FilePath getFilePath (idx_type idx) const override
 
bool getGeomID (const char *, Pos::GeomID &) const
 
od_int64 getIntValue (const char *) const
 
od_int64 getIntValue (const OD::String &str) const
 
od_int64 getIntValue (idx_type idx) const override
 
MultiID getMultiID (const char *) const
 
ObjectgetObject (const BufferStringSet &bskey)
 
const ObjectgetObject (const BufferStringSet &bskey) const
 
ObjectgetObject (const char *ky)
 
const ObjectgetObject (const char *ky) const
 
bool getStrings (const char *, BufferStringSet &) const
 
BufferString getStringValue (const char *) const
 
BufferString getStringValue (const OD::String &str) const
 
BufferString getStringValue (idx_type idx) const override
 
void getSubObjKeys (BufferStringSet &) const
 
idx_type indexOf (const char *) const
 
bool isArray () const override
 
bool isPresent (const char *ky) const
 
Objectoperator= (const Object &)=delete
 
void remove (const char *)
 
Arrayset (const char *ky, Array *)
 
void set (const char *ky, bool)
 
template<class T >
void set (const char *ky, const Array1D< T > &)
 
template<class T >
void set (const char *ky, const Array2D< T > &)
 
void set (const char *ky, const char *)
 
void set (const char *ky, const DBKey &)
 
void set (const char *ky, const FilePath &)
 
template<class T >
void set (const char *ky, const Interval< T > &)
 
void set (const char *ky, const MultiID &)
 
void set (const char *ky, const OD::String &str)
 
void set (const char *ky, const uiString &)
 
void set (const char *ky, double)
 
void set (const char *ky, float)
 
Objectset (const char *ky, Object *)
 
void set (const char *ky, od_int16)
 
void set (const char *ky, od_int32)
 
void set (const char *ky, od_int64)
 
void set (const char *ky, od_uint16)
 
void set (const char *ky, od_uint32)
 
- Public Member Functions inherited from OD::JSON::ValueSet
virtual ~ValueSet ()
 
Arrayarray (idx_type i)
 
const Arrayarray (idx_type i) const
 
ArrayasArray ()
 
const ArrayasArray () const
 
ObjectasObject ()
 
const ObjectasObject () const
 
ValueSetchild (idx_type i)
 
const ValueSetchild (idx_type i) const
 
virtual BufferString dumpJSon (bool pretty=false) const
 
void dumpJSon (BufferString &, bool pretty=false) const
 
virtual void dumpJSon (StringBuilder &) const
 
bool isArrayChild (idx_type i) const
 
virtual bool isEmpty () const
 
bool isObjectChild (idx_type i) const
 
bool isPlainData (idx_type i) const
 
bool isTop () const
 
const BufferStringkey (idx_type) const
 
Objectobject (idx_type i)
 
const Objectobject (idx_type i) const
 
ValueSetoperator= (const ValueSet &)=delete
 
uiRetVal parseJSon (char *buf, int bufsz)
 
uiRetVal read (const char *fnm)
 
uiRetVal read (od_istream &)
 
virtual void setEmpty ()
 
virtual size_type size () const
 
ValueSettop ()
 
const ValueSettop () const
 
virtual ValueType valueType (idx_type) const
 
uiRetVal write (const char *fnm, bool pretty)
 
uiRetVal write (od_ostream &, bool pretty=false)
 
uiRetVal writePretty (od_ostream &)
 

Protected Member Functions

ArraygtArrayByKey (const char *) const
 
ArraygtArrayByKeys (const BufferStringSet &) const
 
ValueSetgtChildByKey (const char *) const
 
ValueSetgtChildByKeys (const BufferStringSet &) const
 
ObjectgtObjectByKey (const char *) const
 
ObjectgtObjectByKeys (const BufferStringSet &) const
 
void set (KeyedValue *)
 
template<class T >
void setVal (const char *, T)
 
void setVS (const char *, ValueSet *)
 
- Protected Member Functions inherited from OD::JSON::ValueSet
 ValueSet (const ValueSet &)
 
 ValueSet (ValueSet *parent)
 
ArraygtArrayByIdx (idx_type) const
 
ValueSetgtChildByIdx (idx_type) const
 
ObjectgtObjectByIdx (idx_type) const
 
void setParent (ValueSet *p)
 
void use (const GasonNode &)
 

Friends

class ValueSet
 

Additional Inherited Members

- Public Types inherited from OD::JSON::ValueSet
typedef Gason::JsonNode GasonNode
 
typedef size_type idx_type
 
typedef ValArr::size_type size_type
 
enum  ValueType { Data , SubArray , SubObject }
 
- Static Public Member Functions inherited from OD::JSON::ValueSet
static ValueSetgetFromJSon (char *buf, int bufsz, uiRetVal &)
 
static ValueSetread (const char *fnm, uiRetVal &)
 
static ValueSetread (od_istream &, uiRetVal &)
 
- Static Protected Member Functions inherited from OD::JSON::ValueSet
static ValueSetgtByParse (char *, int, uiRetVal &, ValueSet *)
 
- Protected Attributes inherited from OD::JSON::ValueSet
ValueSetparent_
 
ObjectSet< Valuevalues_
 

Detailed Description

ValueSet where the values and subsets have a key.

<>

Constructor & Destructor Documentation

◆ Object() [1/2]

OD::JSON::Object::Object ( ValueSet * p = nullptr)

◆ Object() [2/2]

OD::JSON::Object::Object ( const Object & )

◆ ~Object()

OD::JSON::Object::~Object ( )

Member Function Documentation

◆ clone()

Object * OD::JSON::Object::clone ( ) const
inlineoverridevirtual

Implements OD::JSON::ValueSet.

◆ get() [1/3]

template<class T >
bool OD::JSON::Object::get ( const char * key,
Array1D< T > & arr ) const
inline

◆ get() [2/3]

template<class T >
bool OD::JSON::Object::get ( const char * key,
Array2D< T > & arr ) const
inline

◆ get() [3/3]

template<class T >
bool OD::JSON::Object::get ( const char * key,
Interval< T > & intrvl ) const
inline

◆ getArray() [1/4]

Array * OD::JSON::Object::getArray ( const BufferStringSet & bskey)
inline

◆ getArray() [2/4]

const Array * OD::JSON::Object::getArray ( const BufferStringSet & bskey) const
inline

◆ getArray() [3/4]

Array * OD::JSON::Object::getArray ( const char * ky)
inline

◆ getArray() [4/4]

const Array * OD::JSON::Object::getArray ( const char * ky) const
inline

◆ getBoolValue() [1/3]

bool OD::JSON::Object::getBoolValue ( const char * ) const

◆ getBoolValue() [2/3]

bool OD::JSON::Object::getBoolValue ( const OD::String & str) const
inline

◆ getBoolValue() [3/3]

bool OD::JSON::Object::getBoolValue ( idx_type idx) const
inlineoverridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getChild() [1/4]

ValueSet * OD::JSON::Object::getChild ( const BufferStringSet & bskey)
inline

◆ getChild() [2/4]

const ValueSet * OD::JSON::Object::getChild ( const BufferStringSet & bskey) const
inline

◆ getChild() [3/4]

ValueSet * OD::JSON::Object::getChild ( const char * ky)
inline

◆ getChild() [4/4]

const ValueSet * OD::JSON::Object::getChild ( const char * ky) const
inline

◆ getDoubleValue() [1/3]

double OD::JSON::Object::getDoubleValue ( const char * ) const

◆ getDoubleValue() [2/3]

double OD::JSON::Object::getDoubleValue ( const OD::String & str) const
inline

◆ getDoubleValue() [3/3]

double OD::JSON::Object::getDoubleValue ( idx_type idx) const
inlineoverridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getFilePath() [1/3]

FilePath OD::JSON::Object::getFilePath ( const char * ) const

◆ getFilePath() [2/3]

FilePath OD::JSON::Object::getFilePath ( const OD::String & str) const
inline

◆ getFilePath() [3/3]

FilePath OD::JSON::Object::getFilePath ( idx_type idx) const
inlineoverridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getGeomID()

bool OD::JSON::Object::getGeomID ( const char * ,
Pos::GeomID &  ) const

◆ getIntValue() [1/3]

od_int64 OD::JSON::Object::getIntValue ( const char * ) const

◆ getIntValue() [2/3]

od_int64 OD::JSON::Object::getIntValue ( const OD::String & str) const
inline

◆ getIntValue() [3/3]

od_int64 OD::JSON::Object::getIntValue ( idx_type idx) const
inlineoverridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getMultiID()

MultiID OD::JSON::Object::getMultiID ( const char * ) const

◆ getObject() [1/4]

Object * OD::JSON::Object::getObject ( const BufferStringSet & bskey)
inline

◆ getObject() [2/4]

const Object * OD::JSON::Object::getObject ( const BufferStringSet & bskey) const
inline

◆ getObject() [3/4]

Object * OD::JSON::Object::getObject ( const char * ky)
inline

◆ getObject() [4/4]

const Object * OD::JSON::Object::getObject ( const char * ky) const
inline

◆ getStrings()

bool OD::JSON::Object::getStrings ( const char * ,
BufferStringSet &  ) const

◆ getStringValue() [1/3]

BufferString OD::JSON::Object::getStringValue ( const char * ) const

◆ getStringValue() [2/3]

BufferString OD::JSON::Object::getStringValue ( const OD::String & str) const
inline

◆ getStringValue() [3/3]

BufferString OD::JSON::Object::getStringValue ( idx_type idx) const
inlineoverridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getSubObjKeys()

void OD::JSON::Object::getSubObjKeys ( BufferStringSet & ) const

◆ gtArrayByKey()

Array * OD::JSON::Object::gtArrayByKey ( const char * ) const
protected

◆ gtArrayByKeys()

Array * OD::JSON::Object::gtArrayByKeys ( const BufferStringSet & ) const
protected

◆ gtChildByKey()

ValueSet * OD::JSON::Object::gtChildByKey ( const char * ) const
protected

◆ gtChildByKeys()

ValueSet * OD::JSON::Object::gtChildByKeys ( const BufferStringSet & ) const
protected

◆ gtObjectByKey()

Object * OD::JSON::Object::gtObjectByKey ( const char * ) const
protected

◆ gtObjectByKeys()

Object * OD::JSON::Object::gtObjectByKeys ( const BufferStringSet & ) const
protected

◆ indexOf()

idx_type OD::JSON::Object::indexOf ( const char * ) const

◆ isArray()

bool OD::JSON::Object::isArray ( ) const
inlineoverridevirtual

Implements OD::JSON::ValueSet.

◆ isPresent()

bool OD::JSON::Object::isPresent ( const char * ky) const
inline

◆ operator=()

Object & OD::JSON::Object::operator= ( const Object & )
delete

◆ remove()

void OD::JSON::Object::remove ( const char * )

◆ set() [1/20]

Array * OD::JSON::Object::set ( const char * ky,
Array *  )

◆ set() [2/20]

void OD::JSON::Object::set ( const char * ky,
bool  )

◆ set() [3/20]

template<class T >
void OD::JSON::Object::set ( const char * ky,
const Array1D< T > & arr )
inline

◆ set() [4/20]

template<class T >
void OD::JSON::Object::set ( const char * ky,
const Array2D< T > & arr )
inline

◆ set() [5/20]

void OD::JSON::Object::set ( const char * ky,
const char *  )

◆ set() [6/20]

void OD::JSON::Object::set ( const char * ky,
const DBKey &  )

◆ set() [7/20]

void OD::JSON::Object::set ( const char * ky,
const FilePath &  )

◆ set() [8/20]

template<class T >
void OD::JSON::Object::set ( const char * ky,
const Interval< T > & intrvl )
inline

◆ set() [9/20]

void OD::JSON::Object::set ( const char * ky,
const MultiID &  )

◆ set() [10/20]

void OD::JSON::Object::set ( const char * ky,
const OD::String & str )
inline

◆ set() [11/20]

void OD::JSON::Object::set ( const char * ky,
const uiString &  )

◆ set() [12/20]

void OD::JSON::Object::set ( const char * ky,
double  )

◆ set() [13/20]

void OD::JSON::Object::set ( const char * ky,
float  )

◆ set() [14/20]

Object * OD::JSON::Object::set ( const char * ky,
Object *  )

◆ set() [15/20]

void OD::JSON::Object::set ( const char * ky,
od_int16  )

◆ set() [16/20]

void OD::JSON::Object::set ( const char * ky,
od_int32  )

◆ set() [17/20]

void OD::JSON::Object::set ( const char * ky,
od_int64  )

◆ set() [18/20]

void OD::JSON::Object::set ( const char * ky,
od_uint16  )

◆ set() [19/20]

void OD::JSON::Object::set ( const char * ky,
od_uint32  )

◆ set() [20/20]

void OD::JSON::Object::set ( KeyedValue * )
protected

◆ setVal()

template<class T >
void OD::JSON::Object::setVal ( const char * ,
T  )
protected

◆ setVS()

void OD::JSON::Object::setVS ( const char * ,
ValueSet *  )
protected

Friends And Related Symbol Documentation

◆ ValueSet

friend class ValueSet
friend

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2025