Version: 9.12.0
SALOMEDS_ClientAttributes.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 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 
63 
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