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

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

#include <odjson.h>

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

Public Member Functions

 Array (bool objects, ValueSet *p=0)
 
 Array (const Array &)
 
 Array (DataType, ValueSet *p=0)
 
 ~Array ()
 
Arrayadd (Array *)
 
Arrayadd (bool)
 
Arrayadd (const char *)
 
Arrayadd (const DBKey &)
 
Arrayadd (const FilePath &)
 
Arrayadd (const MultiID &)
 
Arrayadd (const OD::String &)
 
Arrayadd (const uiString &)
 
Arrayadd (double)
 
Arrayadd (float)
 
Objectadd (Object *)
 
Arrayadd (od_int16)
 
Arrayadd (od_int32)
 
Arrayadd (od_int64)
 
Arrayadd (od_uint16)
 
Arrayadd (od_uint32)
 
Arrayclone () const override
 
DataType dataType () const
 
BufferString dumpJSon (bool pretty=false) const override
 
void dumpJSon (StringBuilder &) const override
 
bool getBoolValue (idx_type) const override
 
double getDoubleValue (idx_type) const override
 
FilePath getFilePath (idx_type) const override
 
od_int64 getIntValue (idx_type) const override
 
BufferString getStringValue (idx_type) const override
 
bool isArray () const override
 
bool isData () const
 
bool isEmpty () const override
 
bool isMixed () const
 
Arrayoperator= (const Array &)=delete
 
Arrayset (bool)
 
Arrayset (const bool *, size_type)
 
Arrayset (const BoolTypeSet &)
 
Arrayset (const BufferStringSet &)
 
Arrayset (const char *)
 
Arrayset (const DBKey &)
 
Arrayset (const DBKeySet &)
 
Arrayset (const double *, size_type)
 
Arrayset (const FilePath &)
 
Arrayset (const float *, size_type)
 
Arrayset (const MultiID &)
 
Arrayset (const OD::String &)
 
Arrayset (const od_int16 *, size_type)
 
Arrayset (const od_int32 *, size_type)
 
Arrayset (const od_int64 *, size_type)
 
Arrayset (const od_uint16 *, size_type)
 
Arrayset (const od_uint32 *, size_type)
 
Arrayset (const TypeSet< double > &)
 
Arrayset (const TypeSet< float > &)
 
Arrayset (const TypeSet< od_int16 > &)
 
Arrayset (const TypeSet< od_int32 > &)
 
Arrayset (const TypeSet< od_int64 > &)
 
Arrayset (const TypeSet< od_uint16 > &)
 
Arrayset (const TypeSet< od_uint32 > &)
 
Arrayset (const uiString &)
 
Arrayset (const uiStringSet &)
 
Arrayset (double)
 
Arrayset (float)
 
Arrayset (od_int16)
 
Arrayset (od_int32)
 
Arrayset (od_int64)
 
Arrayset (od_uint16)
 
Arrayset (od_uint32)
 
void setEmpty () override
 
size_type size () const override
 
ValArrvalArr ()
 
const ValArrvalArr () const
 
ValueType valType () const
 
ValueType valueType (idx_type) const override
 
- 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
 
void dumpJSon (BufferString &, bool pretty=false) const
 
bool isArrayChild (idx_type i) 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 &)
 
ValueSettop ()
 
const ValueSettop () const
 
uiRetVal write (const char *fnm, bool pretty)
 
uiRetVal write (od_ostream &, bool pretty=false)
 
uiRetVal writePretty (od_ostream &)
 

Protected Member Functions

void addVS (ValueSet *)
 
template<class T >
ArraysetVals (const T *, size_type)
 
template<class T >
ArraysetVals (const TypeSet< T > &)
 
- 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 &)
 

Protected Attributes

ValArrvalarr_
 
ValueType valtype_
 
- Protected Attributes inherited from OD::JSON::ValueSet
ValueSetparent_
 
ObjectSet< Valuevalues_
 

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 *)
 

Detailed Description

ValueSet where the values and subsets have no key.

If it holds plain data (valType()==Data), then you can only add plain values or set all at once. Otherwise, you can only add ValueSet's of the same type (either Array or Object).

<>

Constructor & Destructor Documentation

◆ Array() [1/3]

OD::JSON::Array::Array ( bool objects,
ValueSet * p = 0 )

◆ Array() [2/3]

OD::JSON::Array::Array ( DataType ,
ValueSet * p = 0 )

◆ Array() [3/3]

OD::JSON::Array::Array ( const Array & )

◆ ~Array()

OD::JSON::Array::~Array ( )

Member Function Documentation

◆ add() [1/16]

Array * OD::JSON::Array::add ( Array * )

◆ add() [2/16]

Array & OD::JSON::Array::add ( bool )

◆ add() [3/16]

Array & OD::JSON::Array::add ( const char * )

◆ add() [4/16]

Array & OD::JSON::Array::add ( const DBKey & )

◆ add() [5/16]

Array & OD::JSON::Array::add ( const FilePath & )

◆ add() [6/16]

Array & OD::JSON::Array::add ( const MultiID & )

◆ add() [7/16]

Array & OD::JSON::Array::add ( const OD::String & )

◆ add() [8/16]

Array & OD::JSON::Array::add ( const uiString & )

◆ add() [9/16]

Array & OD::JSON::Array::add ( double )

◆ add() [10/16]

Array & OD::JSON::Array::add ( float )

◆ add() [11/16]

Object * OD::JSON::Array::add ( Object * )

◆ add() [12/16]

Array & OD::JSON::Array::add ( od_int16 )

◆ add() [13/16]

Array & OD::JSON::Array::add ( od_int32 )

◆ add() [14/16]

Array & OD::JSON::Array::add ( od_int64 )

◆ add() [15/16]

Array & OD::JSON::Array::add ( od_uint16 )

◆ add() [16/16]

Array & OD::JSON::Array::add ( od_uint32 )

◆ addVS()

void OD::JSON::Array::addVS ( ValueSet * )
protected

◆ clone()

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

Implements OD::JSON::ValueSet.

◆ dataType()

DataType OD::JSON::Array::dataType ( ) const

◆ dumpJSon() [1/2]

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

Reimplemented from OD::JSON::ValueSet.

◆ dumpJSon() [2/2]

void OD::JSON::Array::dumpJSon ( StringBuilder & ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getBoolValue()

bool OD::JSON::Array::getBoolValue ( idx_type ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getDoubleValue()

double OD::JSON::Array::getDoubleValue ( idx_type ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getFilePath()

FilePath OD::JSON::Array::getFilePath ( idx_type ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getIntValue()

od_int64 OD::JSON::Array::getIntValue ( idx_type ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ getStringValue()

BufferString OD::JSON::Array::getStringValue ( idx_type ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ isArray()

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

Implements OD::JSON::ValueSet.

◆ isData()

bool OD::JSON::Array::isData ( ) const

◆ isEmpty()

bool OD::JSON::Array::isEmpty ( ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ isMixed()

bool OD::JSON::Array::isMixed ( ) const

◆ operator=()

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

◆ set() [1/33]

Array & OD::JSON::Array::set ( bool )

◆ set() [2/33]

Array & OD::JSON::Array::set ( const bool * ,
size_type  )

◆ set() [3/33]

Array & OD::JSON::Array::set ( const BoolTypeSet & )

◆ set() [4/33]

Array & OD::JSON::Array::set ( const BufferStringSet & )

◆ set() [5/33]

Array & OD::JSON::Array::set ( const char * )

◆ set() [6/33]

Array & OD::JSON::Array::set ( const DBKey & )

◆ set() [7/33]

Array & OD::JSON::Array::set ( const DBKeySet & )

◆ set() [8/33]

Array & OD::JSON::Array::set ( const double * ,
size_type  )

◆ set() [9/33]

Array & OD::JSON::Array::set ( const FilePath & )

◆ set() [10/33]

Array & OD::JSON::Array::set ( const float * ,
size_type  )

◆ set() [11/33]

Array & OD::JSON::Array::set ( const MultiID & )

◆ set() [12/33]

Array & OD::JSON::Array::set ( const OD::String & )

◆ set() [13/33]

Array & OD::JSON::Array::set ( const od_int16 * ,
size_type  )

◆ set() [14/33]

Array & OD::JSON::Array::set ( const od_int32 * ,
size_type  )

◆ set() [15/33]

Array & OD::JSON::Array::set ( const od_int64 * ,
size_type  )

◆ set() [16/33]

Array & OD::JSON::Array::set ( const od_uint16 * ,
size_type  )

◆ set() [17/33]

Array & OD::JSON::Array::set ( const od_uint32 * ,
size_type  )

◆ set() [18/33]

Array & OD::JSON::Array::set ( const TypeSet< double > & )

◆ set() [19/33]

Array & OD::JSON::Array::set ( const TypeSet< float > & )

◆ set() [20/33]

Array & OD::JSON::Array::set ( const TypeSet< od_int16 > & )

◆ set() [21/33]

Array & OD::JSON::Array::set ( const TypeSet< od_int32 > & )

◆ set() [22/33]

Array & OD::JSON::Array::set ( const TypeSet< od_int64 > & )

◆ set() [23/33]

Array & OD::JSON::Array::set ( const TypeSet< od_uint16 > & )

◆ set() [24/33]

Array & OD::JSON::Array::set ( const TypeSet< od_uint32 > & )

◆ set() [25/33]

Array & OD::JSON::Array::set ( const uiString & )

◆ set() [26/33]

Array & OD::JSON::Array::set ( const uiStringSet & )

◆ set() [27/33]

Array & OD::JSON::Array::set ( double )

◆ set() [28/33]

Array & OD::JSON::Array::set ( float )

◆ set() [29/33]

Array & OD::JSON::Array::set ( od_int16 )

◆ set() [30/33]

Array & OD::JSON::Array::set ( od_int32 )

◆ set() [31/33]

Array & OD::JSON::Array::set ( od_int64 )

◆ set() [32/33]

Array & OD::JSON::Array::set ( od_uint16 )

◆ set() [33/33]

Array & OD::JSON::Array::set ( od_uint32 )

◆ setEmpty()

void OD::JSON::Array::setEmpty ( )
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ setVals() [1/2]

template<class T >
Array & OD::JSON::Array::setVals ( const T * ,
size_type  )
protected

◆ setVals() [2/2]

template<class T >
Array & OD::JSON::Array::setVals ( const TypeSet< T > & )
protected

◆ size()

size_type OD::JSON::Array::size ( ) const
overridevirtual

Reimplemented from OD::JSON::ValueSet.

◆ valArr() [1/2]

ValArr & OD::JSON::Array::valArr ( )
inline

◆ valArr() [2/2]

const ValArr & OD::JSON::Array::valArr ( ) const
inline

◆ valType()

ValueType OD::JSON::Array::valType ( ) const
inline

◆ valueType()

ValueType OD::JSON::Array::valueType ( idx_type ) const
inlineoverridevirtual

Reimplemented from OD::JSON::ValueSet.

Friends And Related Symbol Documentation

◆ ValueSet

friend class ValueSet
friend

Member Data Documentation

◆ valarr_

ValArr* OD::JSON::Array::valarr_
protected

◆ valtype_

ValueType OD::JSON::Array::valtype_
protected

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