OpendTect  7.0
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...

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 (std::int16_t)
 
Arrayadd (std::int32_t)
 
Arrayadd (std::int64_t)
 
Arrayadd (std::uint16_t)
 
Arrayadd (std::uint32_t)
 
Arrayclone () const override
 
bool getBoolValue (idx_type) const override
 
double getDoubleValue (idx_type) const override
 
FilePath getFilePath (idx_type) const override
 
std::int64_t getIntValue (idx_type) const override
 
BufferString getStringValue (idx_type) const override
 
bool isArray () const override
 
bool isData () const
 
bool isEmpty () const override
 
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 std::int16_t *, size_type)
 
Arrayset (const std::int32_t *, size_type)
 
Arrayset (const std::int64_t *, size_type)
 
Arrayset (const std::uint16_t *, size_type)
 
Arrayset (const std::uint32_t *, size_type)
 
Arrayset (const TypeSet< double > &)
 
Arrayset (const TypeSet< float > &)
 
Arrayset (const TypeSet< std::int16_t > &)
 
Arrayset (const TypeSet< std::int32_t > &)
 
Arrayset (const TypeSet< std::int64_t > &)
 
Arrayset (const TypeSet< std::uint16_t > &)
 
Arrayset (const TypeSet< std::uint32_t > &)
 
Arrayset (const uiString &)
 
Arrayset (const uiStringSet &)
 
Arrayset (double)
 
Arrayset (float)
 
Arrayset (std::int16_t)
 
Arrayset (std::int32_t)
 
Arrayset (std::int64_t)
 
Arrayset (std::uint16_t)
 
Arrayset (std::uint32_t)
 
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
 
BufferString dumpJSon (bool pretty=false) const
 
void dumpJSon (BufferString &, bool pretty=false) const
 
void dumpJSon (StringBuilder &) 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
 
uiRetVal parseJSon (char *buf, int bufsz)
 
uiRetVal read (od_istream &)
 
ValueSettop ()
 
const ValueSettop () const
 
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 *p)
 
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 (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 ( std::int16_t  )

◆ add() [13/16]

Array& OD::JSON::Array::add ( std::int32_t  )

◆ add() [14/16]

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

◆ add() [15/16]

Array& OD::JSON::Array::add ( std::uint16_t  )

◆ add() [16/16]

Array& OD::JSON::Array::add ( std::uint32_t  )

◆ addVS()

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

◆ clone()

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

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

std::int64_t 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.

◆ 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 std::int16_t *  ,
size_type   
)

◆ set() [14/33]

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

◆ set() [15/33]

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

◆ set() [16/33]

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

◆ set() [17/33]

Array& OD::JSON::Array::set ( const std::uint32_t *  ,
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< std::int16_t > &  )

◆ set() [21/33]

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

◆ set() [22/33]

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

◆ set() [23/33]

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

◆ set() [24/33]

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

◆ 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 ( std::int16_t  )

◆ set() [30/33]

Array& OD::JSON::Array::set ( std::int32_t  )

◆ set() [31/33]

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

◆ set() [32/33]

Array& OD::JSON::Array::set ( std::uint16_t  )

◆ set() [33/33]

Array& OD::JSON::Array::set ( std::uint32_t  )

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