00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _ELEMENT_ASSOCIATION_HH
00013 #define _ELEMENT_ASSOCIATION_HH
00014
00015 #include "tyvis/ArrayInfo.hh"
00016 #include "tyvis/UniversalInteger.hh"
00017
00018 class ElementAssociation {
00019 public:
00020 ArrayInfo choice;
00021 RValue* value;
00022 ElementAssociation(): choice(others()), value(0) { }
00023
00024 ElementAssociation(ArrayInfo a, RValue *v): choice(a), value(v) { }
00025
00026 ElementAssociation( int position, RValue *v ):
00027 choice(position, ArrayInfo::to, position),
00028 value(v) {}
00029
00030 ElementAssociation(int position, RValue &v):
00031 choice(position, ArrayInfo::to, position),
00032 value(&v){ }
00033
00034 ElementAssociation(UniversalInteger position, RValue* v):
00035 choice(position.getValue(), ArrayInfo::to, position.getValue()),
00036 value(v) {}
00037 };
00038
00039 #endif //ifndef _ELEMENT_ASSOCIATION_HH