OpendTect  6.6
Public Member Functions | Protected Member Functions | Static 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...

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 &odstr)
 
Arrayadd (const uiString &)
 
Arrayadd (double)
 
Arrayadd (float)
 
Arrayadd (int)
 
Arrayadd (int64_t)
 
Objectadd (Object *)
 
Arrayadd (short)
 
Arrayadd (unsigned int)
 
Arrayadd (unsigned short)
 
virtual Arrayclone () const
 
virtual bool isArray () const
 
Arrayset (bool)
 
Arrayset (const bool *, size_type)
 
void set (const BoolTypeSet &)
 
void set (const BufferStringSet &)
 
Arrayset (const char *)
 
Arrayset (const DBKey &)
 
void set (const DBKeySet &)
 
Arrayset (const double *, size_type)
 
Arrayset (const double)
 
Arrayset (const FilePath &)
 
Arrayset (const float *, size_type)
 
Arrayset (const float)
 
Arrayset (const int *, size_type)
 
Arrayset (const int)
 
Arrayset (const int64_t *, size_type)
 
Arrayset (const int64_t)
 
Arrayset (const MultiID &)
 
Arrayset (const OD::String &)
 
Arrayset (const short *, size_type)
 
Arrayset (const short)
 
void set (const TypeSet< double > &)
 
void set (const TypeSet< float > &)
 
void set (const TypeSet< int > &)
 
void set (const TypeSet< int64_t > &)
 
void set (const TypeSet< short > &)
 
void set (const TypeSet< unsigned int > &)
 
void set (const TypeSet< unsigned short > &)
 
Arrayset (const uiString &)
 
void set (const uiStringSet &)
 
Arrayset (const unsigned int *, size_type)
 
Arrayset (const unsigned int)
 
Arrayset (const unsigned short *, size_type)
 
Arrayset (const unsigned short)
 
virtual void setEmpty ()
 
virtual size_type size () const
 
ValArrvalArr ()
 
const ValArrvalArr () const
 
ValueType valType () const
 
virtual ValueType valueType (idx_type) const
 
- 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
 
BufferString dumpJSon () const
 
void dumpJSon (BufferString &) const
 
void dumpJSon (StringBuilder &) const
 
bool getBoolValue (idx_type) const
 
double getDoubleValue (idx_type) const
 
FilePath getFilePath (idx_type) const
 
int64_t getIntValue (idx_type) const
 
BufferString getStringValue (idx_type) 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
 
Objectobject (idx_type i)
 
const Objectobject (idx_type i) const
 
uiRetVal parseJSon (char *buf, int bufsz)
 
uiRetVal read (od_istream &)
 
ValueSettop ()
 
const ValueSettop () const
 
uiRetVal write (od_ostream &)
 

Protected Member Functions

void addVS (ValueSet *)
 
template<class T >
ArraysetVals (const T *, size_type)
 
template<class T >
void setVals (const TypeSet< T > &)
 
- Protected Member Functions inherited from OD::JSON::ValueSet
 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 const char * addarrnonvalstr ()
 
- Static Protected Member Functions inherited from OD::JSON::ValueSet
static ValueSetgtByParse (char *, int, uiRetVal &, ValueSet *)
 
static const char * gtvalnotplaindatastr ()
 

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 (od_istream &, uiRetVal &)
 

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 odstr)
inline

◆ 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]

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

◆ add() [12/16]

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

◆ add() [13/16]

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

◆ add() [14/16]

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

◆ add() [15/16]

Array& OD::JSON::Array::add ( unsigned int  )

◆ add() [16/16]

Array& OD::JSON::Array::add ( unsigned short  )

◆ addarrnonvalstr()

static const char* OD::JSON::Array::addarrnonvalstr ( )
inlinestaticprotected

◆ addVS()

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

◆ clone()

virtual Array* OD::JSON::Array::clone ( ) const
inlinevirtual

Implements OD::JSON::ValueSet.

◆ isArray()

virtual bool OD::JSON::Array::isArray ( ) const
inlinevirtual

Implements OD::JSON::ValueSet.

◆ set() [1/33]

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

◆ set() [2/33]

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

◆ set() [3/33]

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

◆ set() [4/33]

void 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]

void 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 double  )

◆ set() [10/33]

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

◆ set() [11/33]

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

◆ set() [12/33]

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

◆ set() [13/33]

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

◆ set() [14/33]

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

◆ set() [15/33]

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

◆ set() [16/33]

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

◆ set() [17/33]

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

◆ set() [18/33]

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

◆ set() [19/33]

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

◆ set() [20/33]

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

◆ set() [21/33]

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

◆ set() [22/33]

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

◆ set() [23/33]

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

◆ set() [24/33]

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

◆ set() [25/33]

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

◆ set() [26/33]

void OD::JSON::Array::set ( const TypeSet< unsigned int > &  )

◆ set() [27/33]

void OD::JSON::Array::set ( const TypeSet< unsigned short > &  )

◆ set() [28/33]

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

◆ set() [29/33]

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

◆ set() [30/33]

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

◆ set() [31/33]

Array& OD::JSON::Array::set ( const unsigned int  )

◆ set() [32/33]

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

◆ set() [33/33]

Array& OD::JSON::Array::set ( const unsigned short  )

◆ setEmpty()

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

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 >
void OD::JSON::Array::setVals ( const TypeSet< T > &  )
protected

◆ size()

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

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

virtual ValueType OD::JSON::Array::valueType ( idx_type  ) const
inlinevirtual

Reimplemented from OD::JSON::ValueSet.

Friends And Related Function 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-2022