Salome HOME
bce69f8a931d29dac9b87f5713ce2a6131e375a9
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_ClientAttributes.hxx
1 // Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  File   : SALOMEDS_Attributes.hxx
24 //  Author : Sergey RUIN
25 //  Module : SALOME
26 //
27 #ifndef __SALOMEDSCLIENT_ATTRIBUTES__H__
28 #define __SALOMEDSCLIENT_ATTRIBUTES__H__
29
30 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
31
32 #include "SALOMEDSImpl_GenericAttribute.hxx"
33 #include "SALOMEDSImpl_AttributeName.hxx"
34 #include "SALOMEDSImpl_AttributeComment.hxx"
35 #include "SALOMEDSImpl_AttributeInteger.hxx"
36 #include "SALOMEDSImpl_AttributeReal.hxx"
37 #include "SALOMEDSImpl_AttributeTreeNode.hxx"
38 #include "SALOMEDSImpl_AttributeUserID.hxx"
39 #include "SALOMEDSImpl_AttributeSequenceOfReal.hxx"
40 #include "SALOMEDSImpl_AttributeSequenceOfInteger.hxx" 
41 #include "SALOMEDSImpl_AttributeIOR.hxx"
42 #include "SALOMEDSImpl_AttributePersistentRef.hxx" 
43 #include "SALOMEDSImpl_AttributeDrawable.hxx"
44 #include "SALOMEDSImpl_AttributeSelectable.hxx"
45 #include "SALOMEDSImpl_AttributeExpandable.hxx"
46 #include "SALOMEDSImpl_AttributeOpened.hxx"
47 #include "SALOMEDSImpl_AttributeTextColor.hxx"
48 #include "SALOMEDSImpl_AttributeTextHighlightColor.hxx"
49 #include "SALOMEDSImpl_AttributePixMap.hxx"
50 #include "SALOMEDSImpl_AttributeLocalID.hxx"
51 #include "SALOMEDSImpl_AttributeTarget.hxx"
52 #include "SALOMEDSImpl_AttributeTableOfInteger.hxx"
53 #include "SALOMEDSImpl_AttributeTableOfReal.hxx"
54 #include "SALOMEDSImpl_AttributeTableOfString.hxx"
55 #include "SALOMEDSImpl_AttributeStudyProperties.hxx"
56 #include "SALOMEDSImpl_AttributePythonObject.hxx"
57 #include "SALOMEDSImpl_AttributeExternalFileDef.hxx"
58 #include "SALOMEDSImpl_AttributeFileType.hxx"
59 #include "SALOMEDSImpl_AttributeFlags.hxx"
60 #include "SALOMEDSImpl_AttributeGraphic.hxx"
61 #include "SALOMEDSImpl_AttributeParameter.hxx"
62 #include "SALOMEDSImpl_AttributeString.hxx"
63
64 #include "SALOMEDS_GenericAttribute.hxx"
65 #include "SALOMEDS_AttributeName.hxx"
66 #include "SALOMEDS_AttributeComment.hxx"
67 #include "SALOMEDS_AttributeInteger.hxx"
68 #include "SALOMEDS_AttributeReal.hxx"
69 #include "SALOMEDS_AttributeTreeNode.hxx"
70 #include "SALOMEDS_AttributeUserID.hxx"
71 #include "SALOMEDS_AttributeSequenceOfReal.hxx"
72 #include "SALOMEDS_AttributeSequenceOfInteger.hxx" 
73 #include "SALOMEDS_AttributeIOR.hxx"
74 #include "SALOMEDS_AttributePersistentRef.hxx" 
75 #include "SALOMEDS_AttributeDrawable.hxx"
76 #include "SALOMEDS_AttributeSelectable.hxx"
77 #include "SALOMEDS_AttributeExpandable.hxx"
78 #include "SALOMEDS_AttributeOpened.hxx"
79 #include "SALOMEDS_AttributeTextColor.hxx"
80 #include "SALOMEDS_AttributeTextHighlightColor.hxx"
81 #include "SALOMEDS_AttributePixMap.hxx"
82 #include "SALOMEDS_AttributeLocalID.hxx"
83 #include "SALOMEDS_AttributeTarget.hxx"
84 #include "SALOMEDS_AttributeTableOfInteger.hxx"
85 #include "SALOMEDS_AttributeTableOfReal.hxx"
86 #include "SALOMEDS_AttributeTableOfString.hxx"
87 #include "SALOMEDS_AttributeStudyProperties.hxx"
88 #include "SALOMEDS_AttributePythonObject.hxx"
89 #include "SALOMEDS_AttributeExternalFileDef.hxx"
90 #include "SALOMEDS_AttributeFileType.hxx"
91 #include "SALOMEDS_AttributeFlags.hxx"
92 #include "SALOMEDS_AttributeGraphic.hxx"
93 #include "SALOMEDS_AttributeParameter.hxx"
94 #include "SALOMEDS_AttributeString.hxx"
95
96 #define __CreateClientAttributeLocal(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \
97     SALOMEDSImpl_##CORBA_Name* A = dynamic_cast<SALOMEDSImpl_##CORBA_Name*>(theGA); \
98     aGA = new SALOMEDS_##CORBA_Name(A); \
99   }
100
101 #define __CreateClientAttributeCORBA(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \
102     SALOMEDS::CORBA_Name##_var A = SALOMEDS::CORBA_Name::_narrow(theGA); \
103     aGA = new SALOMEDS_##CORBA_Name(A); \
104   }
105
106 #define __CreateGenericClientAttributeLocal \
107 __CreateClientAttributeLocal(AttributeReal) \
108 __CreateClientAttributeLocal(AttributeInteger) \
109 __CreateClientAttributeLocal(AttributeSequenceOfReal) \
110 __CreateClientAttributeLocal(AttributeSequenceOfInteger) \
111 __CreateClientAttributeLocal(AttributeName) \
112 __CreateClientAttributeLocal(AttributeComment) \
113 __CreateClientAttributeLocal(AttributeIOR) \
114 __CreateClientAttributeLocal(AttributePixMap) \
115 __CreateClientAttributeLocal(AttributeLocalID) \
116 __CreateClientAttributeLocal(AttributeTableOfInteger) \
117 __CreateClientAttributeLocal(AttributeTableOfReal) \
118 __CreateClientAttributeLocal(AttributeTableOfString) \
119 __CreateClientAttributeLocal(AttributePythonObject) \
120 __CreateClientAttributeLocal(AttributePersistentRef) \
121 __CreateClientAttributeLocal(AttributeDrawable) \
122 __CreateClientAttributeLocal(AttributeSelectable) \
123 __CreateClientAttributeLocal(AttributeExpandable) \
124 __CreateClientAttributeLocal(AttributeOpened) \
125 __CreateClientAttributeLocal(AttributeTextColor) \
126 __CreateClientAttributeLocal(AttributeTextHighlightColor) \
127 __CreateClientAttributeLocal(AttributeTarget) \
128 __CreateClientAttributeLocal(AttributeStudyProperties) \
129 __CreateClientAttributeLocal(AttributeExternalFileDef) \
130 __CreateClientAttributeLocal(AttributeFileType) \
131 __CreateClientAttributeLocal(AttributeFlags) \
132 __CreateClientAttributeLocal(AttributeGraphic) \
133 __CreateClientAttributeLocal(AttributeTreeNode) \
134 __CreateClientAttributeLocal(AttributeUserID) \
135 __CreateClientAttributeLocal(AttributeParameter) \
136 __CreateClientAttributeLocal(AttributeString)
137
138 #define __CreateGenericClientAttributeCORBA \
139 __CreateClientAttributeCORBA(AttributeReal) \
140 __CreateClientAttributeCORBA(AttributeInteger) \
141 __CreateClientAttributeCORBA(AttributeSequenceOfReal) \
142 __CreateClientAttributeCORBA(AttributeSequenceOfInteger) \
143 __CreateClientAttributeCORBA(AttributeName) \
144 __CreateClientAttributeCORBA(AttributeComment) \
145 __CreateClientAttributeCORBA(AttributeIOR) \
146 __CreateClientAttributeCORBA(AttributePixMap) \
147 __CreateClientAttributeCORBA(AttributeLocalID) \
148 __CreateClientAttributeCORBA(AttributeTableOfInteger) \
149 __CreateClientAttributeCORBA(AttributeTableOfReal) \
150 __CreateClientAttributeCORBA(AttributeTableOfString) \
151 __CreateClientAttributeCORBA(AttributePythonObject) \
152 __CreateClientAttributeCORBA(AttributePersistentRef) \
153 __CreateClientAttributeCORBA(AttributeDrawable) \
154 __CreateClientAttributeCORBA(AttributeSelectable) \
155 __CreateClientAttributeCORBA(AttributeExpandable) \
156 __CreateClientAttributeCORBA(AttributeOpened) \
157 __CreateClientAttributeCORBA(AttributeTextColor) \
158 __CreateClientAttributeCORBA(AttributeTextHighlightColor) \
159 __CreateClientAttributeCORBA(AttributeTarget) \
160 __CreateClientAttributeCORBA(AttributeStudyProperties) \
161 __CreateClientAttributeCORBA(AttributeExternalFileDef) \
162 __CreateClientAttributeCORBA(AttributeFileType) \
163 __CreateClientAttributeCORBA(AttributeFlags) \
164 __CreateClientAttributeCORBA(AttributeGraphic) \
165 __CreateClientAttributeCORBA(AttributeTreeNode) \
166 __CreateClientAttributeCORBA(AttributeUserID) \
167 __CreateClientAttributeCORBA(AttributeParameter) \
168 __CreateClientAttributeCORBA(AttributeString)
169
170 #endif