Version: 9.15.0
YACS::ENGINE::ComposedAny Class Referenceabstract

#include <Any.hxx>

Inheritance diagram for YACS::ENGINE::ComposedAny:
Collaboration diagram for YACS::ENGINE::ComposedAny:

Public Member Functions

virtual void setEltAtRank (int i, const Any *elem)=0
 
AnyPtr operator[] (const char *key) const
 
- Public Member Functions inherited from YACS::ENGINE::Any
const TypeCodegetType () const
 
virtual Anyclone () const =0
 
virtual AnyPtr operator[] (int i) const =0
 
virtual bool operator== (const Any &other) const =0
 
- Public Member Functions inherited from YACS::ENGINE::RefCounter
unsigned int getRefCnt () const
 
void incrRef () const
 
bool decrRef () const
 

Protected Member Functions

 ComposedAny (const ComposedAny &other)
 
 ComposedAny (TypeCode *type, bool isNew=true)
 
void checkTypeOf (const Any *elem) const
 
- Protected Member Functions inherited from YACS::ENGINE::Any
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 ()
 

Private Member Functions

int getIntValue () const
 
bool getBoolValue () const
 
double getDoubleValue () const
 
std::string getStringValue () const
 

Additional Inherited Members

- Static Public Attributes inherited from YACS::ENGINE::RefCounter
static unsigned int _totalCnt =0
 
- Static Protected Member Functions inherited from YACS::ENGINE::Any
static bool IsNull (char *data)
 
- Protected Attributes inherited from YACS::ENGINE::Any
TypeCode_type
 
- Protected Attributes inherited from YACS::ENGINE::RefCounter
unsigned int _cnt
 

Detailed Description

Definition at line 184 of file Any.hxx.

Constructor & Destructor Documentation

◆ ComposedAny() [1/2]

ComposedAny::ComposedAny ( const ComposedAny other)
protected

Definition at line 500 of file Any.cxx.

500  :Any(other)
501 {
502 }
Any(TypeCode *type)
Definition: Any.cxx:233

◆ ComposedAny() [2/2]

ComposedAny::ComposedAny ( TypeCode type,
bool  isNew = true 
)
protected

Definition at line 504 of file Any.cxx.

504  :Any(type)
505 {
506  if(isNew)
507  _type->decrRef();
508 }
TypeCode * _type
Definition: Any.hxx:106

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

Member Function Documentation

◆ checkTypeOf()

void ComposedAny::checkTypeOf ( const Any elem) const
protected

Definition at line 515 of file Any.cxx.

516 {
517  if(!elem->getType()->isA(_type->contentType()))
518  throw Exception("ComposedAny::checkTypeOf : invalid type.");
519 }
const TypeCode * getType() const
Definition: Any.hxx:85
virtual const TypeCode * contentType() const
Definition: TypeCode.cxx:174
virtual int isA(const char *repositoryId) const
Definition: TypeCode.cxx:99

References YACS::ENGINE::Any::_type, YACS::ENGINE::TypeCode::contentType(), YACS::ENGINE::Any::getType(), and YACS::ENGINE::TypeCode::isA().

Referenced by YACS::ENGINE::SequenceAny::setEltAtRank(), and YACS::ENGINE::ArrayAny::setEltAtRank().

◆ getBoolValue()

bool ComposedAny::getBoolValue ( ) const
privatevirtual

◆ getDoubleValue()

double ComposedAny::getDoubleValue ( ) const
privatevirtual

Implements YACS::ENGINE::Any.

Definition at line 531 of file Any.cxx.

532 {
534 }
static YACS::ENGINE::TypeCode * _tc_double
Definition: Runtime.hxx:136

References YACS::ENGINE::Runtime::_tc_double, YACS::ENGINE::Any::_type, and YACS::ENGINE::TypeCode::kind().

◆ getIntValue()

int ComposedAny::getIntValue ( ) const
privatevirtual

Implements YACS::ENGINE::Any.

Definition at line 521 of file Any.cxx.

522 {
524 }
static YACS::ENGINE::TypeCode * _tc_int
Definition: Runtime.hxx:137

References YACS::ENGINE::Runtime::_tc_int, YACS::ENGINE::Any::_type, and YACS::ENGINE::TypeCode::kind().

◆ getStringValue()

std::string ComposedAny::getStringValue ( ) const
privatevirtual

Implements YACS::ENGINE::Any.

Definition at line 536 of file Any.cxx.

537 {
539 }
static YACS::ENGINE::TypeCode * _tc_string
Definition: Runtime.hxx:139

References YACS::ENGINE::Runtime::_tc_string, YACS::ENGINE::Any::_type, and YACS::ENGINE::TypeCode::kind().

◆ operator[]()

AnyPtr ComposedAny::operator[] ( const char *  key) const
virtual

Implements YACS::ENGINE::Any.

Reimplemented in YACS::ENGINE::StructAny.

Definition at line 510 of file Any.cxx.

511 {
512  throw Exception("AtomAny::operator[] : try to get a part of a partitionned data not localizable by a string.");
513 }

◆ setEltAtRank()

virtual void YACS::ENGINE::ComposedAny::setEltAtRank ( int  i,
const Any elem 
)
pure virtual

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