OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
OD::JSON::ValueSet Class Referenceabstract

holds values and sets of values. Is base class for either Array or Object. More...

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

Public Types

typedef Gason::JsonNode GasonNode
 
typedef size_type idx_type
 
typedef ValArr::size_type size_type
 
enum  ValueType { Data , SubArray , SubObject }
 

Public Member Functions

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 ValueSetclone () const =0
 
BufferString dumpJSon (bool pretty=false) const
 
void dumpJSon (BufferString &, bool pretty=false) const
 
void dumpJSon (StringBuilder &) const
 
virtual bool getBoolValue (idx_type) const
 
virtual double getDoubleValue (idx_type) const
 
virtual FilePath getFilePath (idx_type) const
 
virtual std::int64_t getIntValue (idx_type) const
 
virtual BufferString getStringValue (idx_type) const
 
virtual bool isArray () const =0
 
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
 
uiRetVal parseJSon (char *buf, int bufsz)
 
uiRetVal read (od_istream &)
 
virtual void setEmpty ()
 
virtual size_type size () const
 
ValueSettop ()
 
const ValueSettop () const
 
virtual ValueType valueType (idx_type) const
 
uiRetVal write (od_ostream &, bool pretty=false)
 
uiRetVal writePretty (od_ostream &)
 

Static Public Member Functions

static ValueSetgetFromJSon (char *buf, int bufsz, uiRetVal &)
 
static ValueSetread (od_istream &, uiRetVal &)
 

Protected Member Functions

 ValueSet (const ValueSet &)
 
 ValueSet (ValueSet *p)
 
ArraygtArrayByIdx (idx_type) const
 
ValueSetgtChildByIdx (idx_type) const
 
ObjectgtObjectByIdx (idx_type) const
 
void setParent (ValueSet *p)
 
void use (const GasonNode &)
 

Static Protected Member Functions

static ValueSetgtByParse (char *, int, uiRetVal &, ValueSet *)
 

Protected Attributes

ValueSetparent_
 
ObjectSet< Valuevalues_
 

Friends

class Array
 
class Object
 
class Value
 

Detailed Description

holds values and sets of values. Is base class for either Array or Object.

<>

Member Typedef Documentation

◆ GasonNode

◆ idx_type

◆ size_type

Member Enumeration Documentation

◆ ValueType

Enumerator
Data 
SubArray 
SubObject 

Constructor & Destructor Documentation

◆ ~ValueSet()

virtual OD::JSON::ValueSet::~ValueSet ( )
inlinevirtual

◆ ValueSet() [1/2]

OD::JSON::ValueSet::ValueSet ( ValueSet p)
inlineprotected

◆ ValueSet() [2/2]

OD::JSON::ValueSet::ValueSet ( const ValueSet )
protected

Member Function Documentation

◆ array() [1/2]

Array& OD::JSON::ValueSet::array ( idx_type  i)
inline

◆ array() [2/2]

const Array& OD::JSON::ValueSet::array ( idx_type  i) const
inline

◆ asArray() [1/2]

Array & OD::JSON::ValueSet::asArray ( )
inline

◆ asArray() [2/2]

const Array & OD::JSON::ValueSet::asArray ( ) const
inline

◆ asObject() [1/2]

Object & OD::JSON::ValueSet::asObject ( )
inline

◆ asObject() [2/2]

const Object & OD::JSON::ValueSet::asObject ( ) const
inline

◆ child() [1/2]

ValueSet& OD::JSON::ValueSet::child ( idx_type  i)
inline

◆ child() [2/2]

const ValueSet& OD::JSON::ValueSet::child ( idx_type  i) const
inline

◆ clone()

virtual ValueSet* OD::JSON::ValueSet::clone ( ) const
pure virtual

Implemented in OD::JSON::Object, and OD::JSON::Array.

◆ dumpJSon() [1/3]

BufferString OD::JSON::ValueSet::dumpJSon ( bool  pretty = false) const

◆ dumpJSon() [2/3]

void OD::JSON::ValueSet::dumpJSon ( BufferString ,
bool  pretty = false 
) const

◆ dumpJSon() [3/3]

void OD::JSON::ValueSet::dumpJSon ( StringBuilder ) const

◆ getBoolValue()

virtual bool OD::JSON::ValueSet::getBoolValue ( idx_type  ) const
virtual

Reimplemented in OD::JSON::Array, and OD::JSON::Object.

◆ getDoubleValue()

virtual double OD::JSON::ValueSet::getDoubleValue ( idx_type  ) const
virtual

Reimplemented in OD::JSON::Array, and OD::JSON::Object.

◆ getFilePath()

virtual FilePath OD::JSON::ValueSet::getFilePath ( idx_type  ) const
virtual

Reimplemented in OD::JSON::Array, and OD::JSON::Object.

◆ getFromJSon()

static ValueSet* OD::JSON::ValueSet::getFromJSon ( char *  buf,
int  bufsz,
uiRetVal  
)
static

◆ getIntValue()

virtual std::int64_t OD::JSON::ValueSet::getIntValue ( idx_type  ) const
virtual

Reimplemented in OD::JSON::Array, and OD::JSON::Object.

◆ getStringValue()

virtual BufferString OD::JSON::ValueSet::getStringValue ( idx_type  ) const
virtual

Reimplemented in OD::JSON::Array, and OD::JSON::Object.

◆ gtArrayByIdx()

Array* OD::JSON::ValueSet::gtArrayByIdx ( idx_type  ) const
protected

◆ gtByParse()

static ValueSet* OD::JSON::ValueSet::gtByParse ( char *  ,
int  ,
uiRetVal ,
ValueSet  
)
staticprotected

◆ gtChildByIdx()

ValueSet* OD::JSON::ValueSet::gtChildByIdx ( idx_type  ) const
protected

◆ gtObjectByIdx()

Object* OD::JSON::ValueSet::gtObjectByIdx ( idx_type  ) const
protected

◆ isArray()

virtual bool OD::JSON::ValueSet::isArray ( ) const
pure virtual

Implemented in OD::JSON::Object, and OD::JSON::Array.

◆ isArrayChild()

bool OD::JSON::ValueSet::isArrayChild ( idx_type  i) const
inline

◆ isEmpty()

virtual bool OD::JSON::ValueSet::isEmpty ( ) const
inlinevirtual

Reimplemented in OD::JSON::Array.

◆ isObjectChild()

bool OD::JSON::ValueSet::isObjectChild ( idx_type  i) const
inline

◆ isPlainData()

bool OD::JSON::ValueSet::isPlainData ( idx_type  i) const
inline

◆ isTop()

bool OD::JSON::ValueSet::isTop ( ) const
inline

◆ key()

const BufferString& OD::JSON::ValueSet::key ( idx_type  ) const

◆ object() [1/2]

Object& OD::JSON::ValueSet::object ( idx_type  i)
inline

◆ object() [2/2]

const Object& OD::JSON::ValueSet::object ( idx_type  i) const
inline

◆ parseJSon()

uiRetVal OD::JSON::ValueSet::parseJSon ( char *  buf,
int  bufsz 
)

◆ read() [1/2]

uiRetVal OD::JSON::ValueSet::read ( od_istream )

◆ read() [2/2]

static ValueSet* OD::JSON::ValueSet::read ( od_istream ,
uiRetVal  
)
static

◆ setEmpty()

virtual void OD::JSON::ValueSet::setEmpty ( )
virtual

Reimplemented in OD::JSON::Array.

◆ setParent()

void OD::JSON::ValueSet::setParent ( ValueSet p)
inlineprotected

◆ size()

virtual size_type OD::JSON::ValueSet::size ( ) const
inlinevirtual

Reimplemented in OD::JSON::Array.

◆ top() [1/2]

ValueSet* OD::JSON::ValueSet::top ( )

◆ top() [2/2]

const ValueSet* OD::JSON::ValueSet::top ( ) const

◆ use()

void OD::JSON::ValueSet::use ( const GasonNode )
protected

◆ valueType()

virtual ValueType OD::JSON::ValueSet::valueType ( idx_type  ) const
virtual

Reimplemented in OD::JSON::Array.

◆ write()

uiRetVal OD::JSON::ValueSet::write ( od_ostream ,
bool  pretty = false 
)

◆ writePretty()

uiRetVal OD::JSON::ValueSet::writePretty ( od_ostream )

Friends And Related Function Documentation

◆ Array

friend class Array
friend

◆ Object

friend class Object
friend

◆ Value

friend class Value
friend

Member Data Documentation

◆ parent_

ValueSet* OD::JSON::ValueSet::parent_
protected

◆ values_

ObjectSet<Value> OD::JSON::ValueSet::values_
protected

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