MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Eref.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2003-2009 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #ifndef _EREF_H
11 #define _EREF_H
12 
13 #ifdef CYMOOSE
14 
15 #include <iostream>
16 #include <vector>
17 using namespace std;
18 
19 class Element;
20 class Id;
21 class ObjId;
22 class MsgDigest;
23 
24 #endif /* ----- CYMOOSE ----- */
25 
26 class Eref
27 {
28 public:
29 
30  friend ostream& operator <<( ostream& s, const Eref& e );
31  Eref();
32  Eref( Element* e, unsigned int index, unsigned int field = 0 );
33 
37  char* data() const;
38 
42  Element* element() const
43  {
44  return e_;
45  }
46 
50  unsigned int dataIndex() const
51  {
52  return i_;
53  }
54 
61  unsigned int fieldIndex() const
62  {
63  return f_;
64  }
65 
69  ObjId objId() const;
70 
74  Id id() const;
75 
80  const vector< MsgDigest >& msgDigest(unsigned int bindIndex ) const;
81 
85  bool isDataHere() const;
86 
91  unsigned int getNode() const;
92 private:
94  unsigned int i_;
95  unsigned int f_;
96 };
97 
98 #endif // _EREF_H
unsigned int dataIndex() const
Definition: Eref.h:50
Definition: ObjId.h:20
unsigned int f_
Definition: Eref.h:95
Element * element() const
Definition: Eref.h:42
unsigned int fieldIndex() const
Definition: Eref.h:61
Definition: Eref.h:26
unsigned int i_
Definition: Eref.h:94
Definition: Id.h:17
ostream & operator<<(ostream &s, const Eref &e)
Definition: Eref.cpp:25
static char id[]
Definition: mfield.cpp:404
Element * e_
Definition: Eref.h:93