00001 /********************************************************************** 00002 ** This program is part of 'MOOSE', the 00003 ** Messaging Object Oriented Simulation Environment. 00004 ** Copyright (C) 2003-2013 Upinder S. Bhalla. and NCBS 00005 ** It is made available under the terms of the 00006 ** GNU Lesser General Public License version 2.1 00007 ** See the file COPYING.LIB for the full notice. 00008 **********************************************************************/ 00009 #ifndef _GLOBAL_DATA_ELEMENT_H 00010 #define _GLOBAL_DATA_ELEMENT_H 00011 00012 class SrcFinfo; 00013 class FuncOrder; 00014 00021 class GlobalDataElement: public DataElement 00022 { 00023 public: 00035 GlobalDataElement( Id id, const Cinfo* c, const string& name, 00036 unsigned int numData = 1 ); 00037 00042 GlobalDataElement( Id id, const Element* orig, unsigned int n ); 00043 00047 ~GlobalDataElement(); 00048 00052 Element* copyElement( Id newParent, Id newId, unsigned int n, 00053 bool toGlobal ) const; 00054 00056 // Information access fields 00058 00060 unsigned int numData() const; 00061 00063 unsigned int localDataStart() const { 00064 return 0; 00065 } 00066 00068 unsigned int getNode( unsigned int dataIndex ) const; 00069 00071 unsigned int startDataIndex( unsigned int node ) const 00072 { 00073 return 0; 00074 } 00075 00077 unsigned int rawIndex( unsigned int dataId ) const; 00078 00079 bool isGlobal() const { 00080 return true; 00081 } 00082 00084 unsigned int getNumOnNode( unsigned int node ) const; 00085 00087 // data access stuff: All is just inherited. 00089 00091 00092 private: 00093 // All is inherited from DataElement. 00094 00095 }; 00096 00097 #endif // _GLOBAL_DATA_ELEMENT_H