Version: 9.15.0
YACS::ENGINE::Any Class Referenceabstract

: Interface for management of storage of data formated dynamically in its TypeCode. Warning virtual inheritance on Any daughter classes NOT supported. More...

#include <Any.hxx>

Inheritance diagram for YACS::ENGINE::Any:
Collaboration diagram for YACS::ENGINE::Any:

Public Member Functions

const TypeCodegetType () const
 
virtual Anyclone () const =0
 
virtual AnyPtr operator[] (int i) const =0
 
virtual AnyPtr operator[] (const char *key) const =0
 
virtual bool operator== (const Any &other) const =0
 
virtual int getIntValue () const =0
 
virtual bool getBoolValue () const =0
 
virtual double getDoubleValue () const =0
 
virtual std::string getStringValue () const =0
 
- Public Member Functions inherited from YACS::ENGINE::RefCounter
unsigned int getRefCnt () const
 
void incrRef () const
 
bool decrRef () const
 

Protected Member Functions

virtual ~Any ()
 
 Any (TypeCode *type)
 
 Any (const Any &other)
 
virtual void putMyReprAtPlace (char *data) const =0
 
- Protected Member Functions inherited from YACS::ENGINE::RefCounter
 RefCounter ()
 
 RefCounter (const RefCounter &other)
 
virtual ~RefCounter ()
 

Static Protected Member Functions

static bool IsNull (char *data)
 

Protected Attributes

TypeCode_type
 
- Protected Attributes inherited from YACS::ENGINE::RefCounter
unsigned int _cnt
 

Friends

class SeqAlloc
 
class ArrayAny
 
class StructAny
 
class SequenceAny
 

Additional Inherited Members

- Static Public Attributes inherited from YACS::ENGINE::RefCounter
static unsigned int _totalCnt =0
 

Detailed Description

: Interface for management of storage of data formated dynamically in its TypeCode. Warning virtual inheritance on Any daughter classes NOT supported.

Definition at line 78 of file Any.hxx.

Constructor & Destructor Documentation

◆ ~Any()

Any::~Any ( )
protectedvirtual

Definition at line 243 of file Any.cxx.

244 {
245  _type->decrRef();
246 }
TypeCode * _type
Definition: Any.hxx:106

References _type, and YACS::ENGINE::RefCounter::decrRef().

◆ Any() [1/2]

Any::Any ( TypeCode type)
protected

Definition at line 233 of file Any.cxx.

233  :_type(type)
234 {
235  _type->incrRef();
236 }

References _type, and YACS::ENGINE::RefCounter::incrRef().

◆ Any() [2/2]

Any::Any ( const Any other)
protected

Definition at line 238 of file Any.cxx.

238  :_type(other._type)
239 {
240  _type->incrRef();
241 }

References _type, and YACS::ENGINE::RefCounter::incrRef().

Member Function Documentation

◆ clone()

◆ getBoolValue()

◆ getDoubleValue()

◆ getIntValue()

◆ getStringValue()

◆ getType()

◆ IsNull()

bool Any::IsNull ( char *  data)
staticprotected

Definition at line 248 of file Any.cxx.

249 {
250  if(!data)
251  return true;
252  bool isNull(true);
253  for(std::size_t i=0;i<sizeof(void *) && isNull;i++)
254  isNull=(data[i]==SeqAlloc::DFT_CHAR_VAR);
255  return isNull;
256 }
static const char DFT_CHAR_VAR
Definition: Any.hxx:181

References YACS::ENGINE::SeqAlloc::DFT_CHAR_VAR, and yacsorb.CORBAEngineTest::i.

Referenced by YACS::ENGINE::AtomAny::destroyReprAtPlace(), and YACS::ENGINE::SequenceAny::destroyReprAtPlace().

◆ operator==()

virtual bool YACS::ENGINE::Any::operator== ( const Any other) const
pure virtual

◆ operator[]() [1/2]

virtual AnyPtr YACS::ENGINE::Any::operator[] ( const char *  key) const
pure virtual

◆ operator[]() [2/2]

virtual AnyPtr YACS::ENGINE::Any::operator[] ( int  i) const
pure virtual

◆ putMyReprAtPlace()

virtual void YACS::ENGINE::Any::putMyReprAtPlace ( char *  data) const
protectedpure virtual

Friends And Related Function Documentation

◆ ArrayAny

◆ SeqAlloc

friend class SeqAlloc
friend

Definition at line 80 of file Any.hxx.

◆ SequenceAny

◆ StructAny

Member Data Documentation

◆ _type

TypeCode* YACS::ENGINE::Any::_type
protected

Definition at line 106 of file Any.hxx.

Referenced by Any(), YACS::ENGINE::ArrayAny::ArrayAny(), YACS::ENGINE::AtomAny::AtomAny(), YACS::ENGINE::ComposedAny::checkTypeOf(), YACS::ENGINE::SequenceAny::clear(), YACS::ENGINE::ComposedAny::ComposedAny(), YACS::ENGINE::AtomAny::getBoolValue(), YACS::ENGINE::ComposedAny::getBoolValue(), YACS::ENGINE::AtomAny::getBytesValue(), YACS::ENGINE::AtomAny::getDoubleValue(), YACS::ENGINE::ComposedAny::getDoubleValue(), YACS::ENGINE::AtomAny::getIntValue(), YACS::ENGINE::ComposedAny::getIntValue(), YACS::ENGINE::AtomAny::getStringValue(), YACS::ENGINE::ComposedAny::getStringValue(), YACS::ENGINE::AtomAny::operator==(), YACS::ENGINE::SequenceAny::operator==(), YACS::ENGINE::ArrayAny::operator==(), YACS::ENGINE::StructAny::operator==(), YACS::ENGINE::StructAny::operator[](), YACS::ENGINE::AtomAny::operator[](), YACS::ENGINE::SequenceAny::operator[](), YACS::ENGINE::ArrayAny::operator[](), YACS::ENGINE::SequenceAny::performCpy(), YACS::ENGINE::SequenceAny::popBack(), YACS::ENGINE::SequenceAny::pushBack(), YACS::ENGINE::AtomAny::putMyReprAtPlace(), YACS::ENGINE::SequenceAny::putMyReprAtPlace(), YACS::ENGINE::ArrayAny::putMyReprAtPlace(), YACS::ENGINE::StructAny::putMyReprAtPlace(), YACS::ENGINE::SequenceAny::realloc(), YACS::ENGINE::SequenceAny::SequenceAny(), YACS::ENGINE::StructAny::setEltAtRank(), YACS::ENGINE::SequenceAny::setEltAtRank(), YACS::ENGINE::ArrayAny::setEltAtRank(), YACS::ENGINE::ArrayAny::size(), YACS::ENGINE::StructAny::StructAny(), ~Any(), YACS::ENGINE::ArrayAny::~ArrayAny(), YACS::ENGINE::AtomAny::~AtomAny(), YACS::ENGINE::SequenceAny::~SequenceAny(), and YACS::ENGINE::StructAny::~StructAny().


The documentation for this class was generated from the following files: