00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _FIELD_ELEMENT_H
00010 #define _FIELD_ELEMENT_H
00011
00018 class FieldElement: public Element
00019 {
00020 public:
00021 FieldElement( Id parent, Id kid, const Cinfo* c, const string& name,
00022 const FieldElementFinfoBase* fef
00023 );
00024
00025 ~FieldElement();
00026
00030 Element* copyElement( Id newParent, Id newId, unsigned int n,
00031 bool toGlobal ) const;
00032
00035 unsigned int numData() const;
00036
00038 unsigned int numLocalData() const;
00039
00041 unsigned int localDataStart() const;
00042
00044 unsigned int numField( unsigned int rawIndex ) const;
00045
00047 unsigned int totNumLocalField() const;
00048
00050 unsigned int getNode( unsigned int dataId ) const;
00051
00053 unsigned int startDataIndex ( unsigned int node ) const;
00054
00056 unsigned int rawIndex( unsigned int dataId ) const;
00057
00062 bool hasFields() const {
00063 return true;
00064 }
00065
00067 bool isGlobal() const;
00068
00070 unsigned int getNumOnNode( unsigned int node ) const;
00071
00073
00075
00093 char* data( unsigned int rawIndex,
00094 unsigned int fieldIndex = 0 ) const;
00095
00101 void resize( unsigned int newNumData );
00102
00107 void resizeField(
00108 unsigned int rawIndex, unsigned int newNumField );
00109
00115 void zombieSwap( const Cinfo* zCinfo );
00116
00117 private:
00118 Id parent_;
00119 const FieldElementFinfoBase* fef_;
00120 };
00121
00122 #endif // _FIELD_ELEMENT_H