Last change
on this file since 123 was
123,
checked in by hozdoba, 14 years ago
|
Début de gestion des opérations sur les champs + quelques modifications
|
File size:
1.4 KB
|
Line | |
---|
1 | #ifndef __FIELD__ |
---|
2 | #define __FIELD__ |
---|
3 | |
---|
4 | using XMLIOSERVER::XML::XMLNode; |
---|
5 | using XMLIOSERVER::XML::THashAttributes; |
---|
6 | |
---|
7 | namespace XMLIOSERVER |
---|
8 | { |
---|
9 | class CGrid; // CGRID = CDOMAINE + CAXIS |
---|
10 | |
---|
11 | class CField : public ObjectTemplate<CField>, public FieldAttribut |
---|
12 | { |
---|
13 | public: |
---|
14 | |
---|
15 | CField(void) : ObjectTemplate<CField>(), FieldAttribut(), grid(NULL) |
---|
16 | {/* Ne rien faire de plus */} |
---|
17 | CField(const string& _id) : ObjectTemplate<CField>(_id), FieldAttribut(), grid(NULL), foper(NULL) |
---|
18 | {/* Ne rien faire de plus */} |
---|
19 | |
---|
20 | static string GetName(void) { return ("field"); } |
---|
21 | |
---|
22 | inline void SolveGridRef(void) ; |
---|
23 | |
---|
24 | const CGrid* getGrid(void) const { return (grid); } |
---|
25 | const Array<double, 1>& getData(void) const { return (data); } |
---|
26 | const FieldOperation* getFieldOperation(void) const { return (foper); } |
---|
27 | |
---|
28 | virtual CField* getReference(void) const |
---|
29 | { |
---|
30 | if(!field_ref.hasValue()) return (NULL); |
---|
31 | if (!CField::HasObject(field_ref)) |
---|
32 | { WARNING("Référence invalide sur l'objet "+GetName()+" nommé \""+((string)field_ref)+"\""); return (NULL); } |
---|
33 | |
---|
34 | return (CField::GetObject(field_ref)); |
---|
35 | } |
---|
36 | |
---|
37 | virtual ~CField(void) |
---|
38 | { /* Ne rien faire de plus */ } |
---|
39 | |
---|
40 | private : |
---|
41 | |
---|
42 | CGrid* grid ; |
---|
43 | FieldOperation* foper; |
---|
44 | Array<double, 1> data; |
---|
45 | |
---|
46 | }; // class CField |
---|
47 | |
---|
48 | } // namespace XMLIOSERVER |
---|
49 | |
---|
50 | DECLARE_GROUP(Field) |
---|
51 | |
---|
52 | #endif // __FIELD__ |
---|
Note: See
TracBrowser
for help on using the repository browser.