Last change
on this file since 132 was
124,
checked in by hozdoba, 14 years ago
|
Commit pour sauvegarde - diverses corrections de bogues et améliorations du code.
|
File size:
1.6 KB
|
Line | |
---|
1 | #ifndef __FIELD_SOLVEGRIDREF__ |
---|
2 | #define __FIELD_SOLVEGRIDREF__ |
---|
3 | |
---|
4 | namespace XMLIOSERVER |
---|
5 | { |
---|
6 | void CField::solveGridRef(void) |
---|
7 | { |
---|
8 | CDomain* domain = NULL; |
---|
9 | CAxis* axis = NULL ; |
---|
10 | |
---|
11 | if (domain_ref.hasValue()) |
---|
12 | { |
---|
13 | if (CDomain::HasObject(domain_ref)) domain = CDomain::GetObject(domain_ref) ; |
---|
14 | else throw XMLIOSERVER::XMLIOUndefinedValueException("Référence au domaine nommé \'"+ (string)domain_ref +"\' incorrecte") ; |
---|
15 | } |
---|
16 | |
---|
17 | if (axis_ref.hasValue()) |
---|
18 | { |
---|
19 | if (CAxis::HasObject(axis_ref)) axis = CAxis::GetObject(axis_ref) ; |
---|
20 | else throw XMLIOSERVER::XMLIOUndefinedValueException("Référence à l'axe nommé \'"+ (string)axis_ref +"\' incorrecte") ; |
---|
21 | } |
---|
22 | |
---|
23 | if (grid_ref.hasValue()) |
---|
24 | { |
---|
25 | if (CGrid::HasObject(grid_ref)) grid = CGrid::GetObject(grid_ref) ; |
---|
26 | else throw XMLIOSERVER::XMLIOUndefinedValueException("Référence à la grille nommée \'"+ (string)grid_ref +"\' incorrecte"); |
---|
27 | } |
---|
28 | |
---|
29 | if (grid_ref.hasValue()) |
---|
30 | { |
---|
31 | if (domain_ref.hasValue()) WARNING("Définition conjointe de la grille et du domaine, la grille prévaut..." ); |
---|
32 | if (axis_ref.hasValue()) WARNING("Définition conjointe de la grille et de l'axe vertical, la grille prévaut...") ; |
---|
33 | } |
---|
34 | else |
---|
35 | { |
---|
36 | if (domain_ref.hasValue()) |
---|
37 | { |
---|
38 | if (axis_ref.hasValue()) grid = CGrid::CreateObject(domain, axis) ; |
---|
39 | else grid = CGrid::CreateObject(domain) ; |
---|
40 | } |
---|
41 | else ERROR("Le domaine horizontal pour le champ X n'est pas défini") ; |
---|
42 | } |
---|
43 | |
---|
44 | grid->solveReference() ; |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | #endif //__FIELD_SOLVEGRIDREF__ |
---|
Note: See
TracBrowser
for help on using the repository browser.