27#ifndef __SALOMEDSIMPL_ATTRIBUTES__H__
28#define __SALOMEDSIMPL_ATTRIBUTES__H__
37 std::cerr << message << std::endl;
75#define __AttributeTypeToGUIDForSObject \
76 if(theType == "AttributeReal") return SALOMEDSImpl_AttributeReal::GetID(); \
77 if(theType == "AttributeInteger") return SALOMEDSImpl_AttributeInteger::GetID(); \
78 if(theType == "AttributeSequenceOfReal") return SALOMEDSImpl_AttributeSequenceOfReal::GetID(); \
79 if(theType == "AttributeSequenceOfInteger") return SALOMEDSImpl_AttributeSequenceOfInteger::GetID(); \
80 if(theType == "AttributeName") return SALOMEDSImpl_AttributeName::GetID(); \
81 if(theType == "AttributeComment") return SALOMEDSImpl_AttributeComment::GetID(); \
82 if(theType == "AttributeIOR") return SALOMEDSImpl_AttributeIOR::GetID(); \
83 if(theType == "AttributePersistentRef") return SALOMEDSImpl_AttributePersistentRef::GetID(); \
84 if(theType == "AttributeDrawable") return SALOMEDSImpl_AttributeDrawable::GetID(); \
85 if(theType == "AttributeSelectable") return SALOMEDSImpl_AttributeSelectable::GetID(); \
86 if(theType == "AttributeExpandable") return SALOMEDSImpl_AttributeExpandable::GetID(); \
87 if(theType == "AttributeOpened") return SALOMEDSImpl_AttributeOpened::GetID(); \
88 if(theType == "AttributeTextColor") return SALOMEDSImpl_AttributeTextColor::GetID(); \
89 if(theType == "AttributeTextHighlightColor") return SALOMEDSImpl_AttributeTextHighlightColor::GetID(); \
90 if(theType == "AttributePixMap") return SALOMEDSImpl_AttributePixMap::GetID(); \
91 if(theType == "AttributeLocalID") return SALOMEDSImpl_AttributeLocalID::GetID(); \
92 if(theType == "AttributeTarget") return SALOMEDSImpl_AttributeTarget::GetID(); \
93 if(theType == "AttributeTableOfInteger") return SALOMEDSImpl_AttributeTableOfInteger::GetID(); \
94 if(theType == "AttributeTableOfReal") return SALOMEDSImpl_AttributeTableOfReal::GetID(); \
95 if(theType == "AttributeTableOfString") return SALOMEDSImpl_AttributeTableOfString::GetID(); \
96 if(theType == "AttributeStudyProperties") return SALOMEDSImpl_AttributeStudyProperties::GetID(); \
97 if(theType == "AttributePythonObject") return SALOMEDSImpl_AttributePythonObject::GetID(); \
98 if(theType == "AttributeUserID") return std::string("FFFFFFFF-D9CD-11d6-945D-1050DA506788"); \
99 if(theType == "AttributeExternalFileDef") return SALOMEDSImpl_AttributeExternalFileDef::GetID(); \
100 if(theType == "AttributeFileType") return SALOMEDSImpl_AttributeFileType::GetID(); \
101 if(theType == "AttributeFlags") return SALOMEDSImpl_AttributeFlags::GetID(); \
102 if(theType == "AttributeGraphic") return SALOMEDSImpl_AttributeGraphic::GetID(); \
103 if(theType == "AttributeReference") return SALOMEDSImpl_AttributeReference::GetID(); \
104 if(theType == "AttributeParameter") return SALOMEDSImpl_AttributeParameter::GetID(); \
105 if(theType == "AttributeString") return SALOMEDSImpl_AttributeString::GetID();
108#define __FindOrCreateAttributeLocked(ClassName) if (strcmp(aTypeOfAttribute.c_str(), #ClassName) == 0) { \
109 SALOMEDSImpl_##ClassName* anAttr; \
110 if (!(anAttr=(SALOMEDSImpl_##ClassName*)Lab.FindAttribute(SALOMEDSImpl_##ClassName::GetID()))) { \
112 anAttr = new SALOMEDSImpl_##ClassName; \
113 Lab.AddAttribute(anAttr); \
118#define __FindOrCreateAttribute(ClassName) if (strcmp(aTypeOfAttribute.c_str(), #ClassName) == 0) { \
119 SALOMEDSImpl_##ClassName* anAttr; \
120 if (!(anAttr=(SALOMEDSImpl_##ClassName*)Lab.FindAttribute(SALOMEDSImpl_##ClassName::GetID()))) { \
121 anAttr = new SALOMEDSImpl_##ClassName; \
122 Lab.AddAttribute(anAttr); \
127#define __FindOrCreateAttributeForBuilder \
128__FindOrCreateAttributeLocked(AttributeReal) \
129__FindOrCreateAttributeLocked(AttributeInteger) \
130__FindOrCreateAttributeLocked(AttributeSequenceOfReal) \
131__FindOrCreateAttributeLocked(AttributeSequenceOfInteger) \
132__FindOrCreateAttributeLocked(AttributeName) \
133__FindOrCreateAttributeLocked(AttributeComment) \
134__FindOrCreateAttributeLocked(AttributeIOR) \
135__FindOrCreateAttributeLocked(AttributePixMap) \
136__FindOrCreateAttributeLocked(AttributeLocalID) \
137__FindOrCreateAttributeLocked(AttributeTableOfInteger) \
138__FindOrCreateAttributeLocked(AttributeTableOfReal) \
139__FindOrCreateAttributeLocked(AttributeTableOfString) \
140__FindOrCreateAttributeLocked(AttributePythonObject) \
141__FindOrCreateAttributeLocked(AttributeParameter) \
142__FindOrCreateAttributeLocked(AttributeString) \
143__FindOrCreateAttribute(AttributePersistentRef) \
144__FindOrCreateAttribute(AttributeDrawable) \
145__FindOrCreateAttribute(AttributeSelectable) \
146__FindOrCreateAttribute(AttributeExpandable) \
147__FindOrCreateAttribute(AttributeOpened) \
148__FindOrCreateAttribute(AttributeTextColor) \
149__FindOrCreateAttribute(AttributeTextHighlightColor) \
150__FindOrCreateAttribute(AttributeTarget) \
151__FindOrCreateAttribute(AttributeStudyProperties) \
152__FindOrCreateAttribute(AttributeExternalFileDef) \
153__FindOrCreateAttribute(AttributeFileType) \
154__FindOrCreateAttribute(AttributeFlags) \
155__FindOrCreateAttribute(AttributeGraphic)
#define SALOMEDSIMPL_EXPORT
Definition: SALOMEDSImpl_Defines.hxx:34
Definition: SALOMEDSImpl_Attributes.hxx:34
LockProtection(const char *message)
Definition: SALOMEDSImpl_Attributes.hxx:36