MIDAS  0.75
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
subject.h
Go to the documentation of this file.
1 #ifndef MIDAS_SUBJECT_H
2 #define MIDAS_SUBJECT_H
3 
4 #include "problem.h"
5 
6 
13 namespace midaspace {
14 
15 //* ********************************************************************************************
16 //* *** *** *** *** CLASS ProblemSubject *** *** *** ***
17 //* ********************************************************************************************
19 {
20  protected:
22  long ID;
24  const Problem *Pd;
25 
26  public:
28  ProblemSubject (long gid ) { ID = gid; Pd = NULL; }
30  ProblemSubject (long gid, const Problem *owner) { ID = gid; Pd = NULL; this->set_Pd(owner); }
32  virtual ~ProblemSubject() { }
33 
35  virtual classID give_classid() const { errol; return classVoid; }
36  virtual void initialize (void) { }
39  virtual void finitialize (void) { }
41  virtual void checkConsistency (void) const { }
42 
43  public:
44  void set_ID (long val) { ID = val; }
45  long give_ID () const { return ID; }
46 
47  void set_Pd (const Problem *owner);
48  const Problem* give_Pd (void) const { return Pd; }
49 };
50 
51 
52 //* ********************************************************************************************
53 //* *** *** *** *** CLASS GeometrySubject *** *** *** ***
54 //* ********************************************************************************************
56 {
57  protected:
59  const Geometry *Geom;
60 
61  public:
63  GeometrySubject (long gid ) : ProblemSubject (gid ) { Geom = NULL; }
65  GeometrySubject (long gid, const Problem *owner) : ProblemSubject (gid, owner) { Geom = NULL; }
67  GeometrySubject (long gid, const Geometry *owner) : ProblemSubject (gid ) { Geom = NULL; this->set_Geom(owner); }
69  virtual ~GeometrySubject() { }
70 
71  public:
72  void set_Geom (const Geometry *owner);
73  void reset_Geom (const Geometry *owner) { Geom = NULL; this->set_Geom(owner); }
74  const Geometry* give_Geom (void) const { return Geom; }
75 };
76 
77 
78 //* ********************************************************************************************
79 //* *** *** *** *** CLASS GeomCompSubject *** *** *** ***
80 //* ********************************************************************************************
82 {
83  protected:
86 
87  public:
89  GeomCompSubject (long gid ) : GeometrySubject (gid ) { GC = NULL; }
91  GeomCompSubject (long gid, const Problem *owner) : GeometrySubject (gid, owner) { GC = NULL; }
93  GeomCompSubject (long gid, const Geometry *owner) : GeometrySubject (gid, owner) { GC = NULL; }
95  GeomCompSubject (long gid, const GeometryComponent *owner) : GeometrySubject (gid ) { GC = NULL; this->set_GC(owner); }
97  virtual ~GeomCompSubject() { }
98 
99  public:
100  void set_GC (const GeometryComponent *owner);
101  const GeometryComponent* give_GC (void) const { return GC; }
102 };
103 
104 } // namespace midaspace
105 
106 #endif // MIDAS_SUBJECT_H
GeomCompSubject(long gid, const Geometry *owner)
CONSTRUCTOR.
Definition: subject.h:93
virtual void initialize(void)
= 0; = 0;
Definition: subject.h:37
virtual void checkConsistency(void) const
Checks data consistency.
Definition: subject.h:41
GeomCompSubject(long gid, const GeometryComponent *owner)
CONSTRUCTOR.
Definition: subject.h:95
ProblemSubject(long gid, const Problem *owner)
CONSTRUCTOR.
Definition: subject.h:30
long ID
(global) identification number == position in list of members; zero-based numbering.
Definition: subject.h:22
long give_ID() const
Definition: subject.h:45
#define errol
Definition: gelib.h:142
const Geometry * give_Geom(void) const
Definition: subject.h:74
GeometrySubject(long gid, const Geometry *owner)
CONSTRUCTOR.
Definition: subject.h:67
const Problem * give_Pd(void) const
Definition: subject.h:48
void set_GC(const GeometryComponent *owner)
Definition: subject.cpp:35
virtual ~GeomCompSubject()
DESTRUCTOR.
Definition: subject.h:97
const Problem * Pd
Pointer to owner = parent problem.
Definition: subject.h:24
void set_ID(long val)
Definition: subject.h:44
Geometry description.
Definition: geometry.h:29
GeomCompSubject(long gid, const Problem *owner)
CONSTRUCTOR.
Definition: subject.h:91
const Geometry * Geom
Pointer to owner == parent geometry.
Definition: subject.h:59
GeometrySubject(long gid, const Problem *owner)
CONSTRUCTOR.
Definition: subject.h:65
void set_Pd(const Problem *owner)
Definition: subject.cpp:12
virtual ~GeometrySubject()
DESTRUCTOR.
Definition: subject.h:69
*** *** *** *** CLASS COMPONENT *** *** *** ***
Definition: geomcomp.h:22
GeometrySubject(long gid)
CONSTRUCTOR.
Definition: subject.h:63
GeomCompSubject(long gid)
CONSTRUCTOR.
Definition: subject.h:89
void set_Geom(const Geometry *owner)
Definition: subject.cpp:23
classID
Type introduced to distinguish between classes.
Definition: alias.h:142
ProblemSubject(long gid)
CONSTRUCTOR.
Definition: subject.h:28
void reset_Geom(const Geometry *owner)
Definition: subject.h:73
const GeometryComponent * give_GC(void) const
Definition: subject.h:101
virtual classID give_classid() const
Returns classID - class identification.
Definition: subject.h:35
Problem description.
Definition: problem.h:74
Class Problem.
const GeometryComponent * GC
Pointer to owner == parent geometry component.
Definition: subject.h:85
virtual ~ProblemSubject()
DESTRUCTOR.
Definition: subject.h:32
virtual void finitialize(void)
finalize problem preprocessing
Definition: subject.h:39