ElementAssociation.hh

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 // Copyright (c) 1995-2005 Ohio Board of Regents and the University of
00003 // Cincinnati.  All Rights Reserved.
00004 
00005 // You may modify, distribute, and use the software contained in this package
00006 // under the terms of the "GNU LIBRARY GENERAL PUBLIC LICENSE" version 2,
00007 // June 1991. A copy of this license agreement can be found in the file
00008 // "LGPL", distributed with this archive.
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

Generated on Fri Mar 31 11:05:08 2006 for Tyvis by  doxygen 1.4.6