FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OMEassoc Class Referencefinal

Implements associative array of OMEtype elements. More...

#include <OMEassoc.h>

+ Inheritance diagram for OMEassoc:

Public Types

typedef OMEassocStorage::ASSOC_HASH_KEY_t ASSOC_HASH_KEY_t
 

Public Member Functions

 OMEassoc ()
 
 OMEassoc (const OMEassoc &org)
 
OMEassocoperator= (const OMEassoc &arg)
 
 ~OMEassoc ()
 
bool operator== (const OMEassoc &arg) const
 
bool operator!= (const OMEassoc &arg) const
 
OMEtypeoperator[] (const ASSOC_HASH_KEY_t i)
 Subscript reference ! More...
 
const OMEtypeoperator[] (const ASSOC_HASH_KEY_t i) const
 read-only subscript reference ! More...
 
OMEtypeoperator[] (const OMEstring &key)
 subscript reference using a string key. ! More...
 
const OMEtypeoperator[] (const OMEstring &key) const
 read-only subscript reference using a string key. ! More...
 
const OMEstringgetKeyForIndex (const ASSOC_HASH_KEY_t i) const
 
bool deleteIndex (const ASSOC_HASH_KEY_t i)
 
bool forceDeleteIndex (const ASSOC_HASH_KEY_t i)
 Similar to deleteIndex(), but does not ensure a single reference to the array is held. More...
 
bool deleteIndex (const OMEstring &key)
 
bool forceDeleteIndex (const OMEstring &key)
 Similar to deleteIndex(), but does not ensure a single reference to the array is held. More...
 
bool indexExists (const ASSOC_HASH_KEY_t i) const
 
bool indexExists (const OMEstring &key) const
 
ASSOC_HASH_KEY_t nextIndex (const ASSOC_HASH_KEY_t currentSubscript) const
 
uint_fast32_t elementCount () const OME_ALWAYS_INLINE
 
bool isEmpty () const OME_ALWAYS_INLINE
 
OMEassocdeepCopy () const
 
template<typename STREAMTYPE >
STREAMTYPE & outputOnStream (STREAMTYPE &outputStream, int_fast16_t indent=0, uint8_t includeTypePrefix=OME_DEFAULT_COMPLEX_OUTPUT_MODE) const
 Output an OMEassoc object to an output stream. More...
 
- Public Member Functions inherited from OMEreferenceToData< OMEassocStorage >
void getUniqueReference ()
 Force unique reference to the data, which will trigger duplication if necessary (copy-on-write). More...
 
int_fast32_t totalReferences () const OME_ALWAYS_INLINE
 Get current reference total. More...
 

Private Member Functions

 OMEassoc (OMEassocStorage *s)
 

Additional Inherited Members

- Protected Member Functions inherited from OMEreferenceToData< OMEassocStorage >
void addReadOnlyReference () OME_ALWAYS_INLINE
 
void dropReference (OMEassocStorage *newData=nullptr) OME_ALWAYS_INLINE
 
 OMEreferenceToData ()
 
 OMEreferenceToData (OMEassocStorage *existingData) NONNULL_CLASS_PARAMETERS(2)
 
 OMEreferenceToData (const OMEreferenceToData< OMEassocStorage > &org)
 
virtual ~OMEreferenceToData ()
 
- Protected Attributes inherited from OMEreferenceToData< OMEassocStorage >
OMEassocStoragedata
 

Detailed Description

Implements associative array of OMEtype elements.

Member Typedef Documentation

◆ ASSOC_HASH_KEY_t

Constructor & Destructor Documentation

◆ OMEassoc() [1/3]

OMEassoc::OMEassoc ( OMEassocStorage s)
inlineexplicitprivate

References s.

◆ OMEassoc() [2/3]

OMEassoc::OMEassoc ( )
inline

◆ OMEassoc() [3/3]

OMEassoc::OMEassoc ( const OMEassoc org)
inlineexplicit

◆ ~OMEassoc()

OMEassoc::~OMEassoc ( )
inline

Member Function Documentation

◆ deepCopy()

OMEassoc* OMEassoc::deepCopy ( ) const
inline

◆ deleteIndex() [1/2]

OMEassoc::deleteIndex ( const ASSOC_HASH_KEY_t  i)
inline

Deletes the element identified by internal subscript i.

Return values
0the element did not exist.
1the element was successfully deleted. !

References OMEreferenceToData< C >::getUniqueReference().

Referenced by deleteIndex().

◆ deleteIndex() [2/2]

OMEassoc::deleteIndex ( const OMEstring key)
inline

Deletes the element identified by the string subscript key.

Return values
0the element did not exist.
1the element was successfully deleted. !

References OMEreferenceToData< C >::getUniqueReference().

◆ elementCount()

OMEassoc::elementCount ( ) const
inline
Returns
the number of elements in the array. !

Referenced by elementCount(), and subscriptsInOrder().

◆ forceDeleteIndex() [1/2]

OMEassoc::forceDeleteIndex ( const ASSOC_HASH_KEY_t  i)
inline

Similar to deleteIndex(), but does not ensure a single reference to the array is held.

Warning
If multiple references exist, the foreign references will have had the contents of the array changed underneath them, which is rarely acceptable. !

◆ forceDeleteIndex() [2/2]

OMEassoc::forceDeleteIndex ( const OMEstring key)
inline

Similar to deleteIndex(), but does not ensure a single reference to the array is held.

Warning
If multiple references exist, the foreign references will have had the contents of the array changed underneath them, which is rarely acceptable. !

◆ getKeyForIndex()

OMEassoc::getKeyForIndex ( const ASSOC_HASH_KEY_t  i) const
inline
Returns
the string key associated with the internal subscript i. !

Referenced by getKeyForIndex(), mergeArrays(), OMEgetInterfaces(), sortArray(), and substituteText().

◆ indexExists() [1/2]

OMEassoc::indexExists ( const ASSOC_HASH_KEY_t  i) const
inline
Return values
0the element identified by the internal subscript i does not exist.
1the element identified by the internal subscript i does exist. !

Referenced by debugDisplay(), display(), OMEnlmCatalog::findMessage(), getApplicationVariable(), indexExists(), logOutput(), OMEcheckACL(), and subscriptsInOrder().

◆ indexExists() [2/2]

OMEassoc::indexExists ( const OMEstring key) const
inline
Return values
0the element identified by key does not exist.
1the element identified by key does exist.

◆ isEmpty()

bool OMEassoc::isEmpty ( ) const
inline

Referenced by isEmpty().

◆ nextIndex()

OMEassoc::nextIndex ( const ASSOC_HASH_KEY_t  currentSubscript) const
inline
Returns
The subscript of the element in the array after currentSuscript.
Return values
0indicates the end of the array has been reached. !

Referenced by expandSSIvars(), mergeArrays(), nextIndex(), OMEgetInterfaces(), priorIndex(), subscriptsInOrder(), and substituteText().

◆ operator!=()

bool OMEassoc::operator!= ( const OMEassoc arg) const
inline

◆ operator=()

◆ operator==()

bool OMEassoc::operator== ( const OMEassoc arg) const
inline

◆ operator[]() [1/4]

OMEassoc::operator[] ( const ASSOC_HASH_KEY_t  i)
inline

Subscript reference !

References OMEreferenceToData< C >::getUniqueReference().

◆ operator[]() [2/4]

OMEassoc::operator[] ( const ASSOC_HASH_KEY_t  i) const
inline

read-only subscript reference !

References OMEreferenceToData< C >::data.

◆ operator[]() [3/4]

OMEassoc::operator[] ( const OMEstring key)
inline

subscript reference using a string key. !

References OMEreferenceToData< C >::getUniqueReference().

◆ operator[]() [4/4]

OMEassoc::operator[] ( const OMEstring key) const
inline

read-only subscript reference using a string key. !

References OMEreferenceToData< C >::data.

◆ outputOnStream()

template<typename STREAMTYPE >
STREAMTYPE& OMEassoc::outputOnStream ( STREAMTYPE &  outputStream,
int_fast16_t  indent = 0,
uint8_t  includeTypePrefix = OME_DEFAULT_COMPLEX_OUTPUT_MODE 
) const
inline

Output an OMEassoc object to an output stream.

Parameters
outputStreamis a reference to an output stream.
indentspecifies the number of spaces to indent before beginning output. If negative, no indent is performed for the first line, but subsequent lines are indented based on the absolute value of indent.
includeTypePrefixis a mask of flags indicating if type names should prefix data elements, if strings should be enclosed in quotes, etc.

Referenced by operator<<().


The documentation for this class was generated from the following files:
Generated: Tue Jul 28 2020 16:03:27
Support Information