+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-#define _Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class SALOMEDS_DataMapNodeOfDataMapOfIntegerString;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapOfIntegerString);
-
-class Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString) : public Handle(TCollection_MapNode) {
- public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)():Handle(TCollection_MapNode)() {}
- Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)(const Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)(const SALOMEDS_DataMapNodeOfDataMapOfIntegerString* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)& operator=(const Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)& operator=(const SALOMEDS_DataMapNodeOfDataMapOfIntegerString* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_DataMapNodeOfDataMapOfIntegerString* operator->()
- {
- return (SALOMEDS_DataMapNodeOfDataMapOfIntegerString *)ControlAccess();
- }
-
- SALOMEDS_DataMapNodeOfDataMapOfIntegerString* operator->() const
- {
- return (SALOMEDS_DataMapNodeOfDataMapOfIntegerString *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)();
-
- Standard_EXPORT static const Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-#define _Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TCollection_MapNode_HeaderFile
-#include <Handle_TCollection_MapNode.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TCollection_MapNode);
-class SALOMEDS_DataMapNodeOfDataMapStringLabel;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapStringLabel);
-
-class Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel) : public Handle(TCollection_MapNode) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)():Handle(TCollection_MapNode)() {}
- Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)(const Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)& aHandle) : Handle(TCollection_MapNode)(aHandle)
- {
- }
-
- Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)(const SALOMEDS_DataMapNodeOfDataMapStringLabel* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem)
- {
- }
-
- Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)& operator=(const Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)& operator=(const SALOMEDS_DataMapNodeOfDataMapStringLabel* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_DataMapNodeOfDataMapStringLabel* operator->()
- {
- return (SALOMEDS_DataMapNodeOfDataMapStringLabel *)ControlAccess();
- }
-
- SALOMEDS_DataMapNodeOfDataMapStringLabel* operator->() const
- {
- return (SALOMEDS_DataMapNodeOfDataMapStringLabel *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)();
-
- Standard_EXPORT static const Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_DrawableAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_DrawableAttribute_HeaderFile
-#define _Handle_SALOMEDS_DrawableAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Integer_HeaderFile
-#include <Handle_TDataStd_Integer.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Integer);
-class SALOMEDS_DrawableAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_DrawableAttribute);
-
-class Handle(SALOMEDS_DrawableAttribute) : public Handle(TDataStd_Integer) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_DrawableAttribute)():Handle(TDataStd_Integer)() {}
- Handle(SALOMEDS_DrawableAttribute)(const Handle(SALOMEDS_DrawableAttribute)& aHandle) : Handle(TDataStd_Integer)(aHandle)
- {
- }
-
- Handle(SALOMEDS_DrawableAttribute)(const SALOMEDS_DrawableAttribute* anItem) : Handle(TDataStd_Integer)((TDataStd_Integer *)anItem)
- {
- }
-
- Handle(SALOMEDS_DrawableAttribute)& operator=(const Handle(SALOMEDS_DrawableAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_DrawableAttribute)& operator=(const SALOMEDS_DrawableAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_DrawableAttribute* operator->()
- {
- return (SALOMEDS_DrawableAttribute *)ControlAccess();
- }
-
- SALOMEDS_DrawableAttribute* operator->() const
- {
- return (SALOMEDS_DrawableAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_DrawableAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_DrawableAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_ExpandableAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_ExpandableAttribute_HeaderFile
-#define _Handle_SALOMEDS_ExpandableAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Integer_HeaderFile
-#include <Handle_TDataStd_Integer.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Integer);
-class SALOMEDS_ExpandableAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_ExpandableAttribute);
-
-class Handle(SALOMEDS_ExpandableAttribute) : public Handle(TDataStd_Integer) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_ExpandableAttribute)():Handle(TDataStd_Integer)() {}
- Handle(SALOMEDS_ExpandableAttribute)(const Handle(SALOMEDS_ExpandableAttribute)& aHandle) : Handle(TDataStd_Integer)(aHandle)
- {
- }
-
- Handle(SALOMEDS_ExpandableAttribute)(const SALOMEDS_ExpandableAttribute* anItem) : Handle(TDataStd_Integer)((TDataStd_Integer *)anItem)
- {
- }
-
- Handle(SALOMEDS_ExpandableAttribute)& operator=(const Handle(SALOMEDS_ExpandableAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_ExpandableAttribute)& operator=(const SALOMEDS_ExpandableAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_ExpandableAttribute* operator->()
- {
- return (SALOMEDS_ExpandableAttribute *)ControlAccess();
- }
-
- SALOMEDS_ExpandableAttribute* operator->() const
- {
- return (SALOMEDS_ExpandableAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_ExpandableAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_ExpandableAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// File generated by CPPExt (Transient)
-//
-// Copyright (C) 1991,1995 by
-//
-// MATRA DATAVISION, FRANCE
-//
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
-#ifndef _Handle_SALOMEDS_ExternalFileDef_HeaderFile
-#define _Handle_SALOMEDS_ExternalFileDef_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Comment_HeaderFile
-#include <Handle_TDataStd_Comment.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Comment);
-class SALOMEDS_ExternalFileDef;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_ExternalFileDef);
-
-class Handle(SALOMEDS_ExternalFileDef) : public Handle(TDataStd_Comment) {
- public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- Handle(SALOMEDS_ExternalFileDef)():Handle(TDataStd_Comment)() {}
- Handle(SALOMEDS_ExternalFileDef)(const Handle(SALOMEDS_ExternalFileDef)& aHandle) : Handle(TDataStd_Comment)(aHandle)
- {
- }
-
- Handle(SALOMEDS_ExternalFileDef)(const SALOMEDS_ExternalFileDef* anItem) : Handle(TDataStd_Comment)((TDataStd_Comment *)anItem)
- {
- }
-
- Handle(SALOMEDS_ExternalFileDef)& operator=(const Handle(SALOMEDS_ExternalFileDef)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_ExternalFileDef)& operator=(const SALOMEDS_ExternalFileDef* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_ExternalFileDef* operator->()
- {
- return (SALOMEDS_ExternalFileDef *)ControlAccess();
- }
-
- SALOMEDS_ExternalFileDef* operator->() const
- {
- return (SALOMEDS_ExternalFileDef *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_ExternalFileDef)();
-
- Standard_EXPORT static const Handle(SALOMEDS_ExternalFileDef) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// File generated by CPPExt (Transient)
-//
-// Copyright (C) 1991,1995 by
-//
-// MATRA DATAVISION, FRANCE
-//
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
-#ifndef _Handle_SALOMEDS_FileType_HeaderFile
-#define _Handle_SALOMEDS_FileType_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Comment_HeaderFile
-#include <Handle_TDataStd_Comment.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Comment);
-class SALOMEDS_FileType;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_FileType);
-
-class Handle(SALOMEDS_FileType) : public Handle(TDataStd_Comment) {
- public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- Handle(SALOMEDS_FileType)():Handle(TDataStd_Comment)() {}
- Handle(SALOMEDS_FileType)(const Handle(SALOMEDS_FileType)& aHandle) : Handle(TDataStd_Comment)(aHandle)
- {
- }
-
- Handle(SALOMEDS_FileType)(const SALOMEDS_FileType* anItem) : Handle(TDataStd_Comment)((TDataStd_Comment *)anItem)
- {
- }
-
- Handle(SALOMEDS_FileType)& operator=(const Handle(SALOMEDS_FileType)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_FileType)& operator=(const SALOMEDS_FileType* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_FileType* operator->()
- {
- return (SALOMEDS_FileType *)ControlAccess();
- }
-
- SALOMEDS_FileType* operator->() const
- {
- return (SALOMEDS_FileType *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_FileType)();
-
- Standard_EXPORT static const Handle(SALOMEDS_FileType) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_IORAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_IORAttribute_HeaderFile
-#define _Handle_SALOMEDS_IORAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Comment_HeaderFile
-#include <Handle_TDataStd_Comment.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Comment);
-class SALOMEDS_IORAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_IORAttribute);
-
-class Handle(SALOMEDS_IORAttribute) : public Handle(TDataStd_Comment) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_IORAttribute)():Handle(TDataStd_Comment)() {}
- Handle(SALOMEDS_IORAttribute)(const Handle(SALOMEDS_IORAttribute)& aHandle) : Handle(TDataStd_Comment)(aHandle)
- {
- }
-
- Handle(SALOMEDS_IORAttribute)(const SALOMEDS_IORAttribute* anItem) : Handle(TDataStd_Comment)((TDataStd_Comment *)anItem)
- {
- }
-
- Handle(SALOMEDS_IORAttribute)& operator=(const Handle(SALOMEDS_IORAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_IORAttribute)& operator=(const SALOMEDS_IORAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_IORAttribute* operator->()
- {
- return (SALOMEDS_IORAttribute *)ControlAccess();
- }
-
- SALOMEDS_IORAttribute* operator->() const
- {
- return (SALOMEDS_IORAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_IORAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_IORAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_LocalIDAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_LocalIDAttribute_HeaderFile
-#define _Handle_SALOMEDS_LocalIDAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Integer_HeaderFile
-#include <Handle_TDataStd_Integer.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Integer);
-class SALOMEDS_LocalIDAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_LocalIDAttribute);
-
-class Handle(SALOMEDS_LocalIDAttribute) : public Handle(TDataStd_Integer) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_LocalIDAttribute)():Handle(TDataStd_Integer)() {}
- Handle(SALOMEDS_LocalIDAttribute)(const Handle(SALOMEDS_LocalIDAttribute)& aHandle) : Handle(TDataStd_Integer)(aHandle)
- {
- }
-
- Handle(SALOMEDS_LocalIDAttribute)(const SALOMEDS_LocalIDAttribute* anItem) : Handle(TDataStd_Integer)((TDataStd_Integer *)anItem)
- {
- }
-
- Handle(SALOMEDS_LocalIDAttribute)& operator=(const Handle(SALOMEDS_LocalIDAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_LocalIDAttribute)& operator=(const SALOMEDS_LocalIDAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_LocalIDAttribute* operator->()
- {
- return (SALOMEDS_LocalIDAttribute *)ControlAccess();
- }
-
- SALOMEDS_LocalIDAttribute* operator->() const
- {
- return (SALOMEDS_LocalIDAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_LocalIDAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_LocalIDAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_OCAFApplication.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_OCAFApplication_HeaderFile
-#define _Handle_SALOMEDS_OCAFApplication_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDocStd_Application_HeaderFile
-#include <Handle_TDocStd_Application.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDocStd_Application);
-class SALOMEDS_OCAFApplication;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_OCAFApplication);
-
-class Handle(SALOMEDS_OCAFApplication) : public Handle(TDocStd_Application) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_OCAFApplication)():Handle(TDocStd_Application)() {}
- Handle(SALOMEDS_OCAFApplication)(const Handle(SALOMEDS_OCAFApplication)& aHandle) : Handle(TDocStd_Application)(aHandle)
- {
- }
-
- Handle(SALOMEDS_OCAFApplication)(const SALOMEDS_OCAFApplication* anItem) : Handle(TDocStd_Application)((TDocStd_Application *)anItem)
- {
- }
-
- Handle(SALOMEDS_OCAFApplication)& operator=(const Handle(SALOMEDS_OCAFApplication)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_OCAFApplication)& operator=(const SALOMEDS_OCAFApplication* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_OCAFApplication* operator->()
- {
- return (SALOMEDS_OCAFApplication *)ControlAccess();
- }
-
- SALOMEDS_OCAFApplication* operator->() const
- {
- return (SALOMEDS_OCAFApplication *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_OCAFApplication)();
-
- Standard_EXPORT static const Handle(SALOMEDS_OCAFApplication) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_OpenedAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_OpenedAttribute_HeaderFile
-#define _Handle_SALOMEDS_OpenedAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Integer_HeaderFile
-#include <Handle_TDataStd_Integer.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Integer);
-class SALOMEDS_OpenedAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_OpenedAttribute);
-
-class Handle(SALOMEDS_OpenedAttribute) : public Handle(TDataStd_Integer) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_OpenedAttribute)():Handle(TDataStd_Integer)() {}
- Handle(SALOMEDS_OpenedAttribute)(const Handle(SALOMEDS_OpenedAttribute)& aHandle) : Handle(TDataStd_Integer)(aHandle)
- {
- }
-
- Handle(SALOMEDS_OpenedAttribute)(const SALOMEDS_OpenedAttribute* anItem) : Handle(TDataStd_Integer)((TDataStd_Integer *)anItem)
- {
- }
-
- Handle(SALOMEDS_OpenedAttribute)& operator=(const Handle(SALOMEDS_OpenedAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_OpenedAttribute)& operator=(const SALOMEDS_OpenedAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_OpenedAttribute* operator->()
- {
- return (SALOMEDS_OpenedAttribute *)ControlAccess();
- }
-
- SALOMEDS_OpenedAttribute* operator->() const
- {
- return (SALOMEDS_OpenedAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_OpenedAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_OpenedAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_PersRefAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_PersRefAttribute_HeaderFile
-#define _Handle_SALOMEDS_PersRefAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Comment_HeaderFile
-#include <Handle_TDataStd_Comment.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Comment);
-class SALOMEDS_PersRefAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_PersRefAttribute);
-
-class Handle(SALOMEDS_PersRefAttribute) : public Handle(TDataStd_Comment) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_PersRefAttribute)():Handle(TDataStd_Comment)() {}
- Handle(SALOMEDS_PersRefAttribute)(const Handle(SALOMEDS_PersRefAttribute)& aHandle) : Handle(TDataStd_Comment)(aHandle)
- {
- }
-
- Handle(SALOMEDS_PersRefAttribute)(const SALOMEDS_PersRefAttribute* anItem) : Handle(TDataStd_Comment)((TDataStd_Comment *)anItem)
- {
- }
-
- Handle(SALOMEDS_PersRefAttribute)& operator=(const Handle(SALOMEDS_PersRefAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_PersRefAttribute)& operator=(const SALOMEDS_PersRefAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_PersRefAttribute* operator->()
- {
- return (SALOMEDS_PersRefAttribute *)ControlAccess();
- }
-
- SALOMEDS_PersRefAttribute* operator->() const
- {
- return (SALOMEDS_PersRefAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_PersRefAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_PersRefAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_PixMapAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_PixMapAttribute_HeaderFile
-#define _Handle_SALOMEDS_PixMapAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Comment_HeaderFile
-#include <Handle_TDataStd_Comment.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Comment);
-class SALOMEDS_PixMapAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_PixMapAttribute);
-
-class Handle(SALOMEDS_PixMapAttribute) : public Handle(TDataStd_Comment) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_PixMapAttribute)():Handle(TDataStd_Comment)() {}
- Handle(SALOMEDS_PixMapAttribute)(const Handle(SALOMEDS_PixMapAttribute)& aHandle) : Handle(TDataStd_Comment)(aHandle)
- {
- }
-
- Handle(SALOMEDS_PixMapAttribute)(const SALOMEDS_PixMapAttribute* anItem) : Handle(TDataStd_Comment)((TDataStd_Comment *)anItem)
- {
- }
-
- Handle(SALOMEDS_PixMapAttribute)& operator=(const Handle(SALOMEDS_PixMapAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_PixMapAttribute)& operator=(const SALOMEDS_PixMapAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_PixMapAttribute* operator->()
- {
- return (SALOMEDS_PixMapAttribute *)ControlAccess();
- }
-
- SALOMEDS_PixMapAttribute* operator->() const
- {
- return (SALOMEDS_PixMapAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_PixMapAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_PixMapAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : Handle_SALOMEDS_PythonObjectAttribute.hxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_PythonObjectAttribute_HeaderFile
-#define _Handle_SALOMEDS_PythonObjectAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDF_Attribute);
-class SALOMEDS_PythonObjectAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_PythonObjectAttribute);
-
-class Handle(SALOMEDS_PythonObjectAttribute) : public Handle(TDF_Attribute) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_PythonObjectAttribute)():Handle(TDF_Attribute)() {}
- Handle(SALOMEDS_PythonObjectAttribute)(const Handle(SALOMEDS_PythonObjectAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle)
- {
- }
-
- Handle(SALOMEDS_PythonObjectAttribute)(const SALOMEDS_PythonObjectAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem)
- {
- }
-
- Handle(SALOMEDS_PythonObjectAttribute)& operator=(const Handle(SALOMEDS_PythonObjectAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_PythonObjectAttribute)& operator=(const SALOMEDS_PythonObjectAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_PythonObjectAttribute* operator->()
- {
- return (SALOMEDS_PythonObjectAttribute *)ControlAccess();
- }
-
- SALOMEDS_PythonObjectAttribute* operator->() const
- {
- return (SALOMEDS_PythonObjectAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_PythonObjectAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_PythonObjectAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_SelectableAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_SelectableAttribute_HeaderFile
-#define _Handle_SALOMEDS_SelectableAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Integer_HeaderFile
-#include <Handle_TDataStd_Integer.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Integer);
-class SALOMEDS_SelectableAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_SelectableAttribute);
-
-class Handle(SALOMEDS_SelectableAttribute) : public Handle(TDataStd_Integer) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_SelectableAttribute)():Handle(TDataStd_Integer)() {}
- Handle(SALOMEDS_SelectableAttribute)(const Handle(SALOMEDS_SelectableAttribute)& aHandle) : Handle(TDataStd_Integer)(aHandle)
- {
- }
-
- Handle(SALOMEDS_SelectableAttribute)(const SALOMEDS_SelectableAttribute* anItem) : Handle(TDataStd_Integer)((TDataStd_Integer *)anItem)
- {
- }
-
- Handle(SALOMEDS_SelectableAttribute)& operator=(const Handle(SALOMEDS_SelectableAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_SelectableAttribute)& operator=(const SALOMEDS_SelectableAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_SelectableAttribute* operator->()
- {
- return (SALOMEDS_SelectableAttribute *)ControlAccess();
- }
-
- SALOMEDS_SelectableAttribute* operator->() const
- {
- return (SALOMEDS_SelectableAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_SelectableAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_SelectableAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_SequenceOfIntegerAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_SequenceOfIntegerAttribute_HeaderFile
-#define _Handle_SALOMEDS_SequenceOfIntegerAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDF_Attribute);
-class SALOMEDS_SequenceOfIntegerAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_SequenceOfIntegerAttribute);
-
-class Handle(SALOMEDS_SequenceOfIntegerAttribute) : public Handle(TDF_Attribute) {
- public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- Handle(SALOMEDS_SequenceOfIntegerAttribute)():Handle(TDF_Attribute)() {}
- Handle(SALOMEDS_SequenceOfIntegerAttribute)(const Handle(SALOMEDS_SequenceOfIntegerAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle)
- {
- }
-
- Handle(SALOMEDS_SequenceOfIntegerAttribute)(const SALOMEDS_SequenceOfIntegerAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem)
- {
- }
-
- Handle(SALOMEDS_SequenceOfIntegerAttribute)& operator=(const Handle(SALOMEDS_SequenceOfIntegerAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_SequenceOfIntegerAttribute)& operator=(const SALOMEDS_SequenceOfIntegerAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_SequenceOfIntegerAttribute* operator->()
- {
- return (SALOMEDS_SequenceOfIntegerAttribute *)ControlAccess();
- }
-
- SALOMEDS_SequenceOfIntegerAttribute* operator->() const
- {
- return (SALOMEDS_SequenceOfIntegerAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_SequenceOfIntegerAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_SequenceOfIntegerAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_SequenceOfRealAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_SequenceOfRealAttribute_HeaderFile
-#define _Handle_SALOMEDS_SequenceOfRealAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDF_Attribute);
-class SALOMEDS_SequenceOfRealAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_SequenceOfRealAttribute);
-
-class Handle(SALOMEDS_SequenceOfRealAttribute) : public Handle(TDF_Attribute) {
- public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- Handle(SALOMEDS_SequenceOfRealAttribute)():Handle(TDF_Attribute)() {}
- Handle(SALOMEDS_SequenceOfRealAttribute)(const Handle(SALOMEDS_SequenceOfRealAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle)
- {
- }
-
- Handle(SALOMEDS_SequenceOfRealAttribute)(const SALOMEDS_SequenceOfRealAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem)
- {
- }
-
- Handle(SALOMEDS_SequenceOfRealAttribute)& operator=(const Handle(SALOMEDS_SequenceOfRealAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_SequenceOfRealAttribute)& operator=(const SALOMEDS_SequenceOfRealAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_SequenceOfRealAttribute* operator->()
- {
- return (SALOMEDS_SequenceOfRealAttribute *)ControlAccess();
- }
-
- SALOMEDS_SequenceOfRealAttribute* operator->() const
- {
- return (SALOMEDS_SequenceOfRealAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_SequenceOfRealAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_SequenceOfRealAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : Handle_SALOMEDS_StudyPropertiesAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_StudyPropertiesAttribute_HeaderFile
-#define _Handle_SALOMEDS_StudyPropertiesAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDF_Attribute);
-class SALOMEDS_StudyPropertiesAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_StudyPropertiesAttribute);
-
-class Handle(SALOMEDS_StudyPropertiesAttribute) : public Handle(TDF_Attribute) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_StudyPropertiesAttribute)():Handle(TDF_Attribute)() {}
- Handle(SALOMEDS_StudyPropertiesAttribute)(const Handle(SALOMEDS_StudyPropertiesAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle)
- {
- }
-
- Handle(SALOMEDS_StudyPropertiesAttribute)(const SALOMEDS_StudyPropertiesAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem)
- {
- }
-
- Handle(SALOMEDS_StudyPropertiesAttribute)& operator=(const Handle(SALOMEDS_StudyPropertiesAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_StudyPropertiesAttribute)& operator=(const SALOMEDS_StudyPropertiesAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_StudyPropertiesAttribute* operator->()
- {
- return (SALOMEDS_StudyPropertiesAttribute *)ControlAccess();
- }
-
- SALOMEDS_StudyPropertiesAttribute* operator->() const
- {
- return (SALOMEDS_StudyPropertiesAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_StudyPropertiesAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_StudyPropertiesAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : Handle_SALOMEDS_TableOfIntegerAttribute.hxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_TableOfIntegerAttribute_HeaderFile
-#define _Handle_SALOMEDS_TableOfIntegerAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDF_Attribute);
-class SALOMEDS_TableOfIntegerAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TableOfIntegerAttribute);
-
-class Handle(SALOMEDS_TableOfIntegerAttribute) : public Handle(TDF_Attribute) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_TableOfIntegerAttribute)():Handle(TDF_Attribute)() {}
- Handle(SALOMEDS_TableOfIntegerAttribute)(const Handle(SALOMEDS_TableOfIntegerAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle)
- {
- }
-
- Handle(SALOMEDS_TableOfIntegerAttribute)(const SALOMEDS_TableOfIntegerAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem)
- {
- }
-
- Handle(SALOMEDS_TableOfIntegerAttribute)& operator=(const Handle(SALOMEDS_TableOfIntegerAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_TableOfIntegerAttribute)& operator=(const SALOMEDS_TableOfIntegerAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_TableOfIntegerAttribute* operator->()
- {
- return (SALOMEDS_TableOfIntegerAttribute *)ControlAccess();
- }
-
- SALOMEDS_TableOfIntegerAttribute* operator->() const
- {
- return (SALOMEDS_TableOfIntegerAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_TableOfIntegerAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_TableOfIntegerAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : Handle_SALOMEDS_TableOfRealAttribute.hxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_TableOfRealAttribute_HeaderFile
-#define _Handle_SALOMEDS_TableOfRealAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDF_Attribute);
-class SALOMEDS_TableOfRealAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TableOfRealAttribute);
-
-class Handle(SALOMEDS_TableOfRealAttribute) : public Handle(TDF_Attribute) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_TableOfRealAttribute)():Handle(TDF_Attribute)() {}
- Handle(SALOMEDS_TableOfRealAttribute)(const Handle(SALOMEDS_TableOfRealAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle)
- {
- }
-
- Handle(SALOMEDS_TableOfRealAttribute)(const SALOMEDS_TableOfRealAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem)
- {
- }
-
- Handle(SALOMEDS_TableOfRealAttribute)& operator=(const Handle(SALOMEDS_TableOfRealAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_TableOfRealAttribute)& operator=(const SALOMEDS_TableOfRealAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_TableOfRealAttribute* operator->()
- {
- return (SALOMEDS_TableOfRealAttribute *)ControlAccess();
- }
-
- SALOMEDS_TableOfRealAttribute* operator->() const
- {
- return (SALOMEDS_TableOfRealAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_TableOfRealAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_TableOfRealAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : Handle_SALOMEDS_TableOfStringAttribute.hxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#ifndef _Handle_SALOMEDS_TableOfStringAttribute_HeaderFile
-#define _Handle_SALOMEDS_TableOfStringAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDF_Attribute);
-class SALOMEDS_TableOfStringAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TableOfStringAttribute);
-
-class Handle(SALOMEDS_TableOfStringAttribute) : public Handle(TDF_Attribute) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_TableOfStringAttribute)():Handle(TDF_Attribute)() {}
- Handle(SALOMEDS_TableOfStringAttribute)(const Handle(SALOMEDS_TableOfStringAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle)
- {
- }
-
- Handle(SALOMEDS_TableOfStringAttribute)(const SALOMEDS_TableOfStringAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem)
- {
- }
-
- Handle(SALOMEDS_TableOfStringAttribute)& operator=(const Handle(SALOMEDS_TableOfStringAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_TableOfStringAttribute)& operator=(const SALOMEDS_TableOfStringAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_TableOfStringAttribute* operator->()
- {
- return (SALOMEDS_TableOfStringAttribute *)ControlAccess();
- }
-
- SALOMEDS_TableOfStringAttribute* operator->() const
- {
- return (SALOMEDS_TableOfStringAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_TableOfStringAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_TableOfStringAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_TargetAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_TargetAttribute_HeaderFile
-#define _Handle_SALOMEDS_TargetAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_Integer_HeaderFile
-#include <Handle_TDataStd_Integer.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_Integer);
-class SALOMEDS_TargetAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TargetAttribute);
-
-class Handle(SALOMEDS_TargetAttribute) : public Handle(TDataStd_Integer) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_TargetAttribute)():Handle(TDataStd_Integer)() {}
- Handle(SALOMEDS_TargetAttribute)(const Handle(SALOMEDS_TargetAttribute)& aHandle) : Handle(TDataStd_Integer)(aHandle)
- {
- }
-
- Handle(SALOMEDS_TargetAttribute)(const SALOMEDS_TargetAttribute* anItem) : Handle(TDataStd_Integer)((TDataStd_Integer *)anItem)
- {
- }
-
- Handle(SALOMEDS_TargetAttribute)& operator=(const Handle(SALOMEDS_TargetAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_TargetAttribute)& operator=(const SALOMEDS_TargetAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_TargetAttribute* operator->()
- {
- return (SALOMEDS_TargetAttribute *)ControlAccess();
- }
-
- SALOMEDS_TargetAttribute* operator->() const
- {
- return (SALOMEDS_TargetAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_TargetAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_TargetAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_TextColorAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_TextColorAttribute_HeaderFile
-#define _Handle_SALOMEDS_TextColorAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_RealArray_HeaderFile
-#include <Handle_TDataStd_RealArray.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_RealArray);
-class SALOMEDS_TextColorAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TextColorAttribute);
-
-class Handle(SALOMEDS_TextColorAttribute) : public Handle(TDataStd_RealArray) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_TextColorAttribute)():Handle(TDataStd_RealArray)() {}
- Handle(SALOMEDS_TextColorAttribute)(const Handle(SALOMEDS_TextColorAttribute)& aHandle) : Handle(TDataStd_RealArray)(aHandle)
- {
- }
-
- Handle(SALOMEDS_TextColorAttribute)(const SALOMEDS_TextColorAttribute* anItem) : Handle(TDataStd_RealArray)((TDataStd_RealArray *)anItem)
- {
- }
-
- Handle(SALOMEDS_TextColorAttribute)& operator=(const Handle(SALOMEDS_TextColorAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_TextColorAttribute)& operator=(const SALOMEDS_TextColorAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_TextColorAttribute* operator->()
- {
- return (SALOMEDS_TextColorAttribute *)ControlAccess();
- }
-
- SALOMEDS_TextColorAttribute* operator->() const
- {
- return (SALOMEDS_TextColorAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_TextColorAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_TextColorAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_TextHighlightColorAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Handle_SALOMEDS_TextHighlightColorAttribute_HeaderFile
-#define _Handle_SALOMEDS_TextHighlightColorAttribute_HeaderFile
-
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-
-#ifndef _Handle_TDataStd_RealArray_HeaderFile
-#include <Handle_TDataStd_RealArray.hxx>
-#endif
-
-class Standard_Transient;
-class Handle_Standard_Type;
-class Handle(TDataStd_RealArray);
-class SALOMEDS_TextHighlightColorAttribute;
-Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TextHighlightColorAttribute);
-
-class Handle(SALOMEDS_TextHighlightColorAttribute) : public Handle(TDataStd_RealArray) {
- public:
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- Handle(SALOMEDS_TextHighlightColorAttribute)():Handle(TDataStd_RealArray)() {}
- Handle(SALOMEDS_TextHighlightColorAttribute)(const Handle(SALOMEDS_TextHighlightColorAttribute)& aHandle) : Handle(TDataStd_RealArray)(aHandle)
- {
- }
-
- Handle(SALOMEDS_TextHighlightColorAttribute)(const SALOMEDS_TextHighlightColorAttribute* anItem) : Handle(TDataStd_RealArray)((TDataStd_RealArray *)anItem)
- {
- }
-
- Handle(SALOMEDS_TextHighlightColorAttribute)& operator=(const Handle(SALOMEDS_TextHighlightColorAttribute)& aHandle)
- {
- Assign(aHandle.Access());
- return *this;
- }
-
- Handle(SALOMEDS_TextHighlightColorAttribute)& operator=(const SALOMEDS_TextHighlightColorAttribute* anItem)
- {
- Assign((Standard_Transient *)anItem);
- return *this;
- }
-
- SALOMEDS_TextHighlightColorAttribute* operator->()
- {
- return (SALOMEDS_TextHighlightColorAttribute *)ControlAccess();
- }
-
- SALOMEDS_TextHighlightColorAttribute* operator->() const
- {
- return (SALOMEDS_TextHighlightColorAttribute *)ControlAccess();
- }
-
- Standard_EXPORT ~Handle(SALOMEDS_TextHighlightColorAttribute)();
-
- Standard_EXPORT static const Handle(SALOMEDS_TextHighlightColorAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
-};
-#endif
-I$(srcdir)/../Basics \
-I$(srcdir)/../SALOMELocalTrace \
-I$(srcdir)/../Utils \
+ -I$(srcdir)/../DF \
-I$(srcdir)/../SALOMEDSImpl \
-I$(srcdir)/../NamingService \
-I$(srcdir)/../GenericObj \
../SALOMELocalTrace/libSALOMELocalTrace.la \
../Basics/libSALOMEBasics.la \
../HDFPersist/libSalomeHDFPersist.la \
+ ../DF/libDF.la \
../SALOMEDSImpl/libSalomeDSImpl.la \
../GenericObj/libSalomeGenericObj.la \
../LifeCycleCORBA/libSalomeLifeCycleCORBA.la \
SALOMEDS_AttributeParameter.cxx \
SALOMEDS_AttributeString.cxx \
SALOMEDS_IParameters.cxx \
- \
- Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx \
- Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx \
- Handle_SALOMEDS_DrawableAttribute.hxx \
- Handle_SALOMEDS_ExpandableAttribute.hxx \
- Handle_SALOMEDS_ExternalFileDef.hxx \
- Handle_SALOMEDS_FileType.hxx \
- Handle_SALOMEDS_IORAttribute.hxx \
- Handle_SALOMEDS_LocalIDAttribute.hxx \
- Handle_SALOMEDS_OCAFApplication.hxx \
- Handle_SALOMEDS_OpenedAttribute.hxx \
- Handle_SALOMEDS_PersRefAttribute.hxx \
- Handle_SALOMEDS_PixMapAttribute.hxx \
- Handle_SALOMEDS_PythonObjectAttribute.hxx \
- Handle_SALOMEDS_SelectableAttribute.hxx \
- Handle_SALOMEDS_SequenceOfIntegerAttribute.hxx \
- Handle_SALOMEDS_SequenceOfRealAttribute.hxx \
- Handle_SALOMEDS_StudyPropertiesAttribute.hxx \
- Handle_SALOMEDS_TableOfIntegerAttribute.hxx \
- Handle_SALOMEDS_TableOfRealAttribute.hxx \
- Handle_SALOMEDS_TableOfStringAttribute.hxx \
- Handle_SALOMEDS_TargetAttribute.hxx \
- Handle_SALOMEDS_TextColorAttribute.hxx \
- Handle_SALOMEDS_TextHighlightColorAttribute.hxx \
SALOMEDS_AttLong_i.hxx \
SALOMEDS_AttReal_i.hxx \
SALOMEDS_AttributeComment.hxx \
SALOMEDS_ChildIterator.hxx \
SALOMEDS_ChildIterator_i.hxx \
SALOMEDS_ClientAttributes.hxx \
- SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx \
- SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx \
- SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx \
- SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx \
- SALOMEDS_DataMapOfIntegerString.hxx \
- SALOMEDS_DataMapStringLabel.hxx \
- SALOMEDS_DrawableAttribute.hxx \
SALOMEDS_Driver_i.hxx \
- SALOMEDS_ExpandableAttribute.hxx \
- SALOMEDS_ExternalFileDef.hxx \
SALOMEDS_FileType.hxx \
- SALOMEDS_FlagsAttribute.hxx \
SALOMEDS_GenericAttribute.hxx \
SALOMEDS_GenericAttribute_i.hxx \
- SALOMEDS_GraphicAttribute.hxx \
SALOMEDS.hxx \
- SALOMEDS_IORAttribute.hxx \
- SALOMEDS_LocalIDAttribute.hxx \
- SALOMEDS_OCAFApplication.hxx \
- SALOMEDS_OpenedAttribute.hxx \
- SALOMEDS_PersRefAttribute.hxx \
- SALOMEDS_PixMapAttribute.hxx \
- SALOMEDS_PythonObjectAttribute.hxx \
- SALOMEDS_SAttribute_i.hxx \
SALOMEDS_SComponent.hxx \
SALOMEDS_SComponent_i.hxx \
SALOMEDS_SComponentIterator.hxx \
SALOMEDS_SComponentIterator_i.hxx \
- SALOMEDS_SelectableAttribute.hxx \
- SALOMEDS_SequenceOfIntegerAttribute.hxx \
- SALOMEDS_SequenceOfRealAttribute.hxx \
SALOMEDS_SObject.hxx \
SALOMEDS_SObject_i.hxx \
SALOMEDS_StudyBuilder.hxx \
SALOMEDS_Study_i.hxx \
SALOMEDS_StudyManager.hxx \
SALOMEDS_StudyManager_i.hxx \
- SALOMEDS_StudyPropertiesAttribute.hxx \
- SALOMEDS_TableOfIntegerAttribute.hxx \
- SALOMEDS_TableOfRealAttribute.hxx \
- SALOMEDS_TableOfStringAttribute.hxx \
- SALOMEDS_TargetAttribute.hxx \
- SALOMEDS_TextColorAttribute.hxx \
- SALOMEDS_TextHighlightColorAttribute.hxx \
SALOMEDS_UseCaseBuilder.hxx \
SALOMEDS_UseCaseBuilder_i.hxx \
SALOMEDS_UseCaseIterator.hxx \
SALOMEDS_Server_LDADD = \
libSalomeDS.la $(COMMON_LIBS) \
../ResourcesManager/libSalomeResourcesManager.la \
- @CAS_OCAF@ \
@CORBA_LIBS@
SALOMEDS_Client_SOURCES = SALOMEDS_Client.cxx
SALOMEDS_Client_LDADD = \
libSalomeDS.la $(COMMON_LIBS) \
../ResourcesManager/libSalomeResourcesManager.la \
- -lTKLCAF -lTKMath \
@CORBA_LIBS@
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-package SALOMEDS
-
-uses TDocStd,
- TDF,
- TCollection,
- TColStd,
- TDataStd
-
-
-is
-
- class OCAFApplication ;
- class IORAttribute ;
- class PersRefAttribute;
- class SequenceOfRealAttribute;
- class SequenceOfIntegerAttribute;
- class DrawableAttribute;
- class SelectableAttribute;
- class ExpandableAttribute;
- class OpenedAttribute;
- class PixMapAttribute;
- class TextColorAttribute;
- class TextHighlightColorAttribute;
- class LocalIDAttribute;
- class UserIDAttribute;
- class TableOfIntegerAttribute;
- class TableOfRealAttribute;
- class StudyPropertiesAttribute;
- class PythonObjectAttribute;
-
- class DataMapStringLabel instantiates DataMap from TCollection
- (ExtendedString from TColleciton,
- Label from TDF,
- ExtendedString from TCollection);
-
-end SALOMEDS;
#include "SALOMEDS_AttLong_i.hxx"
#include "utilities.h"
-#include <TDF_Tool.hxx>
#include <stdio.h>
+#include <SALOMEDSImpl_AttributeInteger.hxx>
using namespace std;
//============================================================================
void SALOMEDS_AttLong_i::Set(CORBA::Long i)
{
CheckLocked();
- TDataStd_Integer::Set (_Lab,i);
+ SALOMEDSImpl_AttributeInteger::Set (_Lab,i);
}
//============================================================================
//============================================================================
CORBA::Long SALOMEDS_AttLong_i::Get()
{
- Handle(TDataStd_Integer) Att;
+ SALOMEDSImpl_AttributeInteger* Att = NULL;
CORBA::Long x;
- if (_Lab.FindAttribute(TDataStd_Integer::GetID(),Att))
+ if ((Att=(SALOMEDSImpl_AttributeInteger*)_Lab.FindAttribute(SALOMEDSImpl_AttributeInteger::GetID())))
x = Att->Get ();
return x;
}
//============================================================================
CORBA::Boolean SALOMEDS_AttLong_i::GetPtr(SALOMEDS::SObject_ptr anObject)
{
- Handle(TDataStd_Integer) Att;
- return _Lab.FindAttribute(TDataStd_Integer::GetID(),Att);
+ return (_Lab.IsAttribute(SALOMEDSImpl_AttributeInteger::GetID()));
}
//============================================================================
#define __SALOMEDS_ATTLONG_I_H__
// IDL headers
-#include <TDataStd_Integer.hxx>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS_AttLong)
#include "SALOMEDS_BasicAttribute_i.hxx"
#include "SALOMEDS_AttReal_i.hxx"
#include "utilities.h"
-#include <TDF_Tool.hxx>
#include <stdio.h>
#include <cstring>
+#include <SALOMEDSImpl_AttributeReal.hxx>
using namespace std;
//============================================================================
void SALOMEDS_AttReal_i::Set(CORBA::Double r)
{
CheckLocked();
- TDataStd_Real::Set (_Lab,r);
+ SALOMEDSImpl_AttributeReal::Set (_Lab,r);
}
//============================================================================
//============================================================================
CORBA::Double SALOMEDS_AttReal_i::Get()
{
- Handle(TDataStd_Real) Att;
+ SALOMEDSImpl_AttributeReal* Att;
CORBA::Double x;
- if (_Lab.FindAttribute(TDataStd_Real::GetID(),Att))
+ if ((Att=(SALOMEDSImpl_AttributeReal*)_Lab.FindAttribute(TDataStd_Real::GetID())))
x = Att->Get ();
return x;
}
//============================================================================
CORBA::Boolean SALOMEDS_AttReal_i::GetPtr(SALOMEDS::SObject_ptr anObject)
{
- Handle(TDataStd_Real) Att;
- return _Lab.FindAttribute(TDataStd_Real::GetID(),Att);
+ return _Lab.IsAttribute(SALOMEDSImpl_AttributeReal::GetID());
}
//============================================================================
#define __SALOMEDS_ATTREAL_I_H__
// IDL headers
-#include <TDataStd_Real.hxx>
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS_AttReal)
#include "SALOMEDS_BasicAttribute_i.hxx"
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributeComment::SALOMEDS_AttributeComment(const Handle(SALOMEDSImpl_AttributeComment)& theAttr)
+SALOMEDS_AttributeComment::SALOMEDS_AttributeComment(SALOMEDSImpl_AttributeComment* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeComment)::
- DownCast(_local_impl)->Value()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeComment*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeComment::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeComment)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeComment*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeComment::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributeComment: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeComment
{
public:
- SALOMEDS_AttributeComment(const Handle(SALOMEDSImpl_AttributeComment)& theAttr);
+ SALOMEDS_AttributeComment(SALOMEDSImpl_AttributeComment* theAttr);
SALOMEDS_AttributeComment(SALOMEDS::AttributeComment_ptr theAttr);
~SALOMEDS_AttributeComment();
#include "SALOMEDS_AttributeComment_i.hxx"
-#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
#include "SALOMEDS.hxx"
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeComment)::DownCast(_impl)->Value()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributeComment*>(_impl)->Value().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
- TCollection_AsciiString aStr((char*)value);
- Handle(SALOMEDSImpl_AttributeComment)::DownCast(_impl)->SetValue(TCollection_ExtendedString(aStr));
+ CORBA::String_var Str = CORBA::string_dup(value);
+ string aValue((char*)Str.in());
+ dynamic_cast<SALOMEDSImpl_AttributeComment*>(_impl)->SetValue(aValue);
}
public virtual SALOMEDS_GenericAttribute_i
{
public:
- SALOMEDS_AttributeComment_i(const Handle(SALOMEDSImpl_AttributeComment)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeComment_i(SALOMEDSImpl_AttributeComment* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
virtual ~SALOMEDS_AttributeComment_i() {};
#include "SALOMEDS_AttributeDrawable.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeDrawable::SALOMEDS_AttributeDrawable(const Handle(SALOMEDSImpl_AttributeDrawable)& theAttr)
+SALOMEDS_AttributeDrawable::SALOMEDS_AttributeDrawable(SALOMEDSImpl_AttributeDrawable* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
bool aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = (bool)Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_local_impl)->IsDrawable();
+ aValue = (bool)dynamic_cast<SALOMEDSImpl_AttributeDrawable*>(_local_impl)->IsDrawable();
}
else aValue = SALOMEDS::AttributeDrawable::_narrow(_corba_impl)->IsDrawable();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_local_impl)->SetDrawable((int)value);
+ dynamic_cast<SALOMEDSImpl_AttributeDrawable*>(_local_impl)->SetDrawable((int)value);
}
else SALOMEDS::AttributeDrawable::_narrow(_corba_impl)->SetDrawable(value);
}
class SALOMEDS_AttributeDrawable: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeDrawable
{
public:
- SALOMEDS_AttributeDrawable(const Handle(SALOMEDSImpl_AttributeDrawable)& theAttr);
+ SALOMEDS_AttributeDrawable(SALOMEDSImpl_AttributeDrawable* theAttr);
SALOMEDS_AttributeDrawable(SALOMEDS::AttributeDrawable_ptr theAttr);
~SALOMEDS_AttributeDrawable();
CORBA::Boolean SALOMEDS_AttributeDrawable_i::IsDrawable()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_impl)->IsDrawable() == 1);
+ return (dynamic_cast<SALOMEDSImpl_AttributeDrawable*>(_impl)->IsDrawable() == 1);
}
void SALOMEDS_AttributeDrawable_i::SetDrawable(CORBA::Boolean value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeDrawable)::DownCast(_impl)->SetDrawable(value);
+ dynamic_cast<SALOMEDSImpl_AttributeDrawable*>(_impl)->SetDrawable(value);
}
{
public:
- SALOMEDS_AttributeDrawable_i(const Handle(SALOMEDSImpl_AttributeDrawable)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeDrawable_i(SALOMEDSImpl_AttributeDrawable* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
virtual ~SALOMEDS_AttributeDrawable_i() {};
#include "SALOMEDS_AttributeExpandable.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeExpandable::SALOMEDS_AttributeExpandable
- (const Handle(SALOMEDSImpl_AttributeExpandable)& theAttr)
+SALOMEDS_AttributeExpandable::SALOMEDS_AttributeExpandable(SALOMEDSImpl_AttributeExpandable* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
bool aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = (bool)Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_local_impl)->IsExpandable();
+ aValue = (bool)dynamic_cast<SALOMEDSImpl_AttributeExpandable*>(_local_impl)->IsExpandable();
}
else aValue = SALOMEDS::AttributeExpandable::_narrow(_corba_impl)->IsExpandable();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_local_impl)->SetExpandable((int)value);
+ dynamic_cast<SALOMEDSImpl_AttributeExpandable*>(_local_impl)->SetExpandable((int)value);
}
else SALOMEDS::AttributeExpandable::_narrow(_corba_impl)->SetExpandable(value);
}
class SALOMEDS_AttributeExpandable: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeExpandable
{
public:
- SALOMEDS_AttributeExpandable(const Handle(SALOMEDSImpl_AttributeExpandable)& theAttr);
+ SALOMEDS_AttributeExpandable(SALOMEDSImpl_AttributeExpandable* theAttr);
SALOMEDS_AttributeExpandable(SALOMEDS::AttributeExpandable_ptr theAttr);
~SALOMEDS_AttributeExpandable();
CORBA::Boolean SALOMEDS_AttributeExpandable_i::IsExpandable()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_impl)->IsExpandable() == 1);
+ return (dynamic_cast<SALOMEDSImpl_AttributeExpandable*>(_impl)->IsExpandable() == 1);
}
void SALOMEDS_AttributeExpandable_i::SetExpandable(CORBA::Boolean value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeExpandable)::DownCast(_impl)->SetExpandable(value);
+ dynamic_cast<SALOMEDSImpl_AttributeExpandable*>(_impl)->SetExpandable(value);
}
{
public:
- SALOMEDS_AttributeExpandable_i(const Handle(SALOMEDSImpl_AttributeExpandable)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeExpandable_i(SALOMEDSImpl_AttributeExpandable* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeExpandable_i() {};
#include "SALOMEDS_AttributeExternalFileDef.hxx"
#include "SALOMEDS.hxx"
-
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributeExternalFileDef::SALOMEDS_AttributeExternalFileDef(const Handle(SALOMEDSImpl_AttributeExternalFileDef)& theAttr)
+SALOMEDS_AttributeExternalFileDef::SALOMEDS_AttributeExternalFileDef(SALOMEDSImpl_AttributeExternalFileDef* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeExternalFileDef)::
- DownCast(_local_impl)->Value()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeExternalFileDef*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeExternalFileDef::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeExternalFileDef*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeExternalFileDef::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributeExternalFileDef: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeExternalFileDef
{
public:
- SALOMEDS_AttributeExternalFileDef(const Handle(SALOMEDSImpl_AttributeExternalFileDef)& theAttr);
+ SALOMEDS_AttributeExternalFileDef(SALOMEDSImpl_AttributeExternalFileDef* theAttr);
SALOMEDS_AttributeExternalFileDef(SALOMEDS::AttributeExternalFileDef_ptr theAttr);
~SALOMEDS_AttributeExternalFileDef();
#include "SALOMEDS_AttributeExternalFileDef_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_ExtendedString.hxx>
using namespace std;
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_impl)->Value()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributeExternalFileDef*>(_impl)->Value().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributeExternalFileDef)::DownCast(_impl)->SetValue(TCollection_ExtendedString(Str));
+ dynamic_cast<SALOMEDSImpl_AttributeExternalFileDef*>(_impl)->SetValue(string(Str));
}
{
public:
- SALOMEDS_AttributeExternalFileDef_i(const Handle(SALOMEDSImpl_AttributeExternalFileDef)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeExternalFileDef_i(SALOMEDSImpl_AttributeExternalFileDef* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {}
~SALOMEDS_AttributeExternalFileDef_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributeFileType::SALOMEDS_AttributeFileType(const Handle(SALOMEDSImpl_AttributeFileType)& theAttr)
+SALOMEDS_AttributeFileType::SALOMEDS_AttributeFileType(SALOMEDSImpl_AttributeFileType* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeFileType)::
- DownCast(_local_impl)->Value()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeFileType*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeFileType::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeFileType*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeFileType::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributeFileType: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeFileType
{
public:
- SALOMEDS_AttributeFileType(const Handle(SALOMEDSImpl_AttributeFileType)& theAttr);
+ SALOMEDS_AttributeFileType(SALOMEDSImpl_AttributeFileType* theAttr);
SALOMEDS_AttributeFileType(SALOMEDS::AttributeFileType_ptr theAttr);
~SALOMEDS_AttributeFileType();
#include "SALOMEDS_AttributeFileType_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_ExtendedString.hxx>
using namespace std;
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_impl)->Value()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributeFileType*>(_impl)->Value().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributeFileType)::DownCast(_impl)->SetValue(TCollection_ExtendedString(Str));
+ string aValue((char*)Str.in());
+ dynamic_cast<SALOMEDSImpl_AttributeFileType*>(_impl)->SetValue(aValue);
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeFileType_i(const Handle(SALOMEDSImpl_AttributeFileType)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeFileType_i(SALOMEDSImpl_AttributeFileType* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeFileType_i() {};
#include "SALOMEDS_AttributeFlags.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeFlags::SALOMEDS_AttributeFlags(const Handle(SALOMEDSImpl_AttributeFlags)& theAttr)
+SALOMEDS_AttributeFlags::SALOMEDS_AttributeFlags(SALOMEDSImpl_AttributeFlags* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
int aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeFlags)::DownCast(_local_impl)->Get();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeFlags*>(_local_impl)->Get();
}
else aValue = SALOMEDS::AttributeFlags::_narrow(_corba_impl)->GetFlags();
return aValue;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeFlags)::DownCast(_local_impl)->Set(theFlags);
+ dynamic_cast<SALOMEDSImpl_AttributeFlags*>(_local_impl)->Set(theFlags);
}
else SALOMEDS::AttributeFlags::_narrow(_corba_impl)->SetFlags(theFlags);
}
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeFlags) anAttr = Handle(SALOMEDSImpl_AttributeFlags)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeFlags* anAttr = dynamic_cast<SALOMEDSImpl_AttributeFlags*>(_local_impl);
if (theValue)
anAttr->Set(anAttr->Get() | theFlag);
else
class SALOMEDS_AttributeFlags: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeFlags
{
public:
- SALOMEDS_AttributeFlags(const Handle(SALOMEDSImpl_AttributeFlags)& theAttr);
+ SALOMEDS_AttributeFlags(SALOMEDSImpl_AttributeFlags* theAttr);
SALOMEDS_AttributeFlags(SALOMEDS::AttributeFlags_ptr theAttr);
~SALOMEDS_AttributeFlags();
CORBA::Long SALOMEDS_AttributeFlags_i::GetFlags()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeFlags)::DownCast(_impl)->Get();
+ return dynamic_cast<SALOMEDSImpl_AttributeFlags*>(_impl)->Get();
}
//=======================================================================
void SALOMEDS_AttributeFlags_i::SetFlags( CORBA::Long theFlags )
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeFlags)::DownCast(_impl)->Set( theFlags );
+ dynamic_cast<SALOMEDSImpl_AttributeFlags*>(_impl)->Set( theFlags );
}
//=======================================================================
CORBA::Boolean SALOMEDS_AttributeFlags_i::Get( CORBA::Long theFlag )
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeFlags)::DownCast(_impl)->Get() & theFlag ? true : false;
+ return dynamic_cast<SALOMEDSImpl_AttributeFlags*>(_impl)->Get() & theFlag ? true : false;
}
//=======================================================================
void SALOMEDS_AttributeFlags_i::Set( CORBA::Long theFlag, CORBA::Boolean theValue )
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeFlags) anAttr = Handle(SALOMEDSImpl_AttributeFlags)::DownCast(_impl);
+ SALOMEDSImpl_AttributeFlags* anAttr = dynamic_cast<SALOMEDSImpl_AttributeFlags*>(_impl);
if ( theValue )
anAttr->Set( anAttr->Get() | theFlag );
else
{
public:
- SALOMEDS_AttributeFlags_i( const Handle(SALOMEDSImpl_AttributeFlags)& theAttr, CORBA::ORB_ptr orb )
+ SALOMEDS_AttributeFlags_i( SALOMEDSImpl_AttributeFlags* theAttr, CORBA::ORB_ptr orb )
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
virtual ~SALOMEDS_AttributeFlags_i() {};
#include "SALOMEDS_AttributeGraphic.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeGraphic::SALOMEDS_AttributeGraphic(const Handle(SALOMEDSImpl_AttributeGraphic)& theAttr)
+SALOMEDS_AttributeGraphic::SALOMEDS_AttributeGraphic(SALOMEDSImpl_AttributeGraphic* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
bool aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = (bool)Handle(SALOMEDSImpl_AttributeGraphic)::DownCast(_local_impl)->GetVisibility(theViewId);
+ aValue = (bool)dynamic_cast<SALOMEDSImpl_AttributeGraphic*>(_local_impl)->GetVisibility(theViewId);
}
else aValue = SALOMEDS::AttributeGraphic::_narrow(_corba_impl)->GetVisibility(theViewId);
return aValue;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeGraphic)::DownCast(_local_impl)->SetVisibility(theViewId, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeGraphic*>(_local_impl)->SetVisibility(theViewId, theValue);
}
else SALOMEDS::AttributeGraphic::_narrow(_corba_impl)->SetVisibility(theViewId, theValue);
}
class SALOMEDS_AttributeGraphic: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeGraphic
{
public:
- SALOMEDS_AttributeGraphic(const Handle(SALOMEDSImpl_AttributeGraphic)& theAttr);
+ SALOMEDS_AttributeGraphic(SALOMEDSImpl_AttributeGraphic* theAttr);
SALOMEDS_AttributeGraphic(SALOMEDS::AttributeGraphic_ptr theAttr);
~SALOMEDS_AttributeGraphic();
CORBA::Boolean theValue )
{
SALOMEDS::Locker lock;
- if ( !_impl.IsNull() )
- Handle(SALOMEDSImpl_AttributeGraphic)::DownCast(_impl)->SetVisibility( theViewId, theValue );
+ if ( _impl )
+ dynamic_cast<SALOMEDSImpl_AttributeGraphic*>(_impl)->SetVisibility( theViewId, theValue );
}
//=======================================================================
CORBA::Boolean SALOMEDS_AttributeGraphic_i::GetVisibility( CORBA::Long theViewId )
{
SALOMEDS::Locker lock;
- return !_impl.IsNull() ? Handle(SALOMEDSImpl_AttributeGraphic)::DownCast(_impl)->GetVisibility( theViewId ) : false;
+ return ( _impl ) ? dynamic_cast<SALOMEDSImpl_AttributeGraphic*>(_impl)->GetVisibility( theViewId ) : false;
}
{
public:
- SALOMEDS_AttributeGraphic_i( const Handle(SALOMEDSImpl_AttributeGraphic)& theAttr, CORBA::ORB_ptr orb )
+ SALOMEDS_AttributeGraphic_i( SALOMEDSImpl_AttributeGraphic* theAttr, CORBA::ORB_ptr orb )
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
virtual ~SALOMEDS_AttributeGraphic_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributeIOR::SALOMEDS_AttributeIOR(const Handle(SALOMEDSImpl_AttributeIOR)& theAttr)
+SALOMEDS_AttributeIOR::SALOMEDS_AttributeIOR(SALOMEDSImpl_AttributeIOR* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeIOR)::
- DownCast(_local_impl)->Value()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeIOR*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeIOR::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeIOR*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeIOR::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributeIOR: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeIOR
{
public:
- SALOMEDS_AttributeIOR(const Handle(SALOMEDSImpl_AttributeIOR)& theAttr);
+ SALOMEDS_AttributeIOR(SALOMEDSImpl_AttributeIOR* theAttr);
SALOMEDS_AttributeIOR(SALOMEDS::AttributeIOR_ptr theAttr);
~SALOMEDS_AttributeIOR();
#include "SALOMEDS_AttributeIOR_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_ExtendedString.hxx>
using namespace std;
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_impl)->Value()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributeIOR*>(_impl)->Value().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- TCollection_ExtendedString anExtStr((char *)Str.in());
- Handle(SALOMEDSImpl_AttributeIOR)::DownCast(_impl)->SetValue(anExtStr);
+ string anExtStr((char *)Str.in());
+ dynamic_cast<SALOMEDSImpl_AttributeIOR*>(_impl)->SetValue(anExtStr);
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeIOR_i(const Handle(SALOMEDSImpl_AttributeIOR)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeIOR_i(SALOMEDSImpl_AttributeIOR* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeIOR_i() {};
#include "SALOMEDS_AttributeInteger.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeInteger::SALOMEDS_AttributeInteger(const Handle(SALOMEDSImpl_AttributeInteger)& theAttr)
+SALOMEDS_AttributeInteger::SALOMEDS_AttributeInteger(SALOMEDSImpl_AttributeInteger* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
int SALOMEDS_AttributeInteger::Value()
{
- int aValue;
+ int aValue = 0;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_local_impl)->Value();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeInteger*>(_local_impl)->Value();
+ }
+ else {
+ aValue = SALOMEDS::AttributeInteger::_narrow(_corba_impl)->Value();
}
- else aValue = SALOMEDS::AttributeInteger::_narrow(_corba_impl)->Value();
return aValue;
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_local_impl)->SetValue(value);
+ dynamic_cast<SALOMEDSImpl_AttributeInteger*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeInteger::_narrow(_corba_impl)->SetValue(value);
}
class SALOMEDS_AttributeInteger: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeInteger
{
public:
- SALOMEDS_AttributeInteger(const Handle(SALOMEDSImpl_AttributeInteger)& theAttr);
+ SALOMEDS_AttributeInteger(SALOMEDSImpl_AttributeInteger* theAttr);
SALOMEDS_AttributeInteger(SALOMEDS::AttributeInteger_ptr theAttr);
~SALOMEDS_AttributeInteger();
CORBA::Long SALOMEDS_AttributeInteger_i::Value()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_impl)->Value();
+ return dynamic_cast<SALOMEDSImpl_AttributeInteger*>(_impl)->Value();
}
void SALOMEDS_AttributeInteger_i::SetValue(CORBA::Long value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeInteger)::DownCast(_impl)->SetValue(value);
+ dynamic_cast<SALOMEDSImpl_AttributeInteger*>(_impl)->SetValue(value);
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeInteger_i(const Handle(SALOMEDSImpl_AttributeInteger)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeInteger_i(SALOMEDSImpl_AttributeInteger* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeInteger_i() {};
#include "SALOMEDS_AttributeLocalID.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributeLocalID::SALOMEDS_AttributeLocalID(const Handle(SALOMEDSImpl_AttributeLocalID)& theAttr)
+SALOMEDS_AttributeLocalID::SALOMEDS_AttributeLocalID(SALOMEDSImpl_AttributeLocalID* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
int aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeLocalID)::DownCast(_local_impl)->Value();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeLocalID*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeLocalID::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeLocalID)::DownCast(_local_impl)->SetValue(value);
+ dynamic_cast<SALOMEDSImpl_AttributeLocalID*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeLocalID::_narrow(_corba_impl)->SetValue(value);
}
class SALOMEDS_AttributeLocalID: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeLocalID
{
public:
- SALOMEDS_AttributeLocalID(const Handle(SALOMEDSImpl_AttributeLocalID)& theAttr);
+ SALOMEDS_AttributeLocalID(SALOMEDSImpl_AttributeLocalID* theAttr);
SALOMEDS_AttributeLocalID(SALOMEDS::AttributeLocalID_ptr theAttr);
~SALOMEDS_AttributeLocalID();
CORBA::Long SALOMEDS_AttributeLocalID_i::Value()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeLocalID)::DownCast(_impl)->Value();
+ return dynamic_cast<SALOMEDSImpl_AttributeLocalID*>(_impl)->Value();
}
void SALOMEDS_AttributeLocalID_i::SetValue(CORBA::Long value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeLocalID)::DownCast(_impl)->SetValue(value);
+ dynamic_cast<SALOMEDSImpl_AttributeLocalID*>(_impl)->SetValue(value);
}
{
public:
- SALOMEDS_AttributeLocalID_i(const Handle(SALOMEDSImpl_AttributeLocalID)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeLocalID_i(SALOMEDSImpl_AttributeLocalID* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeLocalID_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributeName::SALOMEDS_AttributeName(const Handle(SALOMEDSImpl_AttributeName)& theAttr)
+SALOMEDS_AttributeName::SALOMEDS_AttributeName(SALOMEDSImpl_AttributeName* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeName)::
- DownCast(_local_impl)->Value()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeName*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeName::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeName)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeName*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeName::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributeName: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeName
{
public:
- SALOMEDS_AttributeName(const Handle(SALOMEDSImpl_AttributeName)& theAttr);
+ SALOMEDS_AttributeName(SALOMEDSImpl_AttributeName* theAttr);
SALOMEDS_AttributeName(SALOMEDS::AttributeName_ptr theAttr);
~SALOMEDS_AttributeName();
#include "SALOMEDS_AttributeName_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_ExtendedString.hxx>
using namespace std;
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeName)::DownCast(_impl)->Value()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributeName*>(_impl)->Value().c_str());
return c_s._retn();
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeName)::DownCast(_impl)->SetValue(TCollection_ExtendedString((char*)value));
+ dynamic_cast<SALOMEDSImpl_AttributeName*>(_impl)->SetValue(string(value));
}
{
public:
- SALOMEDS_AttributeName_i(const Handle(SALOMEDSImpl_AttributeName)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeName_i(SALOMEDSImpl_AttributeName* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeName_i() {};
#include "SALOMEDS_AttributeOpened.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeOpened::SALOMEDS_AttributeOpened(const Handle(SALOMEDSImpl_AttributeOpened)& theAttr)
+SALOMEDS_AttributeOpened::SALOMEDS_AttributeOpened(SALOMEDSImpl_AttributeOpened* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
bool aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = (bool)Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_local_impl)->IsOpened();
+ aValue = (bool)dynamic_cast<SALOMEDSImpl_AttributeOpened*>(_local_impl)->IsOpened();
}
else aValue = SALOMEDS::AttributeOpened::_narrow(_corba_impl)->IsOpened();
return aValue;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_local_impl)->SetOpened((int)value);
+ dynamic_cast<SALOMEDSImpl_AttributeOpened*>(_local_impl)->SetOpened((int)value);
}
else SALOMEDS::AttributeOpened::_narrow(_corba_impl)->SetOpened(value);
}
class SALOMEDS_AttributeOpened: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeOpened
{
public:
- SALOMEDS_AttributeOpened(const Handle(SALOMEDSImpl_AttributeOpened)& theAttr);
+ SALOMEDS_AttributeOpened(SALOMEDSImpl_AttributeOpened* theAttr);
SALOMEDS_AttributeOpened(SALOMEDS::AttributeOpened_ptr theAttr);
~SALOMEDS_AttributeOpened();
CORBA::Boolean SALOMEDS_AttributeOpened_i::IsOpened()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_impl)->IsOpened() == 1);
+ return (dynamic_cast<SALOMEDSImpl_AttributeOpened*>(_impl)->IsOpened() == 1);
}
void SALOMEDS_AttributeOpened_i::SetOpened(CORBA::Boolean value)
{
SALOMEDS::Locker lock;
- Standard_Integer val = 0;
+ int val = 0;
if (value != 0) val = 1;
- Handle(SALOMEDSImpl_AttributeOpened)::DownCast(_impl)->SetOpened(val);
+ dynamic_cast<SALOMEDSImpl_AttributeOpened*>(_impl)->SetOpened(val);
}
{
public:
- SALOMEDS_AttributeOpened_i(const Handle(SALOMEDSImpl_AttributeOpened)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeOpened_i(SALOMEDSImpl_AttributeOpened* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeOpened_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
+
+using namespace std;
//=======================================================================
/*!
* Purpose : Creates a new instance of SALOMEDS_AttributeParameter
*/
//=======================================================================
-SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter(const Handle(SALOMEDSImpl_AttributeParameter)& theAttr)
+SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter(SALOMEDSImpl_AttributeParameter* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetInt(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetInt(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetInt(theID.c_str(), theValue);
int aValue;
if(_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetInt(theID);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetInt(theID);
}
else
aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetInt(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetReal(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetReal(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetReal(theID.c_str(), theValue);
double aValue;
if(_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetReal(theID);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetReal(theID);
}
else
aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetReal(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetString(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetString(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetString(theID.c_str(), theValue.c_str());
string aValue;
if(_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetString(theID);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetString(theID);
}
else
aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetString(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetBool(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetBool(theID, theValue);
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetBool(theID.c_str(), theValue);
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetBool(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetBool(theID);
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetBool(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetRealArray(theID, theArray);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetRealArray(theID, theArray);
}
else {
SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq;
vector<double> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetRealArray(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetRealArray(theID);
}
else {
SALOMEDS::DoubleSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetRealArray(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetIntArray(theID, theArray);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetIntArray(theID, theArray);
}
else {
SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq;
vector<int> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetIntArray(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetIntArray(theID);
}
else {
SALOMEDS::LongSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetIntArray(theID.c_str());
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->SetStrArray(theID, theArray);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetStrArray(theID, theArray);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq;
vector<string> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetStrArray(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetStrArray(theID);
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetStrArray(theID.c_str());
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->IsSet(theID, (Parameter_Types)theType);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->IsSet(theID, (Parameter_Types)theType);
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsSet(theID.c_str(), theType);
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->RemoveID(theID, (Parameter_Types)theType);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->RemoveID(theID, (Parameter_Types)theType);
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->RemoveID(theID.c_str(), theType);
SALOMEDSClient_AttributeParameter* AP = NULL;
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) AP_impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->GetFather();
- if(AP_impl.IsNull()) return _PTR(AttributeParameter)(AP);
+ SALOMEDSImpl_AttributeParameter* AP_impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetFather();
+ if(!AP_impl) return _PTR(AttributeParameter)(AP);
AP = new SALOMEDS_AttributeParameter(AP_impl);
}
else {
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->HasFather();
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->HasFather();
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->HasFather();
{
if(_isLocal) {
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->IsRoot();
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->IsRoot();
}
else
return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsRoot();
{
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl)->Clear();
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->Clear();
}
else
SALOMEDS::AttributeParameter::_narrow(_corba_impl)->Clear();
vector<string> v;
if(_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) AP_impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeParameter* AP_impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl);
return AP_impl->GetIDs((Parameter_Types)theType);
}
else {
class SALOMEDS_AttributeParameter: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeParameter
{
public:
- SALOMEDS_AttributeParameter(const Handle(SALOMEDSImpl_AttributeParameter)& theAttr);
+ SALOMEDS_AttributeParameter(SALOMEDSImpl_AttributeParameter* theAttr);
SALOMEDS_AttributeParameter(SALOMEDS::AttributeParameter_ptr theAttr);
~SALOMEDS_AttributeParameter();
#include "SALOMEDS_AttributeParameter_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
#include <vector>
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetInt(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->SetInt(theID, theValue);
}
//=======================================================================
CORBA::Long SALOMEDS_AttributeParameter_i::GetInt(const char* theID)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetInt(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetInt(theID);
}
//=======================================================================
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetReal(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->SetReal(theID, theValue);
}
//=======================================================================
CORBA::Double SALOMEDS_AttributeParameter_i::GetReal(const char* theID)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetReal(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetReal(theID);
}
//=======================================================================
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeParameter) impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl);
+ SALOMEDSImpl_AttributeParameter* impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl);
impl->SetString(theID, theValue);
}
char* SALOMEDS_AttributeParameter_i::GetString(const char* theID)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl);
+ SALOMEDSImpl_AttributeParameter* impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl);
CORBA::String_var c_s = CORBA::string_dup(impl->GetString(theID).c_str());
return c_s._retn();
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetBool(theID, theValue);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->SetBool(theID, theValue);
}
//=======================================================================
CORBA::Boolean SALOMEDS_AttributeParameter_i::GetBool(const char* theID)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetBool(theID);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetBool(theID);
}
//=======================================================================
v.resize(length);
for(int i = 0; i<length; i++) v[i] = theArray[i];
}
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetRealArray(theID, v);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->SetRealArray(theID, v);
}
//=======================================================================
{
SALOMEDS::Locker lock;
SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq;
- vector<double> v = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetRealArray(theID);
+ vector<double> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetRealArray(theID);
int length = v.size();
if(length) {
aSeq->length(length);
v.resize(length);
for(int i = 0; i<length; i++) v[i] = theArray[i];
}
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetIntArray(theID, v);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->SetIntArray(theID, v);
}
//=======================================================================
{
SALOMEDS::Locker lock;
SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq;
- vector<int> v = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetIntArray(theID);
+ vector<int> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIntArray(theID);
int length = v.size();
if(length) {
aSeq->length(length);
v.resize(length);
for(int i = 0; i<length; i++) v[i] = string(theArray[i].in());
}
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->SetStrArray(theID, v);
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->SetStrArray(theID, v);
}
//=======================================================================
{
SALOMEDS::Locker lock;
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq;
- vector<string> v = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetStrArray(theID);
+ vector<string> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetStrArray(theID);
int length = v.size();
if(length) {
aSeq->length(length);
CORBA::Boolean SALOMEDS_AttributeParameter_i::IsSet(const char* theID, CORBA::Long theType)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->IsSet(theID, (Parameter_Types)theType);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->IsSet(theID, (Parameter_Types)theType);
}
//=======================================================================
{
SALOMEDS::Locker lock;
CheckLocked();
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->RemoveID(theID, (Parameter_Types)theType);
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->RemoveID(theID, (Parameter_Types)theType);
}
//=======================================================================
SALOMEDS::AttributeParameter_ptr SALOMEDS_AttributeParameter_i::GetFather()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) impl = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl);
+ SALOMEDSImpl_AttributeParameter* impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl);
SALOMEDS_AttributeParameter_i* attr = new SALOMEDS_AttributeParameter_i(impl, _orb);
return attr->AttributeParameter::_this();
}
CORBA::Boolean SALOMEDS_AttributeParameter_i::HasFather()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->HasFather();
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->HasFather();
}
//=======================================================================
CORBA::Boolean SALOMEDS_AttributeParameter_i::IsRoot()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->IsRoot();
+ return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->IsRoot();
}
//=======================================================================
void SALOMEDS_AttributeParameter_i::Clear()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->Clear();
+ dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->Clear();
}
{
SALOMEDS::Locker lock;
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
- vector<string> A = Handle(SALOMEDSImpl_AttributeParameter)::DownCast(_impl)->GetIDs((Parameter_Types)theType);
+ vector<string> A = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIDs((Parameter_Types)theType);
if(A.size()) {
int length = A.size();
{
public:
- SALOMEDS_AttributeParameter_i(const Handle(SALOMEDSImpl_AttributeParameter)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeParameter_i(SALOMEDSImpl_AttributeParameter* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeParameter_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributePersistentRef::SALOMEDS_AttributePersistentRef(const Handle(SALOMEDSImpl_AttributePersistentRef)& theAttr)
+SALOMEDS_AttributePersistentRef::SALOMEDS_AttributePersistentRef(SALOMEDSImpl_AttributePersistentRef* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePersistentRef)::
- DownCast(_local_impl)->Value()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributePersistentRef*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributePersistentRef::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributePersistentRef*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributePersistentRef::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributePersistentRef: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributePersistentRef
{
public:
- SALOMEDS_AttributePersistentRef(const Handle(SALOMEDSImpl_AttributePersistentRef)& theAttr);
+ SALOMEDS_AttributePersistentRef(SALOMEDSImpl_AttributePersistentRef* theAttr);
SALOMEDS_AttributePersistentRef(SALOMEDS::AttributePersistentRef_ptr theAttr);
~SALOMEDS_AttributePersistentRef();
#include "SALOMEDS_AttributePersistentRef_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_ExtendedString.hxx>
using namespace std;
{
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_impl)->Value()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributePersistentRef*>(_impl)->Value().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributePersistentRef)::DownCast(_impl)->SetValue(TCollection_ExtendedString(Str));
+ dynamic_cast<SALOMEDSImpl_AttributePersistentRef*>(_impl)->SetValue(string(Str));
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributePersistentRef_i(const Handle(SALOMEDSImpl_AttributePersistentRef)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributePersistentRef_i(SALOMEDSImpl_AttributePersistentRef* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributePersistentRef_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributePixMap::SALOMEDS_AttributePixMap(const Handle(SALOMEDSImpl_AttributePixMap)& theAttr)
+SALOMEDS_AttributePixMap::SALOMEDS_AttributePixMap(SALOMEDSImpl_AttributePixMap* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_local_impl)->HasPixMap();
+ ret = dynamic_cast<SALOMEDSImpl_AttributePixMap*>(_local_impl)->HasPixMap();
}
else ret = SALOMEDS::AttributePixMap::_narrow(_corba_impl)->HasPixMap();
return ret;
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePixMap)::
- DownCast(_local_impl)->GetPixMap()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributePixMap*>(_local_impl)->GetPixMap();
}
else aValue = SALOMEDS::AttributePixMap::_narrow(_corba_impl)->GetPixMap();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_local_impl)->SetPixMap((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributePixMap*>(_local_impl)->SetPixMap(value);
}
else SALOMEDS::AttributePixMap::_narrow(_corba_impl)->SetPixMap(value.c_str());
}
class SALOMEDS_AttributePixMap: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributePixMap
{
public:
- SALOMEDS_AttributePixMap(const Handle(SALOMEDSImpl_AttributePixMap)& theAttr);
+ SALOMEDS_AttributePixMap(SALOMEDSImpl_AttributePixMap* theAttr);
SALOMEDS_AttributePixMap(SALOMEDS::AttributePixMap_ptr theAttr);
~SALOMEDS_AttributePixMap();
#include "SALOMEDS_AttributePixMap_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-
using namespace std;
CORBA::Boolean SALOMEDS_AttributePixMap_i::HasPixMap()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->HasPixMap();
+ return dynamic_cast<SALOMEDSImpl_AttributePixMap*>(_impl)->HasPixMap();
}
char* SALOMEDS_AttributePixMap_i::GetPixMap()
{
SALOMEDS::Locker lock;
CORBA::String_var S =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePixMap)::
- DownCast(_impl)->GetPixMap()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributePixMap*>(_impl)->GetPixMap().c_str());
return S._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributePixMap)::DownCast(_impl)->SetPixMap(TCollection_ExtendedString(Str));
+ dynamic_cast<SALOMEDSImpl_AttributePixMap*>(_impl)->SetPixMap(string(Str));
}
{
public:
- SALOMEDS_AttributePixMap_i(const Handle(SALOMEDSImpl_AttributePixMap)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributePixMap_i(SALOMEDSImpl_AttributePixMap* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributePixMap_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributePythonObject::SALOMEDS_AttributePythonObject(const Handle(SALOMEDSImpl_AttributePythonObject)& theAttr)
+SALOMEDS_AttributePythonObject::SALOMEDS_AttributePythonObject(SALOMEDSImpl_AttributePythonObject* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_local_impl)->IsScript();
+ ret = dynamic_cast<SALOMEDSImpl_AttributePythonObject*>(_local_impl)->IsScript();
}
else ret = SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->IsScript();
return ret;
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributePythonObject)::
- DownCast(_local_impl)->GetObject()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributePythonObject*>(_local_impl)->GetObject().c_str();
}
else aValue = SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->GetObject();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributePythonObject)::
- DownCast(_local_impl)->SetObject((char*)theSequence.c_str(), IsScript);
+ dynamic_cast<SALOMEDSImpl_AttributePythonObject*>(_local_impl)->SetObject(theSequence, IsScript);
}
else SALOMEDS::AttributePythonObject::_narrow(_corba_impl)->SetObject(theSequence.c_str(), IsScript);
}
class SALOMEDS_AttributePythonObject: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributePythonObject
{
public:
- SALOMEDS_AttributePythonObject(const Handle(SALOMEDSImpl_AttributePythonObject)& theAttr);
+ SALOMEDS_AttributePythonObject(SALOMEDSImpl_AttributePythonObject* theAttr);
SALOMEDS_AttributePythonObject(SALOMEDS::AttributePythonObject_ptr theAttr);
~SALOMEDS_AttributePythonObject();
#include "SALOMEDS_AttributePythonObject_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HArray1OfCharacter.hxx>
using namespace std;
SALOMEDS::Locker lock;
CheckLocked();
char *aSeq = CORBA::string_dup(theSequence);
- Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_impl)->SetObject(aSeq, IsScript);
+ dynamic_cast<SALOMEDSImpl_AttributePythonObject*>(_impl)->SetObject(aSeq, IsScript);
}
char* SALOMEDS_AttributePythonObject_i::GetObject()
{
SALOMEDS::Locker lock;
- TCollection_AsciiString aSeq(Handle(SALOMEDSImpl_AttributePythonObject)::
- DownCast(_impl)->GetObject().ToCString());
- CORBA::String_var aStr = CORBA::string_dup(aSeq.ToCString());
+ string aSeq(dynamic_cast<SALOMEDSImpl_AttributePythonObject*>(_impl)->GetObject());
+ CORBA::String_var aStr = CORBA::string_dup(aSeq.c_str());
return aStr._retn();
}
CORBA::Boolean SALOMEDS_AttributePythonObject_i::IsScript()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributePythonObject)::DownCast(_impl)->IsScript();
+ return dynamic_cast<SALOMEDSImpl_AttributePythonObject*>(_impl)->IsScript();
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributePythonObject_i(const Handle(SALOMEDSImpl_AttributePythonObject)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributePythonObject_i(SALOMEDSImpl_AttributePythonObject* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributePythonObject_i() {};
#include "SALOMEDS_AttributeReal.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeReal::SALOMEDS_AttributeReal(const Handle(SALOMEDSImpl_AttributeReal)& theAttr)
+SALOMEDS_AttributeReal::SALOMEDS_AttributeReal(SALOMEDSImpl_AttributeReal* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
double aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeReal)::DownCast(_local_impl)->Value();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeReal*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeReal::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeReal)::DownCast(_local_impl)->SetValue(value);
+ dynamic_cast<SALOMEDSImpl_AttributeReal*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeReal::_narrow(_corba_impl)->SetValue(value);
}
class SALOMEDS_AttributeReal: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeReal
{
public:
- SALOMEDS_AttributeReal(const Handle(SALOMEDSImpl_AttributeReal)& theAttr);
+ SALOMEDS_AttributeReal(SALOMEDSImpl_AttributeReal* theAttr);
SALOMEDS_AttributeReal(SALOMEDS::AttributeReal_ptr theAttr);
~SALOMEDS_AttributeReal();
CORBA::Double SALOMEDS_AttributeReal_i::Value()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeReal)::DownCast(_impl)->Value();
+ return dynamic_cast<SALOMEDSImpl_AttributeReal*>(_impl)->Value();
}
void SALOMEDS_AttributeReal_i::SetValue(CORBA::Double value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeReal)::DownCast(_impl)->SetValue(value);
+ dynamic_cast<SALOMEDSImpl_AttributeReal*>(_impl)->SetValue(value);
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeReal_i(const Handle(SALOMEDSImpl_AttributeReal)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeReal_i(SALOMEDSImpl_AttributeReal* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeReal_i() {};
#include "SALOMEDS_AttributeSelectable.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-SALOMEDS_AttributeSelectable::SALOMEDS_AttributeSelectable(const Handle(SALOMEDSImpl_AttributeSelectable)& theAttr)
+SALOMEDS_AttributeSelectable::SALOMEDS_AttributeSelectable(SALOMEDSImpl_AttributeSelectable* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
bool aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = (bool)Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_local_impl)->IsSelectable();
+ aValue = (bool)dynamic_cast<SALOMEDSImpl_AttributeSelectable*>(_local_impl)->IsSelectable();
}
else aValue = SALOMEDS::AttributeSelectable::_narrow(_corba_impl)->IsSelectable();
return aValue;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_local_impl)->SetSelectable((int)value);
+ dynamic_cast<SALOMEDSImpl_AttributeSelectable*>(_local_impl)->SetSelectable((int)value);
}
else SALOMEDS::AttributeSelectable::_narrow(_corba_impl)->SetSelectable(value);
}
class SALOMEDS_AttributeSelectable: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeSelectable
{
public:
- SALOMEDS_AttributeSelectable(const Handle(SALOMEDSImpl_AttributeSelectable)& theAttr);
+ SALOMEDS_AttributeSelectable(SALOMEDSImpl_AttributeSelectable* theAttr);
SALOMEDS_AttributeSelectable(SALOMEDS::AttributeSelectable_ptr theAttr);
~SALOMEDS_AttributeSelectable();
CORBA::Boolean SALOMEDS_AttributeSelectable_i::IsSelectable()
{
SALOMEDS::Locker lock;
- return (Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_impl)->IsSelectable() == 1);
+ return (dynamic_cast<SALOMEDSImpl_AttributeSelectable*>(_impl)->IsSelectable() == 1);
}
void SALOMEDS_AttributeSelectable_i::SetSelectable(CORBA::Boolean value)
{
SALOMEDS::Locker lock;
- Standard_Integer val = 0;
+ int val = 0;
if (value != 0) val = 1;
- Handle(SALOMEDSImpl_AttributeSelectable)::DownCast(_impl)->SetSelectable(val);
+ dynamic_cast<SALOMEDSImpl_AttributeSelectable*>(_impl)->SetSelectable(val);
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeSelectable_i(const Handle(SALOMEDSImpl_AttributeSelectable)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeSelectable_i(SALOMEDSImpl_AttributeSelectable* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeSelectable_i() {};
#include "SALOMEDS_AttributeSequenceOfInteger.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HSequenceOfInteger.hxx>
-
SALOMEDS_AttributeSequenceOfInteger::SALOMEDS_AttributeSequenceOfInteger
- (const Handle(SALOMEDSImpl_AttributeSequenceOfInteger)& theAttr)
+ (SALOMEDSImpl_AttributeSequenceOfInteger* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
- for (i = 0; i < aLength; i++) aSeq->Append(other[i]);
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_local_impl)->Assign(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl)->Assign(other);
}
else {
SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq();
int i, aLength;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger) aSeqAttr;
- aSeqAttr = Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeSequenceOfInteger* aSeqAttr;
+ aSeqAttr = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl);
aLength = aSeqAttr->Length();
for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value(i));
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_local_impl)->Add(value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl)->Add(value);
}
else SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->Add(value);
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_local_impl)->Remove(index);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl)->Remove(index);
}
else SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->Remove(index);
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_local_impl)->ChangeValue(index, value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl)->ChangeValue(index, value);
}
else SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->ChangeValue(index, value);
}
int aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_local_impl)->Value(index);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl)->Value(index);
}
else aValue = SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->Value(index);
return aValue;
int aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_local_impl)-> Length();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl)-> Length();
}
else aValue = SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)-> Length();
return aValue;
class SALOMEDS_AttributeSequenceOfInteger: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeSequenceOfInteger
{
public:
- SALOMEDS_AttributeSequenceOfInteger(const Handle(SALOMEDSImpl_AttributeSequenceOfInteger)& theAttr);
+ SALOMEDS_AttributeSequenceOfInteger(SALOMEDSImpl_AttributeSequenceOfInteger* theAttr);
SALOMEDS_AttributeSequenceOfInteger(SALOMEDS::AttributeSequenceOfInteger_ptr theAttr);
~SALOMEDS_AttributeSequenceOfInteger();
#include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HSequenceOfInteger.hxx>
+#include <vector>
+
using namespace std;
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(TColStd_HSequenceOfInteger) CasCadeSeq = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < other.length(); i++) {
- CasCadeSeq->Append(other[i]);
- }
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Assign(CasCadeSeq);
+ vector<int> aSeq;
+ for(int i = 0, len = other.length(); i<len; i++) aSeq.push_back(other[i]);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->Assign(aSeq);
}
SALOMEDS::LongSeq* SALOMEDS_AttributeSequenceOfInteger_i::CorbaSequence()
{
SALOMEDS::Locker lock;
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger) CasCadeSeq;
- CasCadeSeq = Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl);
- CorbaSeq->length(CasCadeSeq->Length());
- for (int i = 0; i < CasCadeSeq->Length(); i++) {
- CorbaSeq[i] = CasCadeSeq->Value(i+1);;
+ const vector<int>& CasCadeSeq = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->Array();
+ int len = CasCadeSeq.size();
+ CorbaSeq->length(len);
+ for (int i = 0; i < len; i++) {
+ CorbaSeq[i] = CasCadeSeq[i];
}
return CorbaSeq._retn();
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Add(value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->Add(value);
}
void SALOMEDS_AttributeSequenceOfInteger_i::Remove(CORBA::Long index)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Remove(index);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->Remove(index);
}
void SALOMEDS_AttributeSequenceOfInteger_i::ChangeValue(CORBA::Long index, CORBA::Long value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->ChangeValue(index, value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->ChangeValue(index, value);
}
CORBA::Long SALOMEDS_AttributeSequenceOfInteger_i::Value(CORBA::Short index)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Value(index);
+ return dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->Value(index);
}
CORBA::Long SALOMEDS_AttributeSequenceOfInteger_i::Length()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Length();
+ return dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->Length();
}
{
public:
- SALOMEDS_AttributeSequenceOfInteger_i(const Handle(SALOMEDSImpl_AttributeSequenceOfInteger)& theAttr,CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeSequenceOfInteger_i(SALOMEDSImpl_AttributeSequenceOfInteger* theAttr,CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeSequenceOfInteger_i() {};
#include "SALOMEDS_AttributeSequenceOfReal.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HSequenceOfReal.hxx>
-
SALOMEDS_AttributeSequenceOfReal::SALOMEDS_AttributeSequenceOfReal
- (const Handle(SALOMEDSImpl_AttributeSequenceOfReal)& theAttr)
+ (SALOMEDSImpl_AttributeSequenceOfReal* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfReal) aSeq = new TColStd_HSequenceOfReal;
- for (i = 0; i < aLength; i++) aSeq->Append(other[i]);
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_local_impl)->Assign(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl)->Assign(other);
}
else {
SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq();
int i, aLength;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfReal) aSeqAttr;
- aSeqAttr = Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeSequenceOfReal* aSeqAttr = NULL;
+ aSeqAttr = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl);
aLength = aSeqAttr->Length();
for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value(i));
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_local_impl)->Add(value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl)->Add(value);
}
else SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->Add(value);
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_local_impl)->Remove(index);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl)->Remove(index);
}
else SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->Remove(index);
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_local_impl)->ChangeValue(index, value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl)->ChangeValue(index, value);
}
else SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->ChangeValue(index, value);
}
double aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_local_impl)->Value(index);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl)->Value(index);
}
else aValue = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->Value(index);
return aValue;
int aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_local_impl)-> Length();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl)-> Length();
}
else aValue = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)-> Length();
return aValue;
class SALOMEDS_AttributeSequenceOfReal: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeSequenceOfReal
{
public:
- SALOMEDS_AttributeSequenceOfReal(const Handle(SALOMEDSImpl_AttributeSequenceOfReal)& theAttr);
+ SALOMEDS_AttributeSequenceOfReal(SALOMEDSImpl_AttributeSequenceOfReal* theAttr);
SALOMEDS_AttributeSequenceOfReal(SALOMEDS::AttributeSequenceOfReal_ptr theAttr);
~SALOMEDS_AttributeSequenceOfReal();
#include "SALOMEDS_AttributeSequenceOfReal_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HSequenceOfReal.hxx>
+#include <vector>
using namespace std;
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(TColStd_HSequenceOfReal) CasCadeSeq = new TColStd_HSequenceOfReal;
+ vector<double> CasCadeSeq;
for (int i = 0; i < other.length(); i++) {
- CasCadeSeq->Append(other[i]);
+ CasCadeSeq.push_back(other[i]);
}
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_impl)->Assign(CasCadeSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Assign(CasCadeSeq);
}
SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence()
{
SALOMEDS::Locker lock;
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
- Handle(SALOMEDSImpl_AttributeSequenceOfReal) CasCadeSeq = Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_impl);
- CorbaSeq->length(CasCadeSeq->Length());
- for (int i = 0; i < CasCadeSeq->Length(); i++) {
- CorbaSeq[i] = CasCadeSeq->Value(i+1);;
+ const vector<double>& CasCadeSeq = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Array();
+ int len = CasCadeSeq.size();
+ CorbaSeq->length(len);
+ for (int i = 0; i < len; i++) {
+ CorbaSeq[i] = CasCadeSeq[i];
}
return CorbaSeq._retn();
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_impl)->Add(value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Add(value);
}
void SALOMEDS_AttributeSequenceOfReal_i::Remove(CORBA::Long index)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_impl)->Remove(index);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Remove(index);
}
void SALOMEDS_AttributeSequenceOfReal_i::ChangeValue(CORBA::Long index, CORBA::Double value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_impl)->ChangeValue(index, value);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->ChangeValue(index, value);
}
CORBA::Double SALOMEDS_AttributeSequenceOfReal_i::Value(CORBA::Short index)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_impl)->Value(index);
+ return dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Value(index);
}
CORBA::Long SALOMEDS_AttributeSequenceOfReal_i::Length()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeSequenceOfReal)::DownCast(_impl)->Length();
+ return dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Length();
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeSequenceOfReal_i(const Handle(SALOMEDSImpl_AttributeSequenceOfReal)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeSequenceOfReal_i(SALOMEDSImpl_AttributeSequenceOfReal* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeSequenceOfReal_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-SALOMEDS_AttributeString::SALOMEDS_AttributeString(const Handle(SALOMEDSImpl_AttributeString)& theAttr)
+SALOMEDS_AttributeString::SALOMEDS_AttributeString(SALOMEDSImpl_AttributeString* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeString)::
- DownCast(_local_impl)->Value()).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeString*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeString::_narrow(_corba_impl)->Value();
return aValue;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeString)::DownCast(_local_impl)->SetValue((char*)value.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeString*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeString::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributeString: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeString
{
public:
- SALOMEDS_AttributeString(const Handle(SALOMEDSImpl_AttributeString)& theAttr);
+ SALOMEDS_AttributeString(SALOMEDSImpl_AttributeString* theAttr);
SALOMEDS_AttributeString(SALOMEDS::AttributeString_ptr theAttr);
~SALOMEDS_AttributeString();
#include "SALOMEDS_AttributeString_i.hxx"
-#include <TCollection_ExtendedString.hxx>
#include "SALOMEDS_SObject_i.hxx"
#include "SALOMEDS.hxx"
SALOMEDS::Locker lock;
CORBA::String_var c_s =
- CORBA::string_dup(TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeString)::DownCast(_impl)->Value()).ToCString());
+ CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributeString*>(_impl)->Value().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
- TCollection_AsciiString aStr((char*)value);
- Handle(SALOMEDSImpl_AttributeString)::DownCast(_impl)->SetValue(TCollection_ExtendedString(aStr));
+ dynamic_cast<SALOMEDSImpl_AttributeString*>(_impl)->SetValue(string(value));
}
public virtual SALOMEDS_GenericAttribute_i
{
public:
- SALOMEDS_AttributeString_i(const Handle(SALOMEDSImpl_AttributeString)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeString_i(SALOMEDSImpl_AttributeString* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
virtual ~SALOMEDS_AttributeString_i() {};
#include "SALOMEDS_AttributeStudyProperties.hxx"
#include "SALOMEDS.hxx"
-#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#include <TColStd_HSequenceOfInteger.hxx>
+using namespace std;
SALOMEDS_AttributeStudyProperties::SALOMEDS_AttributeStudyProperties
- (const Handle(SALOMEDSImpl_AttributeStudyProperties)& theAttr)
+ (SALOMEDSImpl_AttributeStudyProperties* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties) anImpl =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl);
- anImpl->ChangeCreatorName((char*)theName.c_str());
+ SALOMEDSImpl_AttributeStudyProperties* anImpl =
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl);
+ anImpl->ChangeCreatorName(theName);
} else
SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetUserName(theName.c_str());
}
std::string aName;
if (_isLocal) {
SALOMEDS::Locker lock;
- TCollection_ExtendedString S =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->GetCreatorName();
- aName = TCollection_AsciiString(S).ToCString();
+ aName = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->GetCreatorName();
}
#ifndef WNT
else aName = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetUserName();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties) anImpl =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeStudyProperties* anImpl =
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl);
int aTmp;
if (anImpl->GetCreationDate(aTmp, aTmp, aTmp, aTmp, aTmp)) return;
- TCollection_ExtendedString S;
+ string S;
anImpl->SetModification(S, theMinute, theHour, theDay, theMonth, theYear);
} else {
SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetCreationDate(theMinute,
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast
+ ret = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>
(_local_impl)->GetCreationDate(theMinute, theHour, theDay, theMonth, theYear);
} else {
CORBA::Long aMinute, anHour, aDay, aMonth, anYear;
CheckLocked();
SALOMEDS::Locker lock;
if (theMode == "from scratch")
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetCreationMode(1);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->SetCreationMode(1);
else if (theMode == "copy from")
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetCreationMode(2);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->SetCreationMode(2);
else //Not defined
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetCreationMode(0);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->SetCreationMode(0);
}
else SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetCreationMode(theMode.c_str());
}
std::string aMode;
if (_isLocal) {
SALOMEDS::Locker lock;
- int mode = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->GetCreationMode();
+ int mode = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->GetCreationMode();
if (mode == 1) aMode = "from scratch";
if (mode == 2) aMode = "copy from";
}
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetModified(theModified);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->SetModified(theModified);
}
else
SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetModified(theModified);
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->IsModified();
+ ret = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->IsModified();
}
else
ret = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->IsModified();
int isModified;
if (_isLocal) {
SALOMEDS::Locker lock;
- isModified = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->GetModified();
+ isModified = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->GetModified();
}
else
isModified = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->GetModified();
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->SetLocked(theLocked);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->SetLocked(theLocked);
}
else
SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetLocked(theLocked);
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl)->IsLocked();
+ ret = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl)->IsLocked();
}
else
ret = SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->IsLocked();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties) anImpl =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl);
- anImpl->SetModification((char*)theName.c_str(), theMinute, theHour, theDay, theMonth, theYear);
+ SALOMEDSImpl_AttributeStudyProperties* anImpl = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl);
+ anImpl->SetModification(theName, theMinute, theHour, theDay, theMonth, theYear);
} else
SALOMEDS::AttributeStudyProperties::_narrow(_corba_impl)->SetModification(theName.c_str(),
theMinute,
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aNames;
- Handle(TColStd_HSequenceOfInteger) aMinutes, aHours, aDays, aMonths, aYears;
- Handle(SALOMEDSImpl_AttributeStudyProperties) anImpl =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_local_impl);
+ vector<string> aNames;
+ vector<int> aMinutes, aHours, aDays, aMonths, aYears;
+ SALOMEDSImpl_AttributeStudyProperties* anImpl = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl);
anImpl->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- aLength = aNames->Length();
+ aLength = aNames.size();
i = ((theWithCreator) ? 1 : 2);
for (; i <= aLength; i++) {
- theNames.push_back(TCollection_AsciiString(aNames->Value(i)).ToCString());
- theMinutes.push_back(aMinutes->Value(i));
- theHours.push_back(aHours->Value(i));
- theDays.push_back(aDays->Value(i));
- theMonths.push_back(aMonths->Value(i));
- theYears.push_back(aYears->Value(i));
+ theNames.push_back(aNames[i-1]);
+ theMinutes.push_back(aMinutes[i-1]);
+ theHours.push_back(aHours[i-1]);
+ theDays.push_back(aDays[i-1]);
+ theMonths.push_back(aMonths[i-1]);
+ theYears.push_back(aYears[i-1]);
}
} else {
SALOMEDS::StringSeq_var aNames;
#ifndef SALOMEDS_AttributeStudyProperties_HeaderFile
#define SALOMEDS_AttributeStudyProperties_HeaderFile
-#include <vector>
-#include <string>
-
#include "SALOMEDSClient_AttributeStudyProperties.hxx"
#include "SALOMEDS_GenericAttribute.hxx"
#include "SALOMEDSImpl_AttributeStudyProperties.hxx"
+#include <vector>
+#include <string>
+
// IDL headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
{
public:
- SALOMEDS_AttributeStudyProperties(const Handle(SALOMEDSImpl_AttributeStudyProperties)& theAttr);
+ SALOMEDS_AttributeStudyProperties(SALOMEDSImpl_AttributeStudyProperties* theAttr);
SALOMEDS_AttributeStudyProperties(SALOMEDS::AttributeStudyProperties_ptr theAttr);
~SALOMEDS_AttributeStudyProperties();
#include "SALOMEDS_AttributeStudyProperties_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#include <TColStd_HSequenceOfInteger.hxx>
-#include <TCollection_ExtendedString.hxx>
-
using namespace std;
#define CREATION_MODE_NOTDEFINED 0
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->ChangeCreatorName((char*)theName);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->ChangeCreatorName((char*)theName);
}
char* SALOMEDS_AttributeStudyProperties_i::GetUserName()
{
SALOMEDS::Locker lock;
- TCollection_ExtendedString S =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->GetCreatorName();
- CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(S).ToCString());
+ string S = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetCreatorName();
+ CORBA::String_var c_s = CORBA::string_dup(S.c_str());
return c_s._retn();
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeStudyProperties) aProp =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl);
+ SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl);
int aTmp;
if (aProp->GetCreationDate(aTmp, aTmp, aTmp, aTmp, aTmp)) return;
- TCollection_ExtendedString S;
+ string S;
aProp->SetModification(S, theMinute, theHour, theDay, theMonth, theYear);
}
CORBA::Long& theYear)
{
SALOMEDS::Locker lock;
- Standard_Integer aMinute;
- Standard_Integer aHour;
- Standard_Integer aDay;
- Standard_Integer aMonth;
- Standard_Integer aYear;
- if (Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast
- (_impl)->GetCreationDate(aMinute, aHour, aDay, aMonth, aYear)) {
+ int aMinute;
+ int aHour;
+ int aDay;
+ int aMonth;
+ int aYear;
+ if (dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetCreationDate(aMinute, aHour, aDay, aMonth, aYear)) {
theMinute = aMinute;
theHour = aHour;
theDay = aDay;
theMonth = aMonth;
theYear = aYear;
- return Standard_True;
+ return true;
}
- return Standard_False;
+ return false;
}
void SALOMEDS_AttributeStudyProperties_i::SetCreationMode(const char* theMode)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeStudyProperties) aProp =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl);
+ SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl);
if (strcmp(theMode,"from scratch")==0) aProp->SetCreationMode(CREATION_MODE_SCRATCH);
else if (strcmp(theMode,"copy from")==0) aProp->SetCreationMode(CREATION_MODE_COPY);
else aProp->SetCreationMode(CREATION_MODE_NOTDEFINED);
{
SALOMEDS::Locker lock;
CORBA::String_var c_s;
- switch (Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->GetCreationMode()) {
+ switch (dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetCreationMode()) {
case CREATION_MODE_SCRATCH: c_s = "from scratch"; break;
case CREATION_MODE_COPY: c_s = "copy from"; break;
default: c_s = "";
void SALOMEDS_AttributeStudyProperties_i::SetModified(CORBA::Long theModified)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->SetModified(theModified);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->SetModified(theModified);
}
CORBA::Boolean SALOMEDS_AttributeStudyProperties_i::IsModified()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->IsModified();
+ return dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->IsModified();
}
CORBA::Long SALOMEDS_AttributeStudyProperties_i::GetModified()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->GetModified();
+ return dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetModified();
}
void SALOMEDS_AttributeStudyProperties_i::SetLocked(CORBA::Boolean theLocked)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->SetLocked(theLocked);
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->SetLocked(theLocked);
}
CORBA::Boolean SALOMEDS_AttributeStudyProperties_i::IsLocked()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl)->IsLocked();
+ return dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->IsLocked();
}
void SALOMEDS_AttributeStudyProperties_i::SetModification(const char* theName,
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeStudyProperties) aProp =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl);
+ SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl);
aProp->SetModification((char*)theName, (int)theMinute, (int)theHour,
(int)theDay, (int)theMonth, (int)theYear);
}
CORBA::Boolean theWithCreator)
{
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aNames;
- Handle(TColStd_HSequenceOfInteger) aMinutes, aHours, aDays, aMonths, aYears;
- Handle(SALOMEDSImpl_AttributeStudyProperties) aProp =
- Handle(SALOMEDSImpl_AttributeStudyProperties)::DownCast(_impl);
+ vector<string> aNames;
+ vector<int> aMinutes, aHours, aDays, aMonths, aYears;
+ SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl);
aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- int aLength = aNames->Length();
+ int aLength = aNames.size();
int aRetLength = aLength - ((theWithCreator) ? 0 : 1);
theNames = new SALOMEDS::StringSeq;
theMinutes = new SALOMEDS::LongSeq;
theYears->length(aRetLength);
int a = 0, ind = ((theWithCreator) ? 1 : 2);
for (; ind <= aLength; a++, ind++) {
- (*theNames)[a] = CORBA::string_dup(TCollection_AsciiString(aNames->Value(ind)).ToCString());
- (*theMinutes)[a] = aMinutes->Value(ind);
- (*theHours)[a] = aHours->Value(ind);
- (*theDays)[a] = aDays->Value(ind);
- (*theMonths)[a] = aMonths->Value(ind);
- (*theYears)[a] = aYears->Value(ind);
+ (*theNames)[a] = CORBA::string_dup(aNames[ind-1].c_str());
+ (*theMinutes)[a] = aMinutes[ind-1];
+ (*theHours)[a] = aHours[ind-1];
+ (*theDays)[a] = aDays[ind-1];
+ (*theMonths)[a] = aMonths[ind-1];
+ (*theYears)[a] = aYears[ind-1];
}
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeStudyProperties_i(const Handle(SALOMEDSImpl_AttributeStudyProperties)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeStudyProperties_i(SALOMEDSImpl_AttributeStudyProperties* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeStudyProperties_i() {};
#include "SALOMEDS_AttributeTableOfInteger.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HSequenceOfInteger.hxx>
-#include <TColStd_HSequenceOfExtendedString.hxx>
-
+using namespace std;
SALOMEDS_AttributeTableOfInteger::SALOMEDS_AttributeTableOfInteger
- (const Handle(SALOMEDSImpl_AttributeTableOfInteger)& theAttr)
+ (SALOMEDSImpl_AttributeTableOfInteger* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetTitle((char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetTitle(theTitle);
}
else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetTitle(theTitle.c_str());
}
std::string aStr;
if (_isLocal) {
SALOMEDS::Locker lock;
- aStr = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfInteger)::
- DownCast(_local_impl)->GetTitle()).ToCString();
+ aStr = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetTitle();
}
else aStr = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetTitle();
return aStr;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::
- DownCast(_local_impl)->SetRowTitle(theIndex, (char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetRowTitle(theIndex, theTitle);
}
else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theTitles[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetRowTitles(aSeq);
+ vector<string> aSeq;
+ for (i = 0; i < aLength; i++) aSeq.push_back(theTitles[i]);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetRowTitles(aSeq);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetRowTitles();
- aLength = aSeq->Length();
- for(i = 1; i<= aLength; i++) aVector.push_back(TCollection_AsciiString((aSeq->Value(i))).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetRowTitles();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRowTitles();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::
- DownCast(_local_impl)->SetColumnTitle(theIndex, (char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetColumnTitle(theIndex, theTitle);
}
else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theTitles[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetColumnTitles(aSeq);
+ vector<string> aSeq;
+ for (i = 0; i < aLength; i++) aSeq.push_back(theTitles[i]);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetColumnTitles(aSeq);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetColumnTitles();
- aLength = aSeq->Length();
- for (i = 1; i<= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetColumnTitles();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetColumnTitles();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::
- DownCast(_local_impl)->SetRowUnit(theIndex, (char*)theUnit.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetRowUnit(theIndex, theUnit);
}
else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theUnits[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetRowUnits(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetRowUnits(theUnits);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetRowUnits();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetRowUnits();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRowUnits();
int aNb;
if (_isLocal) {
SALOMEDS::Locker lock;
- aNb = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetNbRows();
+ aNb = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetNbRows();
}
else aNb = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetNbRows();
return aNb;
int aNb;
if (_isLocal) {
SALOMEDS::Locker lock;
- aNb = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetNbColumns();
+ aNb = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetNbColumns();
}
else aNb = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetNbColumns();
return aNb;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfInteger) aRow = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < aLength; i++) aRow->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl);
try {
- aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
+ aTable->SetRowData(aTable->GetNbRows() + 1, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfInteger) aRow = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < aLength; i++) aRow->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl);
try {
- aTable->SetRowData(theRow, aRow);
+ aTable->SetRowData(theRow, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfInteger) aRow;
- aRow = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetRowData(theRow);
- aLength = aRow->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aRow->Value(i));
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetRowData(theRow);
}
else {
SALOMEDS::LongSeq_var aRow = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetRow(theRow);
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfInteger) aColumn = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < aLength; i++) aColumn->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl);
try {
- aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
+ aTable->SetColumnData(aTable->GetNbColumns() + 1, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfInteger) aColumn = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < aLength; i++) aColumn->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl);
try {
- aTable->SetColumnData(theColumn, aColumn);
+ aTable->SetColumnData(theColumn, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfInteger) aColumn;
- aColumn = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetColumnData(theColumn);
- aLength = aColumn->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aColumn->Value(i));
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetColumnData(theColumn);
}
else {
SALOMEDS::LongSeq_var aColumn = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->GetColumn(theColumn);
CheckLocked();
SALOMEDS::Locker lock;
try {
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::
- DownCast(_local_impl)->PutValue(theValue, theRow, theColumn);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->PutValue(theValue, theRow, theColumn);
}
catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->HasValue(theRow, theColumn);
+ ret = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->HasValue(theRow, theColumn);
}
else ret = SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->HasValue(theRow, theColumn);
return ret;
if (_isLocal) {
SALOMEDS::Locker lock;
try {
- aValue = Handle(SALOMEDSImpl_AttributeTableOfInteger)::
- DownCast(_local_impl)->GetValue(theRow, theColumn);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetValue(theRow, theColumn);
}
catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfInteger) aSet;
- aSet = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->GetSetRowIndices(theRow);
- aLength = aSet->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSet->Value(i));
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->GetSetRowIndices(theRow);
}
else {
SALOMEDS::LongSeq_var aSet =
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_local_impl)->SetNbColumns(theNbColumns);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_local_impl)->SetNbColumns(theNbColumns);
}
else SALOMEDS::AttributeTableOfInteger::_narrow(_corba_impl)->SetNbColumns(theNbColumns);
}
class SALOMEDS_AttributeTableOfInteger: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeTableOfInteger
{
public:
- SALOMEDS_AttributeTableOfInteger(const Handle(SALOMEDSImpl_AttributeTableOfInteger)& theAttr);
+ SALOMEDS_AttributeTableOfInteger(SALOMEDSImpl_AttributeTableOfInteger* theAttr);
SALOMEDS_AttributeTableOfInteger(SALOMEDS::AttributeTableOfInteger_ptr theAttr);
~SALOMEDS_AttributeTableOfInteger();
#include "SALOMEDS_AttributeTableOfInteger_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HSequenceOfInteger.hxx>
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
#include "Utils_ExceptHandlers.hxx"
#include <stdexcept>
#include <strstream>
#include <string>
+#include <vector>
using namespace std;
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var aStr = CORBA::string_dup(theTitle);
- Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl)->SetTitle(TCollection_ExtendedString(aStr));
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl)->SetTitle(string(aStr));
}
char* SALOMEDS_AttributeTableOfInteger_i::GetTitle()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
- CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(aTable->GetTitle()).ToCString());
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
+ CORBA::String_var c_s = CORBA::string_dup(aTable->GetTitle().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
- aTable->SetRowTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
+ aTable->SetRowTitle(theIndex, string(theTitle));
}
void SALOMEDS_AttributeTableOfInteger_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
SetRowTitle(i + 1, theTitles[i]);
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowTitles()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
+ aTitles[i] = CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str());
return aTitles._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
CORBA::String_var aStr = CORBA::string_dup(theTitle);
- aTable->SetColumnTitle(theIndex, TCollection_ExtendedString(aStr));
+ aTable->SetColumnTitle(theIndex, string(aStr));
}
void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in());
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumnTitles()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbColumns());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetColumnTitle(i + 1)).ToCString());
+ aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str());
return aTitles._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
- aTable->SetRowUnit(theIndex, TCollection_ExtendedString((char*)theUnit));
+ aTable->SetRowUnit(theIndex, string(theUnit));
}
void SALOMEDS_AttributeTableOfInteger_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
for (int i = 0; i < theUnits.length(); i++) {
aTable->SetRowUnit(i + 1, (char*)theUnits[i].in());
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowUnits()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
for(int i = 0; i < aUnits->length(); i++)
- aUnits[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowUnit(i + 1)).ToCString());
+ aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str());
return aUnits._retn();
}
CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetNbRows()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl)->GetNbRows();
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl)->GetNbRows();
}
CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetNbColumns()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl)->GetNbColumns();
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl)->GetNbColumns();
}
void SALOMEDS_AttributeTableOfInteger_i::AddRow(const SALOMEDS::LongSeq& theData)
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
- Handle(TColStd_HSequenceOfInteger) aRow = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < theData.length(); i++) aRow->Append(theData[i]);
+ vector<int> aRow;
+ for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
try {
aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
}
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
- Handle(TColStd_HSequenceOfInteger) aRow = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < theData.length(); i++) aRow->Append(theData[i]);
+ vector<int> aRow;
+ for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
try {
aTable->SetRowData(theRow, aRow);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
}
}
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
- Handle(TColStd_HSequenceOfInteger) aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow->Length());
- for (int i = 0; i < aRow->Length(); i++) {
- CorbaSeq[i] = aRow->Value(i + 1);
+ vector<int> aRow = aTable->GetRowData(theRow);
+ CorbaSeq->length(aRow.size());
+ for (int i = 0; i < aRow.size(); i++) {
+ CorbaSeq[i] = aRow[i];
}
return CorbaSeq._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
- Handle(TColStd_HSequenceOfInteger) aColumn = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < theData.length(); i++) aColumn->Append(theData[i]);
+ vector<int> aColumn;
+ for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
try {
aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
}
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
-
- Handle(TColStd_HSequenceOfInteger) aColumn = new TColStd_HSequenceOfInteger;
- for (int i = 0; i < theData.length(); i++) aColumn->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
+
+ vector<int> aColumn;
+ for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
try {
aTable->SetColumnData(theColumn, aColumn);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectArgumentLength();
}
}
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
- Handle(TColStd_HSequenceOfInteger) aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn->Length());
- for (int i = 0; i < aColumn->Length(); i++) {
- CorbaSeq[i] = aColumn->Value(i + 1);
+ vector<int> aColumn = aTable->GetColumnData(theColumn);
+ CorbaSeq->length(aColumn.size());
+ for (int i = 0; i < aColumn.size(); i++) {
+ CorbaSeq[i] = aColumn[i];
}
return CorbaSeq._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
try {
aTable->PutValue(theValue, theRow, theColumn);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
}
}
CORBA::Boolean SALOMEDS_AttributeTableOfInteger_i::HasValue(CORBA::Long theRow, CORBA::Long theColumn)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl)->HasValue(theRow, theColumn);
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl)->HasValue(theRow, theColumn);
}
CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
CORBA::Long aValue;
try {
aValue = aTable->GetValue(theRow, theColumn);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
}
return aValue;
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRowSetIndices(CORBA::Long theRow)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfInteger::IncorrectIndex();
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
- Handle(TColStd_HSequenceOfInteger) aSeq = aTable->GetSetRowIndices(theRow);
- CorbaSeq->length(aSeq->Length());
- for (int i = 0; i < aSeq->Length(); i++) {
- CorbaSeq[i] = aSeq->Value(i + 1);
+ vector<int> aSeq = aTable->GetSetRowIndices(theRow);
+ CorbaSeq->length(aSeq.size());
+ for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfInteger_i::SetNbColumns(CORBA::Long theNbColumns)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
aTable->SetNbColumns(theNbColumns);
}
bool SALOMEDS_AttributeTableOfInteger_i::ReadFromFile(const SALOMEDS::TMPFile& theStream)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
- istrstream aStream((char*)&theStream[0], theStream.length());
- return aTable->RestoreFromString(aStream);
+ string aStream((char*)&theStream[0], theStream.length());
+ aTable->Load(aStream);
+ return true;
}
SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfInteger_i::SaveToFile()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfInteger) aTable = Handle(SALOMEDSImpl_AttributeTableOfInteger)::DownCast(_impl);
-
- ostrstream ostr;
- string aString;
- aTable->ConvertToString(ostr);
+ SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
- aString = ostr.rdbuf()->str();
+ string aString = aTable->Save();
char* aBuffer = (char*)CORBA::string_dup(aString.c_str());
int aBufferSize = strlen((char*)aBuffer);
public:
- SALOMEDS_AttributeTableOfInteger_i(const Handle(SALOMEDSImpl_AttributeTableOfInteger)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeTableOfInteger_i(SALOMEDSImpl_AttributeTableOfInteger* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeTableOfInteger_i() {};
#include "SALOMEDS_AttributeTableOfReal.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HSequenceOfInteger.hxx>
-#include <TColStd_HSequenceOfReal.hxx>
-#include <TColStd_HSequenceOfExtendedString.hxx>
-
+using namespace std;
SALOMEDS_AttributeTableOfReal::SALOMEDS_AttributeTableOfReal
- (const Handle(SALOMEDSImpl_AttributeTableOfReal)& theAttr)
+ (SALOMEDSImpl_AttributeTableOfReal* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetTitle((char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetTitle(theTitle);
}
else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetTitle(theTitle.c_str());
}
std::string aStr;
if (_isLocal) {
SALOMEDS::Locker lock;
- aStr = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfReal)::
- DownCast(_local_impl)->GetTitle()).ToCString();
+ aStr = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetTitle();
}
else aStr = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetTitle();
return aStr;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal)::
- DownCast(_local_impl)->SetRowTitle(theIndex, (char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetRowTitle(theIndex, theTitle);
}
else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theTitles[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetRowTitles(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetRowTitles(theTitles);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetRowTitles();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetRowTitles();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowTitles();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal)::
- DownCast(_local_impl)->SetColumnTitle(theIndex, (char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetColumnTitle(theIndex, theTitle);
}
else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theTitles[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetColumnTitles(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetColumnTitles(theTitles);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetColumnTitles();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetColumnTitles();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetColumnTitles();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal)::
- DownCast(_local_impl)->SetRowUnit(theIndex, (char*)theUnit.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetRowUnit(theIndex, theUnit);
}
else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theUnits[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetRowUnits(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetRowUnits(theUnits);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetRowUnits();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetRowUnits();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowUnits();
aLength = aSeq->length();
- for (i = 0; i < aLength; i++) aVector.push_back(TCollection_AsciiString((char*)aSeq[i].in()).ToCString());
+ for (i = 0; i < aLength; i++) aVector.push_back(string(aSeq[i].in()));
}
return aVector;
}
int aNb;
if (_isLocal) {
SALOMEDS::Locker lock;
- aNb = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetNbRows();
+ aNb = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetNbRows();
}
else aNb = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetNbRows();
return aNb;
int aNb;
if (_isLocal) {
SALOMEDS::Locker lock;
- aNb = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetNbColumns();
+ aNb = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetNbColumns();
}
else aNb = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetNbColumns();
return aNb;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfReal) aRow = new TColStd_HSequenceOfReal;
- for (int i = 0; i < aLength; i++) aRow->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl);
try {
- aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
+ aTable->SetRowData(aTable->GetNbRows() + 1, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfReal) aRow = new TColStd_HSequenceOfReal;
- for (int i = 0; i < aLength; i++) aRow->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl);
try {
- aTable->SetRowData(theRow, aRow);
+ aTable->SetRowData(theRow, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfReal) aRow;
- aRow = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetRowData(theRow);
- aLength = aRow->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aRow->Value(i));
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetRowData(theRow);
}
else {
SALOMEDS::DoubleSeq_var aRow = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRow(theRow);
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfReal) aColumn = new TColStd_HSequenceOfReal;
- for (int i = 0; i < aLength; i++) aColumn->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl);
try {
- aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
+ aTable->SetColumnData(aTable->GetNbColumns() + 1, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfReal) aColumn = new TColStd_HSequenceOfReal;
- for (int i = 0; i < aLength; i++) aColumn->Append(theData[i]);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl);
try {
- aTable->SetColumnData(theColumn, aColumn);
+ aTable->SetColumnData(theColumn, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfReal) aColumn;
- aColumn = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetColumnData(theColumn);
- aLength = aColumn->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aColumn->Value(i));
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetColumnData(theColumn);
}
else {
SALOMEDS::DoubleSeq_var aColumn = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetColumn(theColumn);
CheckLocked();
SALOMEDS::Locker lock;
try {
- Handle(SALOMEDSImpl_AttributeTableOfReal)::
- DownCast(_local_impl)->PutValue(theValue, theRow, theColumn);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->PutValue(theValue, theRow, theColumn);
}
catch(...) {
throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->HasValue(theRow, theColumn);
+ ret = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->HasValue(theRow, theColumn);
}
else ret = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->HasValue(theRow, theColumn);
return ret;
if (_isLocal) {
SALOMEDS::Locker lock;
try {
- aValue = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetValue(theRow, theColumn);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetValue(theRow, theColumn);
}
catch(...) {
throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfInteger) aSet;
- aSet = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->GetSetRowIndices(theRow);
- aLength = aSet->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSet->Value(i));
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->GetSetRowIndices(theRow);
}
else {
SALOMEDS::LongSeq_var aSet = SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->GetRowSetIndices(theRow);
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_local_impl)->SetNbColumns(theNbColumns);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_local_impl)->SetNbColumns(theNbColumns);
}
else SALOMEDS::AttributeTableOfReal::_narrow(_corba_impl)->SetNbColumns(theNbColumns);
}
class SALOMEDS_AttributeTableOfReal: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeTableOfReal
{
public:
- SALOMEDS_AttributeTableOfReal(const Handle(SALOMEDSImpl_AttributeTableOfReal)& theAttr);
+ SALOMEDS_AttributeTableOfReal(SALOMEDSImpl_AttributeTableOfReal* theAttr);
SALOMEDS_AttributeTableOfReal(SALOMEDS::AttributeTableOfReal_ptr theAttr);
~SALOMEDS_AttributeTableOfReal();
#include "SALOMEDS_AttributeTableOfReal_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HSequenceOfReal.hxx>
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
-
#include <strstream>
#include <string>
+#include <vector>
using namespace std;
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
CORBA::String_var aStr = CORBA::string_dup(theTitle);
- aTable->SetTitle(TCollection_ExtendedString(aStr));
+ aTable->SetTitle(string(aStr));
}
char* SALOMEDS_AttributeTableOfReal_i::GetTitle()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
- CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(aTable->GetTitle()).ToCString());
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
+ CORBA::String_var c_s = CORBA::string_dup(aTable->GetTitle().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
- aTable->SetRowTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
+ aTable->SetRowTitle(theIndex, string(theTitle));
}
void SALOMEDS_AttributeTableOfReal_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
aTable->SetRowTitle(i + 1, (char*)theTitles[i].in());
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetRowTitles()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
+ aTitles[i] = CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str());
return aTitles._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
CORBA::String_var aStr = CORBA::string_dup(theTitle);
- aTable->SetColumnTitle(theIndex, TCollection_ExtendedString(aStr));
+ aTable->SetColumnTitle(theIndex, string(aStr));
}
void SALOMEDS_AttributeTableOfReal_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in());
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetColumnTitles()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbColumns());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetColumnTitle(i + 1)).ToCString());
+ aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str());
return aTitles._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
- aTable->SetRowUnit(theIndex, TCollection_ExtendedString((char*)theUnit));
+ aTable->SetRowUnit(theIndex, string(theUnit));
}
void SALOMEDS_AttributeTableOfReal_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectArgumentLength();
for (int i = 0; i < theUnits.length(); i++) {
aTable->SetRowUnit(i + 1, (char*)theUnits[i].in());
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfReal_i::GetRowUnits()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
for(int i = 0; i < aUnits->length(); i++)
- aUnits[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowUnit(i + 1)).ToCString());
+ aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str());
return aUnits._retn();
}
CORBA::Long SALOMEDS_AttributeTableOfReal_i::GetNbRows()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl)->GetNbRows();
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl)->GetNbRows();
}
CORBA::Long SALOMEDS_AttributeTableOfReal_i::GetNbColumns()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl)->GetNbColumns();
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl)->GetNbColumns();
}
void SALOMEDS_AttributeTableOfReal_i::AddRow(const SALOMEDS::DoubleSeq& theData)
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
- Handle(TColStd_HSequenceOfReal) aRow = new TColStd_HSequenceOfReal;
- for (int i = 0; i < theData.length(); i++) aRow->Append(theData[i]);
+ vector<double> aRow;
+ for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
- Handle(TColStd_HSequenceOfReal) aRow = new TColStd_HSequenceOfReal;
- for (int i = 0; i < theData.length(); i++) aRow->Append(theData[i]);
+ vector<double> aRow;
+ for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
aTable->SetRowData(theRow, aRow);
}
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
- Handle(TColStd_HSequenceOfReal) aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow->Length());
- for (int i = 0; i < aRow->Length(); i++) {
- CorbaSeq[i] = aRow->Value(i + 1);
+ vector<double> aRow = aTable->GetRowData(theRow);
+ CorbaSeq->length(aRow.size());
+ for (int i = 0; i < aRow.size(); i++) {
+ CorbaSeq[i] = aRow[i];
}
return CorbaSeq._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
- Handle(TColStd_HSequenceOfReal) aColumn = new TColStd_HSequenceOfReal;
- for (int i = 0; i < theData.length(); i++) aColumn->Append(theData[i]);
+ vector<double> aColumn;
+ for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
- Handle(TColStd_HSequenceOfReal) aColumn = new TColStd_HSequenceOfReal;
- for (int i = 0; i < theData.length(); i++) aColumn->Append(theData[i]);
+ vector<double> aColumn;
+ for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
aTable->SetColumnData(theColumn, aColumn);
}
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
- Handle(TColStd_HSequenceOfReal) aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn->Length());
- for (int i = 0; i < aColumn->Length(); i++) {
- CorbaSeq[i] = aColumn->Value(i + 1);
+ vector<double> aColumn = aTable->GetColumnData(theColumn);
+ CorbaSeq->length(aColumn.size());
+ for (int i = 0; i < aColumn.size(); i++) {
+ CorbaSeq[i] = aColumn[i];
}
return CorbaSeq._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
aTable->PutValue(theValue, theRow, theColumn);
}
CORBA::Boolean SALOMEDS_AttributeTableOfReal_i::HasValue(CORBA::Long theRow, CORBA::Long theColumn)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl)->HasValue(theRow, theColumn);
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl)->HasValue(theRow, theColumn);
}
CORBA::Double SALOMEDS_AttributeTableOfReal_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
CORBA::Double aValue;
try {
aValue = aTable->GetValue(theRow, theColumn);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
}
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::GetRowSetIndices(CORBA::Long theRow)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfReal::IncorrectIndex();
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
- Handle(TColStd_HSequenceOfInteger) aSeq = aTable->GetSetRowIndices(theRow);
- CorbaSeq->length(aSeq->Length());
- for (int i = 0; i < aSeq->Length(); i++) {
- CorbaSeq[i] = aSeq->Value(i + 1);
+ vector<int> aSeq = aTable->GetSetRowIndices(theRow);
+ int len = aSeq.size();
+ CorbaSeq->length(len);
+ for (int i = 0; i < len; i++) {
+ CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfReal_i::SetNbColumns(CORBA::Long theNbColumns)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
aTable->SetNbColumns(theNbColumns);
}
bool SALOMEDS_AttributeTableOfReal_i::ReadFromFile(const SALOMEDS::TMPFile& theStream)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
- istrstream aStream((char*)&theStream[0], theStream.length());
- return aTable->RestoreFromString(aStream);
+ string aStream((char*)&theStream[0], theStream.length());
+ aTable->Load(aStream);
+ return true;
}
SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfReal_i::SaveToFile()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfReal) aTable = Handle(SALOMEDSImpl_AttributeTableOfReal)::DownCast(_impl);
-
- ostrstream ostr;
- string aString;
- aTable->ConvertToString(ostr);
-
- aString = ostr.rdbuf()->str();
+ SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
+ string aString = aTable->Save();
char* aBuffer = (char*)CORBA::string_dup(aString.c_str());
int aBufferSize = strlen((char*)aBuffer);
public:
- SALOMEDS_AttributeTableOfReal_i(const Handle(SALOMEDSImpl_AttributeTableOfReal)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeTableOfReal_i(SALOMEDSImpl_AttributeTableOfReal* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeTableOfReal_i() {};
#include "SALOMEDS.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HSequenceOfInteger.hxx>
-#include <TColStd_HSequenceOfReal.hxx>
-#include <TColStd_HSequenceOfExtendedString.hxx>
+
+using namespace std;
SALOMEDS_AttributeTableOfString::SALOMEDS_AttributeTableOfString
- (const Handle(SALOMEDSImpl_AttributeTableOfString)& theAttr)
+ (SALOMEDSImpl_AttributeTableOfString* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetTitle((char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetTitle(theTitle);
}
else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetTitle(theTitle.c_str());
}
std::string aStr;
if (_isLocal) {
SALOMEDS::Locker lock;
- aStr = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfString)::
- DownCast(_local_impl)->GetTitle()).ToCString();
+ aStr = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetTitle();
}
else aStr = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetTitle();
return aStr;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString)::
- DownCast(_local_impl)->SetRowTitle(theIndex, (char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetRowTitle(theIndex, theTitle);
}
else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowTitle(theIndex, theTitle.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theTitles[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetRowTitles(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetRowTitles(theTitles);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetRowTitles();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetRowTitles();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRowTitles();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString)::
- DownCast(_local_impl)->SetColumnTitle(theIndex, (char*)theTitle.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetColumnTitle(theIndex, theTitle);
}
else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetColumnTitle(theIndex, theTitle.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theTitles[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetColumnTitles(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetColumnTitles(theTitles);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetColumnTitles();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetColumnTitles();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetColumnTitles();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString)::
- DownCast(_local_impl)->SetRowUnit(theIndex, (char*)theUnit.c_str());
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetRowUnit(theIndex, theUnit);
}
else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetRowUnit(theIndex, theUnit.c_str());
}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
- for (i = 0; i < aLength; i++) aSeq->Append((char*)theUnits[i].c_str());
- Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetRowUnits(aSeq);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetRowUnits(theUnits);
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetRowUnits();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aSeq->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetRowUnits();
}
else {
SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRowUnits();
int aNb;
if (_isLocal) {
SALOMEDS::Locker lock;
- aNb = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetNbRows();
+ aNb = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetNbRows();
}
else aNb = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetNbRows();
return aNb;
int aNb;
if (_isLocal) {
SALOMEDS::Locker lock;
- aNb = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetNbColumns();
+ aNb = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetNbColumns();
}
else aNb = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetNbColumns();
return aNb;
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfExtendedString) aRow = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < aLength; i++) aRow->Append((char*)theData[i].c_str());
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl);
try {
- aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
+ aTable->SetRowData(aTable->GetNbRows() + 1, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfExtendedString) aRow = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < aLength; i++) aRow->Append((char*)theData[i].c_str());
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl);
try {
- aTable->SetRowData(theRow, aRow);
+ aTable->SetRowData(theRow, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aRow;
- aRow = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetRowData(theRow);
- aLength = aRow->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(TCollection_AsciiString(aRow->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetRowData(theRow);
}
else {
SALOMEDS::StringSeq_var aRow = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->GetRow(theRow);
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfExtendedString) aColumn = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < aLength; i++) aColumn->Append((char*)theData[i].c_str());
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl);
try {
- aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
+ aTable->SetColumnData(aTable->GetNbColumns() + 1, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable;
- aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl);
- Handle(TColStd_HSequenceOfExtendedString) aColumn = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < aLength; i++) aColumn->Append((char*)theData[i].c_str());
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl);
try {
- aTable->SetColumnData(theColumn, aColumn);
+ aTable->SetColumnData(theColumn, theData);
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfExtendedString) aColumn;
- aColumn = Handle(SALOMEDSImpl_AttributeTableOfString)::
- DownCast(_local_impl)->GetColumnData(theColumn);
- aLength = aColumn->Length();
- for (i = 1; i <= aLength; i++)
- aVector.push_back(TCollection_AsciiString(aColumn->Value(i)).ToCString());
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetColumnData(theColumn);
}
else {
SALOMEDS::StringSeq_var aColumn =
CheckLocked();
SALOMEDS::Locker lock;
try {
- Handle(SALOMEDSImpl_AttributeTableOfString)::
- DownCast(_local_impl)->PutValue((char*)theValue.c_str(), theRow, theColumn);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->PutValue(theValue, theRow, theColumn);
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->HasValue(theRow, theColumn);
+ ret = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->HasValue(theRow, theColumn);
}
else ret = SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->HasValue(theRow, theColumn);
return ret;
if (_isLocal) {
SALOMEDS::Locker lock;
try {
- aValue = TCollection_AsciiString(Handle(SALOMEDSImpl_AttributeTableOfString)::
- DownCast(_local_impl)->GetValue(theRow, theColumn)).ToCString();
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetValue(theRow, theColumn);
}
catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfInteger) aSet;
- aSet = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->GetSetRowIndices(theRow);
- aLength = aSet->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSet->Value(i));
+ aVector = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->GetSetRowIndices(theRow);
}
else {
SALOMEDS::LongSeq_var aSet =
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_local_impl)->SetNbColumns(theNbColumns);
+ dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_local_impl)->SetNbColumns(theNbColumns);
}
else SALOMEDS::AttributeTableOfString::_narrow(_corba_impl)->SetNbColumns(theNbColumns);
}
class SALOMEDS_AttributeTableOfString: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeTableOfString
{
public:
- SALOMEDS_AttributeTableOfString(const Handle(SALOMEDSImpl_AttributeTableOfString)& theAttr);
+ SALOMEDS_AttributeTableOfString(SALOMEDSImpl_AttributeTableOfString* theAttr);
SALOMEDS_AttributeTableOfString(SALOMEDS::AttributeTableOfString_ptr theAttr);
~SALOMEDS_AttributeTableOfString();
// Module : SALOME
-#include <TCollection_ExtendedString.hxx>
-#include <TCollection_AsciiString.hxx>
-
#include "SALOMEDS_AttributeTableOfString_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandler.hxx>
-
#include <strstream>
#include <string>
+#include <vector>
#include "Utils_ExceptHandlers.hxx"
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
CORBA::String_var aStr = CORBA::string_dup(theTitle);
- aTable->SetTitle(TCollection_ExtendedString(aStr));
+ aTable->SetTitle(string(aStr));
}
char* SALOMEDS_AttributeTableOfString_i::GetTitle()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
- CORBA::String_var c_s = CORBA::string_dup(TCollection_AsciiString(aTable->GetTitle()).ToCString());
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
+ CORBA::String_var c_s = CORBA::string_dup(aTable->GetTitle().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
- aTable->SetRowTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
+ aTable->SetRowTitle(theIndex, string(theTitle));
}
void SALOMEDS_AttributeTableOfString_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
- aTable->SetRowTitle(i + 1, TCollection_ExtendedString((char*)theTitles[i].in()));
+ aTable->SetRowTitle(i + 1, string((char*)theTitles[i].in()));
}
}
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRowTitles()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] =CORBA::string_dup(TCollection_AsciiString(aTable->GetRowTitle(i + 1)).ToCString());
+ aTitles[i] =CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str());
return aTitles._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
- aTable->SetColumnTitle(theIndex, TCollection_ExtendedString((char*)theTitle));
+ aTable->SetColumnTitle(theIndex, string((char*)theTitle));
}
void SALOMEDS_AttributeTableOfString_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
for (int i = 0; i < theTitles.length(); i++) {
- aTable->SetColumnTitle(i + 1, TCollection_ExtendedString((char*)theTitles[i].in()));
+ aTable->SetColumnTitle(i + 1, string((char*)theTitles[i].in()));
}
}
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetColumnTitles()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbColumns());
for(int i = 0; i < aTitles->length(); i++)
- aTitles[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetColumnTitle(i + 1)).ToCString());
+ aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str());
return aTitles._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theIndex <= 0 || theIndex > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
- aTable->SetRowUnit(theIndex, TCollection_ExtendedString((char*)theUnit));
+ aTable->SetRowUnit(theIndex, string((char*)theUnit));
}
void SALOMEDS_AttributeTableOfString_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectArgumentLength();
for (int i = 0; i < theUnits.length(); i++) {
- aTable->SetRowUnit(i + 1, TCollection_ExtendedString((char*)theUnits[i].in()));
+ aTable->SetRowUnit(i + 1, string((char*)theUnits[i].in()));
}
}
SALOMEDS::StringSeq* SALOMEDS_AttributeTableOfString_i::GetRowUnits()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
for(int i = 0; i < aUnits->length(); i++)
- aUnits[i] = CORBA::string_dup(TCollection_AsciiString(aTable->GetRowUnit(i + 1)).ToCString());
+ aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str());
return aUnits._retn();
}
CORBA::Long SALOMEDS_AttributeTableOfString_i::GetNbRows()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl)->GetNbRows();
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl)->GetNbRows();
}
CORBA::Long SALOMEDS_AttributeTableOfString_i::GetNbColumns()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl)->GetNbColumns();
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl)->GetNbColumns();
}
void SALOMEDS_AttributeTableOfString_i::AddRow(const SALOMEDS::StringSeq& theData)
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
- Handle(TColStd_HSequenceOfExtendedString) aRow = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < theData.length(); i++) aRow->Append(TCollection_AsciiString(CORBA::string_dup(theData[i])));
+ vector<string> aRow;
+ for (int i = 0; i < theData.length(); i++) aRow.push_back(string(CORBA::string_dup(theData[i])));
aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
- Handle(TColStd_HSequenceOfExtendedString) aRow = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < theData.length(); i++) aRow->Append(TCollection_AsciiString(CORBA::string_dup(theData[i])));
+ vector<string> aRow;
+ for (int i = 0; i < theData.length(); i++) aRow.push_back(string(CORBA::string_dup(theData[i].in())));
aTable->SetRowData(theRow, aRow);
}
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
- Handle(TColStd_HSequenceOfExtendedString) aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow->Length());
- for (int i = 0; i < aRow->Length(); i++) {
- CorbaSeq[i] = CORBA::string_dup((TCollection_AsciiString(aRow->Value(i + 1))).ToCString());
+ vector<string> aRow = aTable->GetRowData(theRow);
+ CorbaSeq->length(aRow.size());
+ for (int i = 0; i < aRow.size(); i++) {
+ CorbaSeq[i] = CORBA::string_dup(aRow[i].c_str());
}
return CorbaSeq._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
- Handle(TColStd_HSequenceOfExtendedString) aColumn = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < theData.length(); i++) aColumn->Append(TCollection_AsciiString(CORBA::string_dup(theData[i])));
+ vector<string> aColumn;
+ for (int i = 0; i < theData.length(); i++) aColumn.push_back(string(CORBA::string_dup(theData[i])));
aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
- Handle(TColStd_HSequenceOfExtendedString) aColumn = new TColStd_HSequenceOfExtendedString;
- for (int i = 0; i < theData.length(); i++) aColumn->Append(TCollection_AsciiString(CORBA::string_dup(theData[i])));
+ vector<string> aColumn;
+ for (int i = 0; i < theData.length(); i++) aColumn.push_back(string(CORBA::string_dup(theData[i])));
aTable->SetColumnData(theColumn, aColumn);
}
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theColumn <= 0 || theColumn > aTable->GetNbColumns()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
- Handle(TColStd_HSequenceOfExtendedString) aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn->Length());
- for (int i = 0; i < aColumn->Length(); i++) {
- CorbaSeq[i] = CORBA::string_dup((TCollection_AsciiString(aColumn->Value(i + 1))).ToCString());
+ vector<string> aColumn = aTable->GetColumnData(theColumn);
+ CorbaSeq->length(aColumn.size());
+ for (int i = 0; i < aColumn.size(); i++) {
+ CorbaSeq[i] = CORBA::string_dup(aColumn[i].c_str());
}
return CorbaSeq._retn();
}
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
char* aValue = CORBA::string_dup(theValue);
aTable->PutValue(aValue, theRow, theColumn);
CORBA::Boolean SALOMEDS_AttributeTableOfString_i::HasValue(CORBA::Long theRow, CORBA::Long theColumn)
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl)->HasValue(theRow, theColumn);
+ return dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl)->HasValue(theRow, theColumn);
}
char* SALOMEDS_AttributeTableOfString_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
- TCollection_AsciiString aValue;
-
+ string aValue;
try {
aValue = aTable->GetValue(theRow, theColumn);
}
- catch(Standard_Failure) {
+ catch(...) {
throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
}
- return CORBA::string_dup(aValue.ToCString());
+ return CORBA::string_dup(aValue.c_str());
}
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::GetRowSetIndices(CORBA::Long theRow)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if(theRow <= 0 || theRow > aTable->GetNbRows()) throw SALOMEDS::AttributeTableOfString::IncorrectIndex();
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
- Handle(TColStd_HSequenceOfInteger) aSeq = aTable->GetSetRowIndices(theRow);
- CorbaSeq->length(aSeq->Length());
- for (int i = 0; i < aSeq->Length(); i++) {
- CorbaSeq[i] = aSeq->Value(i + 1);
+ vector<int> aSeq = aTable->GetSetRowIndices(theRow);
+ CorbaSeq->length(aSeq.size());
+ for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfString_i::SetNbColumns(CORBA::Long theNbColumns)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
aTable->SetNbColumns(theNbColumns);
}
bool SALOMEDS_AttributeTableOfString_i::ReadFromFile(const SALOMEDS::TMPFile& theStream)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
- istrstream aStream((char*)&theStream[0], theStream.length());
- return aTable->RestoreFromString(aStream);
+ string aStream((char*)&theStream[0], theStream.length());
+ aTable->Load(aStream);
+ return true;
}
SALOMEDS::TMPFile* SALOMEDS_AttributeTableOfString_i::SaveToFile()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTableOfString) aTable = Handle(SALOMEDSImpl_AttributeTableOfString)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
+
+ string aString = aTable->Save();
+ char* aBuffer = (char*)CORBA::string_dup(aString.c_str());
+ int aBufferSize = strlen((char*)aBuffer);
+
+ CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
+
+ SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(aBufferSize, aBufferSize, anOctetBuf, 1);
- ostrstream ostr;
- aTable->ConvertToString(ostr);
- CORBA::Octet* anOctetBuf = (CORBA::Octet*)ostr.rdbuf()->str();
- unsigned long aSize = ostr.pcount();
- SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(aSize, aSize, anOctetBuf, 1);
return aStreamFile._retn();
}
public:
- SALOMEDS_AttributeTableOfString_i(const Handle(SALOMEDSImpl_AttributeTableOfString)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeTableOfString_i(SALOMEDSImpl_AttributeTableOfString* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeTableOfString_i() {};
#include "SALOMEDS_AttributeTarget.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HSequenceOfTransient.hxx>
-
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDS_SObject.hxx"
+using namespace std;
-SALOMEDS_AttributeTarget::SALOMEDS_AttributeTarget(const Handle(SALOMEDSImpl_AttributeTarget)& theAttr)
+SALOMEDS_AttributeTarget::SALOMEDS_AttributeTarget(SALOMEDSImpl_AttributeTarget* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_local_impl)->Add(aSO->GetLocalImpl());
+ dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_local_impl)->Add(*(aSO->GetLocalImpl()));
}
else SALOMEDS::AttributeTarget::_narrow(_corba_impl)->Add(aSO->GetCORBAImpl());
}
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq =
- Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_local_impl)->Get();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) {
- aSO = new SALOMEDS_SObject(Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i)));
+ vector<SALOMEDSImpl_SObject> aSeq = dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_local_impl)->Get();
+ aLength = aSeq.size();
+ for (i = 0; i < aLength; i++) {
+ aSO = new SALOMEDS_SObject(aSeq[i]);
aVector.push_back(_PTR(SObject)(aSO));
}
}
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_local_impl)->Remove(aSO->GetLocalImpl());
+ dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_local_impl)->Remove(*(aSO->GetLocalImpl()));
}
else SALOMEDS::AttributeTarget::_narrow(_corba_impl)->Remove(aSO->GetCORBAImpl());
}
class SALOMEDS_AttributeTarget: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeTarget
{
public:
- SALOMEDS_AttributeTarget(const Handle(SALOMEDSImpl_AttributeTarget)& theAttr);
+ SALOMEDS_AttributeTarget(SALOMEDSImpl_AttributeTarget* theAttr);
SALOMEDS_AttributeTarget(SALOMEDS::AttributeTarget_ptr theAttr);
~SALOMEDS_AttributeTarget();
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_Study.hxx"
#include "SALOMEDS.hxx"
+#include "DF_Label.hxx"
-#include <TColStd_HSequenceOfTransient.hxx>
+#include <vector>
using namespace std;
void SALOMEDS_AttributeTarget_i::Add(SALOMEDS::SObject_ptr anObject)
{
SALOMEDS::Locker lock;
- TDF_Label aLabel;
- TDF_Tool::Label(_impl->Label().Data(),anObject->GetID(),aLabel,1);
- (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Add(SALOMEDSImpl_Study::SObject(aLabel));
+ DF_Label aLabel = DF_Label::Label(_impl->Label(), anObject->GetID(), 1);
+ dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_impl)->Add(SALOMEDSImpl_Study::SObject(aLabel));
}
SALOMEDS::Study::ListOfSObject* SALOMEDS_AttributeTarget_i::Get()
{
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq = (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Get();
+ vector<SALOMEDSImpl_SObject> aSeq = dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_impl)->Get();
SALOMEDS::Study::ListOfSObject_var aSList = new SALOMEDS::Study::ListOfSObject;
- int aLength = aSeq->Length(), i;
+ int aLength = aSeq.size(), i;
if (aLength == 0) return aSList._retn();
aSList->length(aLength);
- for(i=1; i <=aLength; i++) {
- SALOMEDS::SObject_var anSO = SALOMEDS_SObject_i::New(Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i)), _orb);
- aSList[i-1] = anSO;
+ for(i=0; i <aLength; i++) {
+ SALOMEDS::SObject_var anSO = SALOMEDS_SObject_i::New(aSeq[i], _orb);
+ aSList[i] = anSO;
}
return aSList._retn();
}
void SALOMEDS_AttributeTarget_i::Remove(SALOMEDS::SObject_ptr anObject)
{
SALOMEDS::Locker lock;
- TDF_Label aLabel;
- TDF_Tool::Label(_impl->Label().Data(),anObject->GetID(),aLabel,1);
- (Handle(SALOMEDSImpl_AttributeTarget)::DownCast(_impl))->Remove(SALOMEDSImpl_Study::SObject(aLabel));
+ DF_Label aLabel = DF_Label::Label(_impl->Label(), anObject->GetID(), 1);
+ dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_impl)->Remove(SALOMEDSImpl_Study::SObject(aLabel));
}
{
public:
- SALOMEDS_AttributeTarget_i(const Handle(SALOMEDSImpl_AttributeTarget)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeTarget_i(SALOMEDSImpl_AttributeTarget* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeTarget_i() {};
#include "SALOMEDS_AttributeTextColor.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HArray1OfReal.hxx>
+#include <vector>
-SALOMEDS_AttributeTextColor::SALOMEDS_AttributeTextColor
- (const Handle(SALOMEDSImpl_AttributeTextColor)& theAttr)
+using namespace std;
+
+SALOMEDS_AttributeTextColor::SALOMEDS_AttributeTextColor(SALOMEDSImpl_AttributeTextColor* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
STextColor aColor;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HArray1OfReal) aSeq =
- Handle(SALOMEDSImpl_AttributeTextColor)::DownCast(_local_impl)->TextColor();
- aColor.R = aSeq->Value(1);
- aColor.G = aSeq->Value(2);
- aColor.B = aSeq->Value(3);
+ vector<double> aSeq = dynamic_cast<SALOMEDSImpl_AttributeTextColor*>(_local_impl)->TextColor();
+ aColor.R = aSeq[0];
+ aColor.G = aSeq[1];
+ aColor.B = aSeq[2];
}
else {
SALOMEDS::Color anImplColor = SALOMEDS::AttributeTextColor::_narrow(_corba_impl)->TextColor();
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HArray1OfReal) aSeq = new TColStd_HArray1OfReal(1, 3);
- aSeq->SetValue(1, value.R);
- aSeq->SetValue(2, value.G);
- aSeq->SetValue(3, value.B);
- Handle(SALOMEDSImpl_AttributeTextColor)::DownCast(_local_impl)->ChangeArray(aSeq);
+ vector<double> aSeq;
+ aSeq.push_back( value.R );
+ aSeq.push_back( value.G );
+ aSeq.push_back( value.B );
+ dynamic_cast<SALOMEDSImpl_AttributeTextColor*>(_local_impl)->ChangeArray(aSeq);
}
else {
SALOMEDS::Color aColor;
class SALOMEDS_AttributeTextColor: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeTextColor
{
public:
- SALOMEDS_AttributeTextColor(const Handle(SALOMEDSImpl_AttributeTextColor)& theAttr);
+ SALOMEDS_AttributeTextColor(SALOMEDSImpl_AttributeTextColor* theAttr);
SALOMEDS_AttributeTextColor(SALOMEDS::AttributeTextColor_ptr theAttr);
~SALOMEDS_AttributeTextColor();
#include "SALOMEDS_AttributeTextColor_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HArray1OfReal.hxx>
+#include <vector>
using namespace std;
{
SALOMEDS::Locker lock;
SALOMEDS::Color TextColor;
- Handle(TColStd_HArray1OfReal) anArray = Handle(SALOMEDSImpl_AttributeTextColor)::DownCast(_impl)->TextColor();
- if (anArray.IsNull() || anArray->Length()!=3) {
+ vector<double> anArray = dynamic_cast<SALOMEDSImpl_AttributeTextColor*>(_impl)->TextColor();
+ if (anArray.size()!=3) {
TextColor.R = 0;
TextColor.G = 0;
TextColor.B = 0;
}
else {
- TextColor.R = anArray->Value(1);
- TextColor.G = anArray->Value(2);
- TextColor.B = anArray->Value(3);
+ TextColor.R = anArray[0];
+ TextColor.G = anArray[1];
+ TextColor.B = anArray[2];
}
return TextColor;
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(TColStd_HArray1OfReal) anArray = new TColStd_HArray1OfReal(1,3);
- anArray->SetValue(1, value.R);
- anArray->SetValue(2, value.G);
- anArray->SetValue(3, value.B);
- Handle(SALOMEDSImpl_AttributeTextColor)::DownCast(_impl)->ChangeArray(anArray);
+ vector<double> anArray;
+ anArray.push_back(value.R);
+ anArray.push_back(value.G);
+ anArray.push_back(value.B);
+ dynamic_cast<SALOMEDSImpl_AttributeTextColor*>(_impl)->ChangeArray(anArray);
}
{
public:
- SALOMEDS_AttributeTextColor_i(const Handle(SALOMEDSImpl_AttributeTextColor)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeTextColor_i(SALOMEDSImpl_AttributeTextColor* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeTextColor_i() {};
#include "SALOMEDS_AttributeTextHighlightColor.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HArray1OfReal.hxx>
+#include <vector>
+
+using namespace std;
SALOMEDS_AttributeTextHighlightColor::SALOMEDS_AttributeTextHighlightColor
- (const Handle(SALOMEDSImpl_AttributeTextHighlightColor)& theAttr)
+ (SALOMEDSImpl_AttributeTextHighlightColor* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
STextColor aColor;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HArray1OfReal) aSeq;
- aSeq = Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_local_impl)->TextHighlightColor();
- aColor.R = aSeq->Value(1);
- aColor.G = aSeq->Value(2);
- aColor.B = aSeq->Value(3);
+ vector<double> aSeq = dynamic_cast<SALOMEDSImpl_AttributeTextHighlightColor*>(_local_impl)->TextHighlightColor();
+ aColor.R = aSeq[0];
+ aColor.G = aSeq[1];
+ aColor.B = aSeq[2];
}
else {
SALOMEDS::Color anImplColor =
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(TColStd_HArray1OfReal) aSeq = new TColStd_HArray1OfReal(1, 3);
- aSeq->SetValue(1, value.R);
- aSeq->SetValue(2, value.G);
- aSeq->SetValue(3, value.B);
- Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_local_impl)->ChangeArray(aSeq);
+ vector<double> aSeq;
+ aSeq.push_back(value.R);
+ aSeq.push_back(value.G);
+ aSeq.push_back(value.B);
+ dynamic_cast<SALOMEDSImpl_AttributeTextHighlightColor*>(_local_impl)->ChangeArray(aSeq);
}
else {
SALOMEDS::Color aColor;
class SALOMEDS_AttributeTextHighlightColor: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeTextHighlightColor
{
public:
- SALOMEDS_AttributeTextHighlightColor(const Handle(SALOMEDSImpl_AttributeTextHighlightColor)& theAttr);
+ SALOMEDS_AttributeTextHighlightColor(SALOMEDSImpl_AttributeTextHighlightColor* theAttr);
SALOMEDS_AttributeTextHighlightColor(SALOMEDS::AttributeTextHighlightColor_ptr theAttr);
~SALOMEDS_AttributeTextHighlightColor();
#include "SALOMEDS_AttributeTextHighlightColor_i.hxx"
#include "SALOMEDS.hxx"
-#include <TColStd_HArray1OfReal.hxx>
+#include <vector>
using namespace std;
{
SALOMEDS::Locker lock;
SALOMEDS::Color TextHighlightColor;
- Handle(TColStd_HArray1OfReal) anArray=Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_impl)->TextHighlightColor();
- if (anArray.IsNull() || anArray->Length()!=3) {
+ vector<double> anArray = dynamic_cast<SALOMEDSImpl_AttributeTextHighlightColor*>(_impl)->TextHighlightColor();
+ if (anArray.size()!=3) {
TextHighlightColor.R = 0;
TextHighlightColor.G = 0;
TextHighlightColor.B = 0;
}
else {
- TextHighlightColor.R = anArray->Value(1);
- TextHighlightColor.G = anArray->Value(2);
- TextHighlightColor.B = anArray->Value(3);
+ TextHighlightColor.R = anArray[0];
+ TextHighlightColor.G = anArray[1];
+ TextHighlightColor.B = anArray[2];
}
return TextHighlightColor;
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(TColStd_HArray1OfReal) anArray = new TColStd_HArray1OfReal(1,3);
- anArray->SetValue(1, value.R);
- anArray->SetValue(2, value.G);
- anArray->SetValue(3, value.B);
- Handle(SALOMEDSImpl_AttributeTextHighlightColor)::DownCast(_impl)->ChangeArray(anArray);
+ vector<double> anArray;
+ anArray.push_back(value.R);
+ anArray.push_back(value.G);
+ anArray.push_back(value.B);
+ dynamic_cast<SALOMEDSImpl_AttributeTextHighlightColor*>(_impl)->ChangeArray(anArray);
}
{
public:
- SALOMEDS_AttributeTextHighlightColor_i(const Handle(SALOMEDSImpl_AttributeTextHighlightColor)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeTextHighlightColor_i(SALOMEDSImpl_AttributeTextHighlightColor* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeTextHighlightColor_i() {};
#include <string>
#include <stdexcept>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <Standard_GUID.hxx>
-#include <TDF_Label.hxx>
-#include <TDF_Tool.hxx>
-
#include "SALOMEDSImpl_AttributeTreeNode.hxx"
#include "SALOMEDS_AttributeTreeNode.hxx"
-SALOMEDS_AttributeTreeNode::SALOMEDS_AttributeTreeNode(const Handle(SALOMEDSImpl_AttributeTreeNode)& theAttr)
+using namespace std;
+
+SALOMEDS_AttributeTreeNode::SALOMEDS_AttributeTreeNode(SALOMEDSImpl_AttributeTreeNode* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, aFather;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- aFather = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *aFather;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ aFather = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->SetFather(aFather);
}
else {
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
ret = aNode->HasFather();
}
else {
SALOMEDSClient_AttributeTreeNode* aTN = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
aTN = new SALOMEDS_AttributeTreeNode(aNode->GetFather());
}
else {
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, aPrev;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- aPrev = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *aPrev;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ aPrev = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->SetPrevious(aPrev);
}
else {
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
ret = aNode->HasPrevious();
}
else {
SALOMEDSClient_AttributeTreeNode* aTN = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
aTN = new SALOMEDS_AttributeTreeNode(aNode->GetPrevious());
}
else {
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, aNext;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- aNext = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *aNext;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ aNext = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->SetNext(aNext);
}
else {
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
ret = aNode->HasNext();
}
else {
SALOMEDSClient_AttributeTreeNode* aTN = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
aTN = new SALOMEDS_AttributeTreeNode(aNode->GetNext());
}
else {
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, aFirst;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- aFirst = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *aFirst;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ aFirst = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->SetFirst(aFirst);
}
else {
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
ret = aNode->HasFirst();
}
else {
SALOMEDSClient_AttributeTreeNode* aTN = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
aTN = new SALOMEDS_AttributeTreeNode(aNode->GetFirst());
}
else {
void SALOMEDS_AttributeTreeNode::SetTreeID(const std::string& value)
{
- if(!Standard_GUID::CheckGUIDFormat((char*)value.c_str())) throw invalid_argument("Invalid GUID");
-
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- aNode->SetTreeID(Standard_GUID((char*)value.c_str()));
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ aNode->SetTreeID(value);
}
else {
SALOMEDS::AttributeTreeNode_var aNode = SALOMEDS::AttributeTreeNode::_narrow(_corba_impl);
std::string SALOMEDS_AttributeTreeNode::GetTreeID()
{
- TCollection_AsciiString aGUID;
+ string aGUID;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode =
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- char guid[40];
- aNode->GetTreeID().ToCString(guid);
- aGUID = TCollection_AsciiString(guid);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ aGUID = aNode->GetTreeID();
}
else {
SALOMEDS::AttributeTreeNode_var aNode = SALOMEDS::AttributeTreeNode::_narrow(_corba_impl);
- aGUID = TCollection_AsciiString(aNode->GetTreeID());
+ aGUID = aNode->GetTreeID();
}
- return std::string(aGUID.ToCString());
+ return aGUID;
}
void SALOMEDS_AttributeTreeNode::Append(const _PTR(AttributeTreeNode)& value)
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, anOther;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- anOther = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *anOther;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ anOther = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->Append(anOther);
}
else {
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, anOther;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- anOther = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *anOther;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ anOther = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->Prepend(anOther);
}
else {
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, anOther;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- anOther = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *anOther;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ anOther = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->InsertBefore(anOther);
}
else {
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, anOther;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- anOther = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *anOther;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ anOther = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
aNode->InsertAfter(anOther);
}
else {
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl)->Remove();
+ dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl)->Remove();
}
else SALOMEDS::AttributeTreeNode::_narrow(_corba_impl)->Remove();
}
int aDepth;
if (_isLocal) {
SALOMEDS::Locker lock;
- aDepth = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl)->Depth();
+ aDepth = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl)->Depth();
}
else aDepth = SALOMEDS::AttributeTreeNode::_narrow(_corba_impl)->Depth();
return aDepth;
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl)->IsRoot();
+ ret = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl)->IsRoot();
}
else ret = SALOMEDS::AttributeTreeNode::_narrow(_corba_impl)->IsRoot();
return ret;
SALOMEDS_AttributeTreeNode* aTN = dynamic_cast<SALOMEDS_AttributeTreeNode*>(value.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, anOther;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- anOther = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *anOther;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ anOther = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
ret = aNode->IsDescendant(anOther);
}
else {
SALOMEDS_AttributeTreeNode* aTN = dynamic_cast<SALOMEDS_AttributeTreeNode*>(value.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, anOther;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- anOther = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *anOther;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ anOther = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
ret = aNode->IsFather(anOther);
}
else {
SALOMEDS_AttributeTreeNode* aTN = dynamic_cast<SALOMEDS_AttributeTreeNode*>(value.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode, anOther;
- aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_local_impl);
- anOther = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(aTN->_local_impl);
+ SALOMEDSImpl_AttributeTreeNode *aNode, *anOther;
+ aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_local_impl);
+ anOther = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(aTN->_local_impl);
ret = aNode->IsChild(anOther);
}
else {
string aLabel;
if (_isLocal) {
SALOMEDS::Locker lock;
- TCollection_AsciiString anAsciiLabel;
- TDF_Tool::Entry(_local_impl->Label(), anAsciiLabel);
- aLabel = std::string(anAsciiLabel.ToCString());
+ aLabel = _local_impl->Label().Entry();
}
else aLabel = SALOMEDS::AttributeTreeNode::_narrow(_corba_impl)->Label();
return aLabel;
class SALOMEDS_AttributeTreeNode: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeTreeNode
{
public:
- SALOMEDS_AttributeTreeNode(const Handle(SALOMEDSImpl_AttributeTreeNode)& theAttr);
+ SALOMEDS_AttributeTreeNode(SALOMEDSImpl_AttributeTreeNode* theAttr);
SALOMEDS_AttributeTreeNode(SALOMEDS::AttributeTreeNode_ptr theAttr);
~SALOMEDS_AttributeTreeNode();
#include "SALOMEDS_AttributeTreeNode_i.hxx"
#include "utilities.h"
#include "SALOMEDS.hxx"
-#include <TDocStd_Document.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDF_Tool.hxx>
-#include <TDF_Data.hxx>
using namespace std;
-static Handle(SALOMEDSImpl_AttributeTreeNode) GetNode(SALOMEDS::AttributeTreeNode_ptr value,
- const Handle(SALOMEDSImpl_AttributeTreeNode)& aNode)
+static SALOMEDSImpl_AttributeTreeNode* GetNode(SALOMEDS::AttributeTreeNode_ptr value,
+ SALOMEDSImpl_AttributeTreeNode* aNode)
{
- Handle(SALOMEDSImpl_AttributeTreeNode) aResult = new SALOMEDSImpl_AttributeTreeNode;
- TCollection_AsciiString anEntry = value->Label();
- TDF_Label aLabel;
- TDF_Tool::Label(aNode->Label().Data(), anEntry, aLabel);
+ SALOMEDSImpl_AttributeTreeNode* aResult = NULL;
+ DF_Label aLabel = DF_Label::Label(aNode->Label(), value->Label());
if (aLabel.IsNull()) {
MESSAGE("SALOMEDS_AttributeTreeNode_i class: no such label")
MESSAGE("SALOMEDS_AttributeTreeNode_i class: no such label")
return aResult;
}
- if (!aLabel.FindAttribute(aNode->ID(), aResult)) {
+ if (!(aResult=(SALOMEDSImpl_AttributeTreeNode*)aLabel.FindAttribute(aNode->ID()))) {
MESSAGE("SALOMEDS_AttributeTreeNode_i class: no such attribute")
MESSAGE("SALOMEDS_AttributeTreeNode_i class: no such attribute")
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->SetFather(GetNode(value, aNode));
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::HasFather()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->HasFather();
+ return dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->HasFather();
}
SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetFather()
{
SALOMEDS::Locker lock;
SALOMEDS_AttributeTreeNode_i* aFather;
- aFather = new SALOMEDS_AttributeTreeNode_i(Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->GetFather(), _orb);
+ aFather = new SALOMEDS_AttributeTreeNode_i(dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->GetFather(), _orb);
#ifndef WNT
return aFather->POA_SALOMEDS::AttributeTreeNode::_this();
#else
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->SetPrevious(GetNode(value, aNode));
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::HasPrevious()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->HasPrevious();
+ return dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->HasPrevious();
}
SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetPrevious()
{
SALOMEDS::Locker lock;
SALOMEDS_AttributeTreeNode_i* aPrevious;
- aPrevious=new SALOMEDS_AttributeTreeNode_i(Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->GetPrevious(), _orb);
+ aPrevious=new SALOMEDS_AttributeTreeNode_i(dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->GetPrevious(), _orb);
#ifndef WNT
return aPrevious->POA_SALOMEDS::AttributeTreeNode::_this();
#else
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->SetNext(GetNode(value, aNode));
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::HasNext()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->HasNext();
+ return dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->HasNext();
}
SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetNext()
{
SALOMEDS::Locker lock;
SALOMEDS_AttributeTreeNode_i* aNext;
- aNext = new SALOMEDS_AttributeTreeNode_i(Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->GetNext(), _orb);
+ aNext = new SALOMEDS_AttributeTreeNode_i(dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->GetNext(), _orb);
#ifndef WNT
return aNext->POA_SALOMEDS::AttributeTreeNode::_this();
#else
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->SetFirst(GetNode(value, aNode));
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::HasFirst()
{
SALOMEDS::Locker lock;
- return Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->HasFirst();
+ return dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->HasFirst();
}
SALOMEDS::AttributeTreeNode_ptr SALOMEDS_AttributeTreeNode_i::GetFirst()
{
SALOMEDS::Locker lock;
SALOMEDS_AttributeTreeNode_i* aFirst;
- aFirst = new SALOMEDS_AttributeTreeNode_i(Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl)->GetFirst(), _orb);
+ aFirst = new SALOMEDS_AttributeTreeNode_i(dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl)->GetFirst(), _orb);
#ifndef WNT
return aFirst->POA_SALOMEDS::AttributeTreeNode::_this();
#else
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
- aNode->SetTreeID(Standard_GUID((char*)value));
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
+ aNode->SetTreeID(value);
}
char* SALOMEDS_AttributeTreeNode_i::GetTreeID()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
- char aGUID[40];
- aNode->ID().ToCString(aGUID);
- return CORBA::String_var(CORBA::string_dup(aGUID))._retn();
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
+ return CORBA::String_var(CORBA::string_dup(aNode->ID().c_str()))._retn();
}
void SALOMEDS_AttributeTreeNode_i::Append(SALOMEDS::AttributeTreeNode_ptr value)
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->Append(GetNode(value, aNode));
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->Prepend(GetNode(value, aNode));
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->InsertBefore(GetNode(value, aNode));
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->InsertAfter(GetNode(value, aNode));
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
aNode->Remove();
}
CORBA::Long SALOMEDS_AttributeTreeNode_i::Depth()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
return aNode->Depth();
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::IsRoot()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
return aNode->IsRoot();
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::IsDescendant(SALOMEDS::AttributeTreeNode_ptr value)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
return aNode->IsDescendant(GetNode(value, aNode));
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::IsFather(SALOMEDS::AttributeTreeNode_ptr value)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
return aNode->IsFather(GetNode(value, aNode));
}
CORBA::Boolean SALOMEDS_AttributeTreeNode_i::IsChild(SALOMEDS::AttributeTreeNode_ptr value)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeTreeNode) aNode = Handle(SALOMEDSImpl_AttributeTreeNode)::DownCast(_impl);
+ SALOMEDSImpl_AttributeTreeNode* aNode = dynamic_cast<SALOMEDSImpl_AttributeTreeNode*>(_impl);
return aNode->IsChild(GetNode(value, aNode));
}
char* SALOMEDS_AttributeTreeNode_i::Label()
{
SALOMEDS::Locker lock;
- TCollection_AsciiString aLabelName;
- TDF_Tool::Entry(_impl->Label(),aLabelName);
- return CORBA::String_var(CORBA::string_dup(aLabelName.ToCString()))._retn();
+ return CORBA::String_var(CORBA::string_dup(_impl->Label().Entry().c_str()))._retn();
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeTreeNode_i(const Handle(SALOMEDSImpl_AttributeTreeNode)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeTreeNode_i(SALOMEDSImpl_AttributeTreeNode* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeTreeNode_i() {};
#include <string>
#include <stdexcept>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <Standard_GUID.hxx>
-
-SALOMEDS_AttributeUserID::SALOMEDS_AttributeUserID(const Handle(SALOMEDSImpl_AttributeUserID)& theAttr)
+SALOMEDS_AttributeUserID::SALOMEDS_AttributeUserID(SALOMEDSImpl_AttributeUserID* theAttr)
:SALOMEDS_GenericAttribute(theAttr)
{}
if (_isLocal) {
SALOMEDS::Locker lock;
char guid[40];
- Handle(SALOMEDSImpl_AttributeUserID)::DownCast(_local_impl)->Value().ToCString(guid);
- aValue = std::string(guid);
+ aValue = dynamic_cast<SALOMEDSImpl_AttributeUserID*>(_local_impl)->Value();
}
else aValue = SALOMEDS::AttributeUserID::_narrow(_corba_impl)->Value();
return aValue;
void SALOMEDS_AttributeUserID::SetValue(const std::string& value)
{
- if(!Standard_GUID::CheckGUIDFormat((char*)value.c_str())) throw invalid_argument("Invalid GUID");
-
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeUserID)::
- DownCast(_local_impl)->SetValue(Standard_GUID((char*)value.c_str()));
+ dynamic_cast<SALOMEDSImpl_AttributeUserID*>(_local_impl)->SetValue(value);
}
else SALOMEDS::AttributeUserID::_narrow(_corba_impl)->SetValue(value.c_str());
}
class SALOMEDS_AttributeUserID: public SALOMEDS_GenericAttribute, public SALOMEDSClient_AttributeUserID
{
public:
- SALOMEDS_AttributeUserID(const Handle(SALOMEDSImpl_AttributeUserID)& theAttr);
+ SALOMEDS_AttributeUserID(SALOMEDSImpl_AttributeUserID* theAttr);
SALOMEDS_AttributeUserID(SALOMEDS::AttributeUserID_ptr theAttr);
~SALOMEDS_AttributeUserID();
#include "SALOMEDS_AttributeUserID_i.hxx"
#include "SALOMEDS.hxx"
-#include <TCollection_ExtendedString.hxx>
using namespace std;
char* SALOMEDS_AttributeUserID_i::Value()
{
SALOMEDS::Locker lock;
- char aGUID[40];
- Handle(SALOMEDSImpl_AttributeUserID)::DownCast(_impl)->ID().ToCString(aGUID);
- CORBA::String_var c_s = CORBA::string_dup(aGUID);
+ CORBA::String_var c_s = CORBA::string_dup(dynamic_cast<SALOMEDSImpl_AttributeUserID*>(_impl)->ID().c_str());
return c_s._retn();
}
SALOMEDS::Locker lock;
CheckLocked();
CORBA::String_var Str = CORBA::string_dup(value);
- Handle(SALOMEDSImpl_AttributeUserID)::DownCast(_impl)->SetValue(Standard_GUID(Standard_CString(Str)));
+ dynamic_cast<SALOMEDSImpl_AttributeUserID*>(_impl)->SetValue(string(Str));
}
public virtual SALOMEDS_GenericAttribute_i {
public:
- SALOMEDS_AttributeUserID_i(const Handle(SALOMEDSImpl_AttributeUserID)& theAttr, CORBA::ORB_ptr orb)
+ SALOMEDS_AttributeUserID_i(SALOMEDSImpl_AttributeUserID* theAttr, CORBA::ORB_ptr orb)
:SALOMEDS_GenericAttribute_i(theAttr, orb) {};
~SALOMEDS_AttributeUserID_i() {};
char* Value();
void SetValue(const char* value);
- static const Standard_GUID& DefaultID() {
+ static const std::string& DefaultID() {
return SALOMEDSImpl_AttributeUserID::DefaultID();
}
#include "SALOMEDS_AttributeString_i.hxx"
#define __CreateCORBAAttribute(CORBA_Name) if (strcmp(aTypeOfAttribute, #CORBA_Name) == 0) { \
- Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theAttr); \
+ SALOMEDSImpl_##CORBA_Name* A = dynamic_cast<SALOMEDSImpl_##CORBA_Name*>(theAttr); \
SALOMEDS_##CORBA_Name##_i* Attr = new SALOMEDS_##CORBA_Name##_i(A, theOrb); \
attr_servant = Attr; \
anAttribute = Attr->CORBA_Name::_this(); \
* Purpose :
*/
//============================================================================
-void SALOMEDS_BasicAttribute_i::SetLabel(const TDF_Label Lab)
+void SALOMEDS_BasicAttribute_i::SetLabel(const DF_Label& Lab)
{
_Lab = Lab;
}
// IDL headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
-#include <TDF_Label.hxx>
+#include <DF_Label.hxx>
class SALOMEDS_BasicAttribute_i: public POA_SALOMEDS::BasicAttribute,
public PortableServer::ServantBase {
protected:
- TDF_Label _Lab;
+ DF_Label _Lab;
public:
SALOMEDS_BasicAttribute_i() {};
virtual char * Save() =0;
virtual void Load () =0;
CORBA::Boolean GetPtr(SALOMEDS::SObject so);
- void SetLabel(const TDF_Label Lab);
+ void SetLabel(const DF_Label& Lab);
virtual char* GetType() = 0;
};
using namespace std;
-SALOMEDS_ChildIterator::SALOMEDS_ChildIterator(const Handle(SALOMEDSImpl_ChildIterator)& theIterator)
+SALOMEDS_ChildIterator::SALOMEDS_ChildIterator(const SALOMEDSImpl_ChildIterator& theIterator)
{
SALOMEDS::Locker lock;
_isLocal = true;
- _local_impl = theIterator;
+ _local_impl = theIterator.GetPersistentCopy();
_corba_impl = SALOMEDS::ChildIterator::_nil();
}
SALOMEDS_ChildIterator::SALOMEDS_ChildIterator(SALOMEDS::ChildIterator_ptr theIterator)
{
_isLocal = false;
- _local_impl = NULL;
_corba_impl = SALOMEDS::ChildIterator::_duplicate(theIterator);
}
SALOMEDS_ChildIterator::~SALOMEDS_ChildIterator()
{
if(!_isLocal) _corba_impl->Destroy();
+ else if(_local_impl) delete _local_impl;
}
void SALOMEDS_ChildIterator::Init()
bool SALOMEDS_ChildIterator::More()
{
- bool ret;
+ bool ret = false;
if (_isLocal) {
SALOMEDS::Locker lock;
ret = _local_impl->More();
{
private:
bool _isLocal;
- Handle(SALOMEDSImpl_ChildIterator) _local_impl;
+ SALOMEDSImpl_ChildIterator* _local_impl;
SALOMEDS::ChildIterator_var _corba_impl;
public:
- SALOMEDS_ChildIterator(const Handle(SALOMEDSImpl_ChildIterator)& theIterator);
+ SALOMEDS_ChildIterator(const SALOMEDSImpl_ChildIterator& theIterator);
SALOMEDS_ChildIterator(SALOMEDS::ChildIterator_ptr theIterator);
~SALOMEDS_ChildIterator();
* Purpose :
*/
//============================================================================
-SALOMEDS_ChildIterator_i::SALOMEDS_ChildIterator_i(const Handle(SALOMEDSImpl_ChildIterator)& theImpl,
+SALOMEDS_ChildIterator_i::SALOMEDS_ChildIterator_i(const SALOMEDSImpl_ChildIterator& theImpl,
CORBA::ORB_ptr orb)
- : _it(theImpl)
+ : _it(theImpl.GetPersistentCopy())
{
SALOMEDS::Locker lock;
_orb = CORBA::ORB::_duplicate(orb);
//============================================================================
SALOMEDS_ChildIterator_i::~SALOMEDS_ChildIterator_i()
{
+ if(_it) delete _it;
}
//============================================================================
SALOMEDS::SObject_ptr SALOMEDS_ChildIterator_i::Value()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO = _it->Value();
+ SALOMEDSImpl_SObject aSO = _it->Value();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
return so._retn();
}
{
private:
CORBA::ORB_ptr _orb;
- Handle(SALOMEDSImpl_ChildIterator) _it;
+ SALOMEDSImpl_ChildIterator* _it;
public:
//! standard constructor
- SALOMEDS_ChildIterator_i(const Handle(SALOMEDSImpl_ChildIterator)&, CORBA::ORB_ptr);
+ SALOMEDS_ChildIterator_i(const SALOMEDSImpl_ChildIterator&, CORBA::ORB_ptr);
//! standard destructor
~SALOMEDS_ChildIterator_i();
* Purpose :
*/
//============================================================================
-static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO,Standard_Integer offset) {
+static void DumpComponent(SALOMEDS::Study_ptr Study,SALOMEDS::SObject_ptr SO, int offset) {
SALOMEDS::SObject_var RefSO;
SALOMEDS::ChildIterator_var it = Study->NewChildIterator(SO);
for (; it->More();it->Next()){
{
SALOMEDS::AttributeName_var Name = SALOMEDS::AttributeName::_narrow(anAttr);
CORBA::String_var Val = Name->Value();
- for (Standard_Integer i = 1; i <= offset ; i++)
+ for (int i = 1; i <= offset ; i++)
MESSAGE("--");
MESSAGE(">"<<CSO->GetID()<<Val);
}
if (CSO->ReferencedObject(RefSO)) {
- for (Standard_Integer i = 1; i <= offset ; i++)
+ for (int i = 1; i <= offset ; i++)
MESSAGE(" ");
MESSAGE("*Reference"<<RefSO->GetID());
}
static void DumpStudy (SALOMEDS::Study_ptr Study) {
MESSAGE("Explore Study and Write name of each object if it exists");
- Standard_CString name;
+ char* name;
SALOMEDS::SComponentIterator_var itcomp = Study->NewComponentIterator();
- Standard_Integer offset = 1;
+ int offset = 1;
for (; itcomp->More(); itcomp->Next()) {
SALOMEDS::SComponent_var SC = itcomp->Value();
name = SC->ComponentDataType();
static void Test(SALOMEDS::StudyManager_ptr myStudyMgr )
{
try {
- Standard_CString name;
+ char* name;
MESSAGE("Create New Study Study1");
SALOMEDS::Study_var myStudy = myStudyMgr->NewStudy("Study1");
#include "SALOMEDS_AttributeString.hxx"
#define __CreateClientAttributeLocal(CORBA_Name) if (strcmp(aTypeOfAttribute.c_str(), #CORBA_Name) == 0) { \
- Handle(SALOMEDSImpl_##CORBA_Name) A = Handle(SALOMEDSImpl_##CORBA_Name)::DownCast(theGA); \
+ SALOMEDSImpl_##CORBA_Name* A = dynamic_cast<SALOMEDSImpl_##CORBA_Name*>(theGA); \
aGA = new SALOMEDS_##CORBA_Name(A); \
}
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#ifndef _SALOMEDS_DataMapIteratorOfDataMapOfIntegerString_HeaderFile
-#define _SALOMEDS_DataMapIteratorOfDataMapOfIntegerString_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-#include <Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#endif
-class Standard_NoSuchObject;
-class TCollection_ExtendedString;
-class TColStd_MapIntegerHasher;
-class SALOMEDS_DataMapOfIntegerString;
-class SALOMEDS_DataMapNodeOfDataMapOfIntegerString;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class SALOMEDS_DataMapIteratorOfDataMapOfIntegerString : public TCollection_BasicMapIterator {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT SALOMEDS_DataMapIteratorOfDataMapOfIntegerString();
-Standard_EXPORT SALOMEDS_DataMapIteratorOfDataMapOfIntegerString(const SALOMEDS_DataMapOfIntegerString& aMap);
-Standard_EXPORT void Initialize(const SALOMEDS_DataMapOfIntegerString& aMap) ;
-Standard_EXPORT const Standard_Real& Key() const;
-Standard_EXPORT const TCollection_ExtendedString& Value() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_DataMapIteratorOfDataMapOfIntegerString_0.cxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#include <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapOfIntegerString_HeaderFile
-#include <SALOMEDS_DataMapOfIntegerString.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-#include <SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#endif
-using namespace std;
-
-
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TCollection_ExtendedString
-#define TheItem_hxx <TCollection_ExtendedString.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_hxx <SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapOfIntegerString
-#define TCollection_DataMapIterator_hxx <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapOfIntegerString_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapOfIntegerString
-#define TCollection_DataMap_hxx <SALOMEDS_DataMapOfIntegerString.hxx>
-#include <TCollection_DataMapIterator.gxx>
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile
-#define _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile
-
-#ifndef _TCollection_BasicMapIterator_HeaderFile
-#include <TCollection_BasicMapIterator.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-#include <Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx>
-#endif
-class Standard_NoSuchObject;
-class TCollection_ExtendedString;
-class TDF_Label;
-class SALOMEDS_DataMapStringLabel;
-class SALOMEDS_DataMapNodeOfDataMapStringLabel;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class SALOMEDS_DataMapIteratorOfDataMapStringLabel : public TCollection_BasicMapIterator {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT SALOMEDS_DataMapIteratorOfDataMapStringLabel();
-Standard_EXPORT SALOMEDS_DataMapIteratorOfDataMapStringLabel(const SALOMEDS_DataMapStringLabel& aMap);
-Standard_EXPORT void Initialize(const SALOMEDS_DataMapStringLabel& aMap) ;
-Standard_EXPORT const TCollection_ExtendedString& Key() const;
-Standard_EXPORT const TDF_Label& Value() const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DataMapIteratorOfDataMapStringLabel_0.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
-
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapStringLabel_HeaderFile
-#include "SALOMEDS_DataMapStringLabel.hxx"
-#endif
-#ifndef _SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-#include "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
-#endif
- using namespace std;
-
-
-#define TheKey TCollection_ExtendedString
-#define TheKey_hxx <TCollection_ExtendedString.hxx>
-#define TheItem TDF_Label
-#define TheItem_hxx <TDF_Label.hxx>
-#define Hasher TCollection_ExtendedString
-#define Hasher_hxx <TCollection_ExtendedString.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_hxx "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapStringLabel
-#define TCollection_DataMapIterator_hxx "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapStringLabel_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapStringLabel
-#define TCollection_DataMap_hxx "SALOMEDS_DataMapStringLabel.hxx"
-#include <TCollection_DataMapIterator.gxx>
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#ifndef _SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-#define _SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-#include <Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#endif
-
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class TCollection_ExtendedString;
-class TColStd_MapIntegerHasher;
-class SALOMEDS_DataMapOfIntegerString;
-class SALOMEDS_DataMapIteratorOfDataMapOfIntegerString;
-
-
-class SALOMEDS_DataMapNodeOfDataMapOfIntegerString : public TCollection_MapNode {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-SALOMEDS_DataMapNodeOfDataMapOfIntegerString(const Standard_Real& K,const TCollection_ExtendedString& I,const TCollection_MapNodePtr& n);
- Standard_Real& Key() const;
- TCollection_ExtendedString& Value() const;
-Standard_EXPORT ~SALOMEDS_DataMapNodeOfDataMapOfIntegerString();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_DataMapNodeOfDataMapOfIntegerString_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Real myKey;
-TCollection_ExtendedString myValue;
-
-
-};
-
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TCollection_ExtendedString
-#define TheItem_hxx <TCollection_ExtendedString.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_hxx <SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapOfIntegerString
-#define TCollection_DataMapIterator_hxx <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapOfIntegerString_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapOfIntegerString
-#define TCollection_DataMap_hxx <SALOMEDS_DataMapOfIntegerString.hxx>
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_DataMapNodeOfDataMapOfIntegerString_0.cxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#include <SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapOfIntegerString_HeaderFile
-#include <SALOMEDS_DataMapOfIntegerString.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapIteratorOfDataMapOfIntegerString_HeaderFile
-#include <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-#endif
-using namespace std;
-SALOMEDS_DataMapNodeOfDataMapOfIntegerString::~SALOMEDS_DataMapNodeOfDataMapOfIntegerString() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_DataMapNodeOfDataMapOfIntegerString_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_DataMapNodeOfDataMapOfIntegerString",
- sizeof(SALOMEDS_DataMapNodeOfDataMapOfIntegerString),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString) Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapOfIntegerString))) {
- _anOtherObject = Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)((Handle(SALOMEDS_DataMapNodeOfDataMapOfIntegerString)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_DataMapNodeOfDataMapOfIntegerString::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapOfIntegerString) ;
-}
-Standard_Boolean SALOMEDS_DataMapNodeOfDataMapOfIntegerString::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapOfIntegerString) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString::~Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString() {}
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TCollection_ExtendedString
-#define TheItem_hxx <TCollection_ExtendedString.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_hxx <SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapOfIntegerString
-#define TCollection_DataMapIterator_hxx <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapOfIntegerString_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapOfIntegerString
-#define TCollection_DataMap_hxx <SALOMEDS_DataMapOfIntegerString.hxx>
-#include <TCollection_DataMapNode.gxx>
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-#define _SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-#include <Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx>
-#endif
-
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_MapNode_HeaderFile
-#include <TCollection_MapNode.hxx>
-#endif
-#ifndef _TCollection_MapNodePtr_HeaderFile
-#include <TCollection_MapNodePtr.hxx>
-#endif
-class TCollection_ExtendedString;
-class TDF_Label;
-class SALOMEDS_DataMapStringLabel;
-class SALOMEDS_DataMapIteratorOfDataMapStringLabel;
-
-
-class SALOMEDS_DataMapNodeOfDataMapStringLabel : public TCollection_MapNode {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT inline SALOMEDS_DataMapNodeOfDataMapStringLabel(const TCollection_ExtendedString& K,const TDF_Label& I,const TCollection_MapNodePtr& n);
-Standard_EXPORT inline TCollection_ExtendedString& Key() const;
-Standard_EXPORT inline TDF_Label& Value() const;
-Standard_EXPORT ~SALOMEDS_DataMapNodeOfDataMapStringLabel();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_DataMapNodeOfDataMapStringLabel_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TCollection_ExtendedString myKey;
-TDF_Label myValue;
-
-
-};
-
-#define TheKey TCollection_ExtendedString
-#define TheKey_hxx <TCollection_ExtendedString.hxx>
-#define TheItem TDF_Label
-#define TheItem_hxx <TDF_Label.hxx>
-#define Hasher TCollection_ExtendedString
-#define Hasher_hxx <TCollection_ExtendedString.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_hxx "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapStringLabel
-#define TCollection_DataMapIterator_hxx "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapStringLabel_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapStringLabel
-#define TCollection_DataMap_hxx "SALOMEDS_DataMapStringLabel.hxx"
-
-#include <TCollection_DataMapNode.lxx>
-
-#undef TheKey
-#undef TheKey_hxx
-#undef TheItem
-#undef TheItem_hxx
-#undef Hasher
-#undef Hasher_hxx
-#undef TCollection_DataMapNode
-#undef TCollection_DataMapNode_hxx
-#undef TCollection_DataMapIterator
-#undef TCollection_DataMapIterator_hxx
-#undef Handle_TCollection_DataMapNode
-#undef TCollection_DataMapNode_Type_
-#undef TCollection_DataMap
-#undef TCollection_DataMap_hxx
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel_0.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapStringLabel_HeaderFile
-#include "SALOMEDS_DataMapStringLabel.hxx"
-#endif
-#ifndef _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile
-#include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
-#endif
-using namespace std;
-SALOMEDS_DataMapNodeOfDataMapStringLabel::~SALOMEDS_DataMapNodeOfDataMapStringLabel() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_DataMapNodeOfDataMapStringLabel_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_DataMapNodeOfDataMapStringLabel",
- sizeof(SALOMEDS_DataMapNodeOfDataMapStringLabel),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel) Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapStringLabel))) {
- _anOtherObject = Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)((Handle(SALOMEDS_DataMapNodeOfDataMapStringLabel)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_DataMapNodeOfDataMapStringLabel::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapStringLabel) ;
-}
-Standard_Boolean SALOMEDS_DataMapNodeOfDataMapStringLabel::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_DataMapNodeOfDataMapStringLabel) == AType || TCollection_MapNode::IsKind(AType));
-}
-Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel::~Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel() {}
-#define TheKey TCollection_ExtendedString
-#define TheKey_hxx <TCollection_ExtendedString.hxx>
-#define TheItem TDF_Label
-#define TheItem_hxx <TDF_Label.hxx>
-#define Hasher TCollection_ExtendedString
-#define Hasher_hxx <TCollection_ExtendedString.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_hxx "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapStringLabel
-#define TCollection_DataMapIterator_hxx "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapStringLabel_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapStringLabel
-#define TCollection_DataMap_hxx "SALOMEDS_DataMapStringLabel.hxx"
-#include <TCollection_DataMapNode.gxx>
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_DataMapOfIntegerString.hxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#ifndef _SALOMEDS_DataMapOfIntegerString_HeaderFile
-#define _SALOMEDS_DataMapOfIntegerString_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-#include <Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class TCollection_ExtendedString;
-class TColStd_MapIntegerHasher;
-class SALOMEDS_DataMapNodeOfDataMapOfIntegerString;
-class SALOMEDS_DataMapIteratorOfDataMapOfIntegerString;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class SALOMEDS_DataMapOfIntegerString : public TCollection_BasicMap {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT SALOMEDS_DataMapOfIntegerString(const Standard_Integer NbBuckets = 1);
-Standard_EXPORT SALOMEDS_DataMapOfIntegerString& Assign(const SALOMEDS_DataMapOfIntegerString& Other) ;
- SALOMEDS_DataMapOfIntegerString& operator =(const SALOMEDS_DataMapOfIntegerString& Other)
-{
- return Assign(Other);
-}
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-Standard_EXPORT void Clear() ;
-~SALOMEDS_DataMapOfIntegerString()
-{
- Clear();
-}
-
-Standard_EXPORT Standard_Boolean Bind(const Standard_Real& K,const TCollection_ExtendedString& I) ;
-Standard_EXPORT Standard_Boolean IsBound(const Standard_Real& K) const;
-Standard_EXPORT Standard_Boolean UnBind(const Standard_Real& K) ;
-Standard_EXPORT const TCollection_ExtendedString& Find(const Standard_Real& K) const;
- const TCollection_ExtendedString& operator()(const Standard_Real& K) const
-{
- return Find(K);
-}
-
-Standard_EXPORT TCollection_ExtendedString& ChangeFind(const Standard_Real& K) ;
- TCollection_ExtendedString& operator()(const Standard_Real& K)
-{
- return ChangeFind(K);
-}
-
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-Standard_EXPORT SALOMEDS_DataMapOfIntegerString(const SALOMEDS_DataMapOfIntegerString& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_DataMapOfIntegerString_0.cxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#include <SALOMEDS_DataMapOfIntegerString.hxx>
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TColStd_MapIntegerHasher_HeaderFile
-#include <TColStd_MapIntegerHasher.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapNodeOfDataMapOfIntegerString_HeaderFile
-#include <SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapIteratorOfDataMapOfIntegerString_HeaderFile
-#include <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-#endif
- using namespace std;
-
-
-#define TheKey Standard_Real
-#define TheKey_hxx <Standard_Real.hxx>
-#define TheItem TCollection_ExtendedString
-#define TheItem_hxx <TCollection_ExtendedString.hxx>
-#define Hasher TColStd_MapIntegerHasher
-#define Hasher_hxx <TColStd_MapIntegerHasher.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_hxx <SALOMEDS_DataMapNodeOfDataMapOfIntegerString.hxx>
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapOfIntegerString
-#define TCollection_DataMapIterator_hxx <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapOfIntegerString
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapOfIntegerString_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapOfIntegerString
-#define TCollection_DataMap_hxx <SALOMEDS_DataMapOfIntegerString.hxx>
-#include <TCollection_DataMap.gxx>
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DataMapStringLabel.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_DataMapStringLabel_HeaderFile
-#define _SALOMEDS_DataMapStringLabel_HeaderFile
-
-#ifndef _TCollection_BasicMap_HeaderFile
-#include <TCollection_BasicMap.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-#include <Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-class Standard_DomainError;
-class Standard_NoSuchObject;
-class TCollection_ExtendedString;
-class TDF_Label;
-class SALOMEDS_DataMapNodeOfDataMapStringLabel;
-class SALOMEDS_DataMapIteratorOfDataMapStringLabel;
-
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include <Standard_Macro.hxx>
-#endif
-
-class SALOMEDS_DataMapStringLabel : public TCollection_BasicMap {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT SALOMEDS_DataMapStringLabel(const Standard_Integer NbBuckets = 1);
-Standard_EXPORT SALOMEDS_DataMapStringLabel& Assign(const SALOMEDS_DataMapStringLabel& Other) ;
- SALOMEDS_DataMapStringLabel& operator =(const SALOMEDS_DataMapStringLabel& Other)
-{
- return Assign(Other);
-}
-
-Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ;
-Standard_EXPORT void Clear() ;
-~SALOMEDS_DataMapStringLabel()
-{
- Clear();
-}
-
-Standard_EXPORT Standard_Boolean Bind(const TCollection_ExtendedString& K,const TDF_Label& I) ;
-Standard_EXPORT Standard_Boolean IsBound(const TCollection_ExtendedString& K) const;
-Standard_EXPORT Standard_Boolean UnBind(const TCollection_ExtendedString& K) ;
-Standard_EXPORT const TDF_Label& Find(const TCollection_ExtendedString& K) const;
- const TDF_Label& operator()(const TCollection_ExtendedString& K) const
-{
- return Find(K);
-}
-
-Standard_EXPORT TDF_Label& ChangeFind(const TCollection_ExtendedString& K) ;
- TDF_Label& operator()(const TCollection_ExtendedString& K)
-{
- return ChangeFind(K);
-}
-
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-Standard_EXPORT SALOMEDS_DataMapStringLabel(const SALOMEDS_DataMapStringLabel& Other);
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DataMapStringLabel_0.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_DataMapStringLabel.hxx"
-
-#ifndef _Standard_DomainError_HeaderFile
-#include <Standard_DomainError.hxx>
-#endif
-#ifndef _Standard_NoSuchObject_HeaderFile
-#include <Standard_NoSuchObject.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _SALOMEDS_DataMapNodeOfDataMapStringLabel_HeaderFile
-#include "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
-#endif
-#ifndef _SALOMEDS_DataMapIteratorOfDataMapStringLabel_HeaderFile
-#include "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
-#endif
- using namespace std;
-
-
-#define TheKey TCollection_ExtendedString
-#define TheKey_hxx <TCollection_ExtendedString.hxx>
-#define TheItem TDF_Label
-#define TheItem_hxx <TDF_Label.hxx>
-#define Hasher TCollection_ExtendedString
-#define Hasher_hxx <TCollection_ExtendedString.hxx>
-#define TCollection_DataMapNode SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_hxx "SALOMEDS_DataMapNodeOfDataMapStringLabel.hxx"
-#define TCollection_DataMapIterator SALOMEDS_DataMapIteratorOfDataMapStringLabel
-#define TCollection_DataMapIterator_hxx "SALOMEDS_DataMapIteratorOfDataMapStringLabel.hxx"
-#define Handle_TCollection_DataMapNode Handle_SALOMEDS_DataMapNodeOfDataMapStringLabel
-#define TCollection_DataMapNode_Type_() SALOMEDS_DataMapNodeOfDataMapStringLabel_Type_()
-#define TCollection_DataMap SALOMEDS_DataMapStringLabel
-#define TCollection_DataMap_hxx "SALOMEDS_DataMapStringLabel.hxx"
-#include <TCollection_DataMap.gxx>
-
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_DrawableAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class DrawableAttribute from SALOMEDS inherits Integer from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; value : Integer from Standard)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns DrawableAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable DrawableAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end DrawableAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DrawableAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_DrawableAttribute.ixx"
-#include <TDataStd_Integer.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_DrawableAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_DrawableAttributeID ("12837184-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_DrawableAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_DrawableAttribute) SALOMEDS_DrawableAttribute::Set (const TDF_Label& L,
- const Standard_Integer value)
-{
- Handle(SALOMEDS_DrawableAttribute) A;
- if (!L.FindAttribute(SALOMEDS_DrawableAttribute::GetID(),A)) {
- A = new SALOMEDS_DrawableAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Integer)::DownCast(A))->Set (value);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_DrawableAttribute::SALOMEDS_DrawableAttribute()
-{
- TDataStd_Integer::Set(0);
-}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_DrawableAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_DrawableAttribute::NewEmpty () const
-{
- return new SALOMEDS_DrawableAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_DrawableAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer s = Handle(TDataStd_Integer)::DownCast (with)->Get ();
- TDataStd_Integer::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_DrawableAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Integer)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DrawableAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_DrawableAttribute_HeaderFile
-#define _SALOMEDS_DrawableAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_DrawableAttribute_HeaderFile
-#include <Handle_SALOMEDS_DrawableAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_Integer_HeaderFile
-#include <TDataStd_Integer.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_DrawableAttribute : public TDataStd_Integer {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_DrawableAttribute Set(const TDF_Label& label,const Standard_Integer value) ;
-Standard_EXPORT SALOMEDS_DrawableAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_DrawableAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_DrawableAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DrawableAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_DrawableAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_DrawableAttribute::~SALOMEDS_DrawableAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_DrawableAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Integer);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Integer);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_DrawableAttribute",
- sizeof(SALOMEDS_DrawableAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_DrawableAttribute) Handle(SALOMEDS_DrawableAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_DrawableAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_DrawableAttribute))) {
- _anOtherObject = Handle(SALOMEDS_DrawableAttribute)((Handle(SALOMEDS_DrawableAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_DrawableAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_DrawableAttribute) ;
-}
-Standard_Boolean SALOMEDS_DrawableAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_DrawableAttribute) == AType || TDataStd_Integer::IsKind(AType));
-}
-Handle_SALOMEDS_DrawableAttribute::~Handle_SALOMEDS_DrawableAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_DrawableAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_DrawableAttribute_HeaderFile
-#include "SALOMEDS_DrawableAttribute.hxx"
-#endif
{
}
-Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile)
+SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::Save(const SALOMEDSImpl_SComponent& theComponent,
+ const string& theURL,
+ long& theStreamLength,
+ bool isMultiFile)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
- CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
+ CORBA::String_var url = CORBA::string_dup(theURL.c_str());
SALOMEDS::unlock();
SALOMEDS::TMPFile_var aStream = _driver->Save(sco.in(), url, isMultiFile);
- Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn()));
+ SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn());
theStreamLength = aTMPFile->Size();
SALOMEDS::lock();
return aTMPFile;
}
-Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile)
+SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::SaveASCII(const SALOMEDSImpl_SComponent& theComponent,
+ const string& theURL,
+ long& theStreamLength,
+ bool isMultiFile)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
- CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
+ CORBA::String_var url = CORBA::string_dup(theURL.c_str());
SALOMEDS::unlock();
SALOMEDS::TMPFile_var aStream = _driver->SaveASCII(sco.in(), url, isMultiFile);
- Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn()));
+ SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn());
theStreamLength = aTMPFile->Size();
SALOMEDS::lock();
return aTMPFile;
}
-bool SALOMEDS_Driver_i::Load(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+bool SALOMEDS_Driver_i::Load(const SALOMEDSImpl_SComponent& theComponent,
const unsigned char* theStream,
const long theStreamLength,
- const TCollection_AsciiString& theURL,
+ const string& theURL,
bool isMultiFile)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
- CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
+ CORBA::String_var url = CORBA::string_dup(theURL.c_str());
CORBA::Octet* anOctetBuf = (CORBA::Octet*)theStream;
SALOMEDS::TMPFile_var aStream;
return isOk;
}
-bool SALOMEDS_Driver_i::LoadASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+bool SALOMEDS_Driver_i::LoadASCII(const SALOMEDSImpl_SComponent& theComponent,
const unsigned char* theStream,
const long theStreamLength,
- const TCollection_AsciiString& theURL,
+ const string& theURL,
bool isMultiFile)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
- CORBA::String_var url = CORBA::string_dup(theURL.ToCString());
+ CORBA::String_var url = CORBA::string_dup(theURL.c_str());
CORBA::Octet* anOctetBuf = (CORBA::Octet*)theStream;
SALOMEDS::TMPFile_var aStream;
return isOk;
}
-void SALOMEDS_Driver_i::Close(const Handle(SALOMEDSImpl_SComponent)& theComponent)
+void SALOMEDS_Driver_i::Close(const SALOMEDSImpl_SComponent& theComponent)
{
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (theComponent, _orb);
-TCollection_AsciiString SALOMEDS_Driver_i::IORToLocalPersistentID(const Handle(SALOMEDSImpl_SObject)& theSObject,
- const TCollection_AsciiString& IORString,
- bool isMultiFile,
- bool isASCII)
+string SALOMEDS_Driver_i::IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
+ const string& IORString,
+ bool isMultiFile,
+ bool isASCII)
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theSObject, _orb);
- CORBA::String_var ior = CORBA::string_dup(IORString.ToCString());
+ CORBA::String_var ior = CORBA::string_dup(IORString.c_str());
SALOMEDS::unlock();
CORBA::String_var pers_string =_driver->IORToLocalPersistentID(so.in(), ior.in(), isMultiFile, isASCII);
SALOMEDS::lock();
- return TCollection_AsciiString(pers_string);
+ return string(pers_string);
}
-TCollection_AsciiString SALOMEDS_Driver_i::LocalPersistentIDToIOR(const Handle(SALOMEDSImpl_SObject)& theObject,
- const TCollection_AsciiString& aLocalPersistentID,
- bool isMultiFile,
- bool isASCII)
+string SALOMEDS_Driver_i::LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theObject,
+ const string& aLocalPersistentID,
+ bool isMultiFile,
+ bool isASCII)
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb);
- CORBA::String_var pers_string = CORBA::string_dup(aLocalPersistentID.ToCString());
+ CORBA::String_var pers_string = CORBA::string_dup(aLocalPersistentID.c_str());
SALOMEDS::unlock();
CORBA::String_var IOR = _driver->LocalPersistentIDToIOR(so.in(), pers_string.in(), isMultiFile, isASCII);
SALOMEDS::lock();
- return TCollection_AsciiString(IOR);
+ return string(IOR);
}
-bool SALOMEDS_Driver_i::CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject)
+bool SALOMEDS_Driver_i::CanCopy(const SALOMEDSImpl_SObject& theObject)
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb);
}
-Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
- int& theObjectID,
- long& theStreamLength)
+SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::CopyFrom(const SALOMEDSImpl_SObject& theObject,
+ int& theObjectID,
+ long& theStreamLength)
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb);
SALOMEDS::unlock();
CORBA::Long anObjectID;
SALOMEDS::TMPFile_var aStream = _driver->CopyFrom(so.in(), anObjectID);
- Handle(SALOMEDSImpl_TMPFile) aTMPFile(new SALOMEDS_TMPFile_i(aStream._retn()));
+ SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn());
theStreamLength = aTMPFile->Size();
theObjectID = anObjectID;
SALOMEDS::lock();
return aTMPFile;
}
-bool SALOMEDS_Driver_i::CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID)
+bool SALOMEDS_Driver_i::CanPaste(const string& theComponentName, int theObjectID)
{
SALOMEDS::unlock();
- bool canPaste = _driver->CanPaste(theComponentName.ToCString(), theObjectID);
+ bool canPaste = _driver->CanPaste(theComponentName.c_str(), theObjectID);
SALOMEDS::lock();
return canPaste;
}
-TCollection_AsciiString SALOMEDS_Driver_i::PasteInto(const unsigned char* theStream,
- const long theStreamLength,
- int theObjectID,
- const Handle(SALOMEDSImpl_SObject)& theObject)
+string SALOMEDS_Driver_i::PasteInto(const unsigned char* theStream,
+ const long theStreamLength,
+ int theObjectID,
+ const SALOMEDSImpl_SObject& theObject)
{
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (theObject, _orb);
CORBA::Octet* anOctetBuf = (CORBA::Octet*)theStream;
SALOMEDS::SObject_var ret_so = _driver->PasteInto(aStream.in(), theObjectID, so.in());
SALOMEDS::lock();
- return TCollection_AsciiString((char*)ret_so->GetID());
+ return string(ret_so->GetID());
}
-Handle(SALOMEDSImpl_TMPFile) SALOMEDS_Driver_i::DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
- bool isPublished,
- bool& isValidScript,
- long& theStreamLength)
+SALOMEDSImpl_TMPFile* SALOMEDS_Driver_i::DumpPython(SALOMEDSImpl_Study* theStudy,
+ bool isPublished,
+ bool& isValidScript,
+ long& theStreamLength)
{
SALOMEDS_Study_i * st_servant = new SALOMEDS_Study_i (theStudy, _orb);
SALOMEDS::Study_var st = SALOMEDS::Study::_narrow(st_servant->_this());
SALOMEDS::unlock();
CORBA::Boolean aValidScript, aPublished = isPublished;
Engines::TMPFile_var aStream = aComponent->DumpPython(st.in(), aPublished, aValidScript);
- Handle(SALOMEDSImpl_TMPFile) aTMPFile(new Engines_TMPFile_i(aStream._retn()));
+ SALOMEDSImpl_TMPFile* aTMPFile = new Engines_TMPFile_i(aStream._retn());
theStreamLength = aTMPFile->Size();
isValidScript = aValidScript;
SALOMEDS::lock();
// SALOMEDS_DriverFactory
//###############################################################################################################
-SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByType
- (const TCollection_AsciiString& theComponentType)
+SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByType(const string& theComponentType)
{
CORBA::Object_var obj;
- TCollection_AsciiString aFactoryType;
+ string aFactoryType;
if (theComponentType == "SUPERV") aFactoryType = "SuperVisionContainer";
else aFactoryType = "FactoryServer";
SALOMEDS::unlock();
- obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component
- (aFactoryType.ToCString(), theComponentType.ToCString());
+ obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component(aFactoryType.c_str(), theComponentType.c_str());
SALOMEDS::lock();
if (CORBA::is_nil(obj)) {
- obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component
- ("FactoryServerPy", theComponentType.ToCString());
+ obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component("FactoryServerPy", theComponentType.c_str());
}
if (!CORBA::is_nil(obj)) {
return NULL;
}
-SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByIOR(const TCollection_AsciiString& theIOR)
+SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByIOR(const string& theIOR)
{
CORBA::Object_var obj;
- obj = _orb->string_to_object(theIOR.ToCString());
+ obj = _orb->string_to_object(theIOR.c_str());
if (!CORBA::is_nil(obj)) {
SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj);
#define __SALOMEDS_DRIVER_I_H__
#include <omniORB4/CORBA.h>
-#include <TCollection_AsciiString.hxx>
#include "SALOMEDSImpl_Driver.hxx"
#include "SALOMEDSImpl_SComponent.hxx"
#include "SALOMEDSImpl_SObject.hxx"
~SALOMEDS_Driver_i();
- virtual TCollection_AsciiString GetIOR()
+ virtual std::string GetIOR()
{
CORBA::String_var ior = _orb->object_to_string(_driver);
- return TCollection_AsciiString(ior);
+ return std::string(ior);
}
- virtual Handle(SALOMEDSImpl_TMPFile) Save(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile);
+ virtual SALOMEDSImpl_TMPFile* Save(const SALOMEDSImpl_SComponent& theComponent,
+ const std::string& theURL,
+ long& theStreamLength,
+ bool isMultiFile);
- virtual Handle(SALOMEDSImpl_TMPFile) SaveASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
- const TCollection_AsciiString& theURL,
- long& theStreamLength,
- bool isMultiFile);
+ virtual SALOMEDSImpl_TMPFile* SaveASCII(const SALOMEDSImpl_SComponent& theComponent,
+ const std::string& theURL,
+ long& theStreamLength,
+ bool isMultiFile);
- virtual bool Load(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ virtual bool Load(const SALOMEDSImpl_SComponent& theComponent,
const unsigned char* theStream,
const long theStreamLength,
- const TCollection_AsciiString& theURL,
+ const std::string& theURL,
bool isMultiFile);
- virtual bool LoadASCII(const Handle(SALOMEDSImpl_SComponent)& theComponent,
+ virtual bool LoadASCII(const SALOMEDSImpl_SComponent& theComponent,
const unsigned char* theStream,
const long theStreamLength,
- const TCollection_AsciiString& theURL,
+ const std::string& theURL,
bool isMultiFile);
- virtual void Close(const Handle(SALOMEDSImpl_SComponent)& theComponent);
+ virtual void Close(const SALOMEDSImpl_SComponent& theComponent);
- virtual TCollection_AsciiString ComponentDataType()
+ virtual std::string ComponentDataType()
{
CORBA::String_var ior = _driver->ComponentDataType();
- return TCollection_AsciiString(ior);
+ return std::string(ior);
}
- virtual TCollection_AsciiString IORToLocalPersistentID(const Handle(SALOMEDSImpl_SObject)& theSObject,
- const TCollection_AsciiString& IORString,
- bool isMultiFile,
- bool isASCII);
+ virtual std::string IORToLocalPersistentID(const SALOMEDSImpl_SObject& theSObject,
+ const std::string& IORString,
+ bool isMultiFile,
+ bool isASCII);
- virtual TCollection_AsciiString LocalPersistentIDToIOR(const Handle(SALOMEDSImpl_SObject)& theSObject,
- const TCollection_AsciiString& aLocalPersistentID,
- bool isMultiFile,
- bool isASCII);
+ virtual std::string LocalPersistentIDToIOR(const SALOMEDSImpl_SObject& theSObject,
+ const std::string& aLocalPersistentID,
+ bool isMultiFile,
+ bool isASCII);
- virtual bool CanCopy(const Handle(SALOMEDSImpl_SObject)& theObject);
+ virtual bool CanCopy(const SALOMEDSImpl_SObject& theObject);
- virtual Handle(SALOMEDSImpl_TMPFile) CopyFrom(const Handle(SALOMEDSImpl_SObject)& theObject,
- int& theObjectID,
- long& theStreamLength);
+ virtual SALOMEDSImpl_TMPFile* CopyFrom(const SALOMEDSImpl_SObject& theObject,
+ int& theObjectID,
+ long& theStreamLength);
- virtual bool CanPaste(const TCollection_AsciiString& theComponentName, int theObjectID);
+ virtual bool CanPaste(const std::string& theComponentName, int theObjectID);
- virtual TCollection_AsciiString PasteInto(const unsigned char* theStream,
- const long theStreamLength,
- int theObjectID,
- const Handle(SALOMEDSImpl_SObject)& theObject);
+ virtual std::string PasteInto(const unsigned char* theStream,
+ const long theStreamLength,
+ int theObjectID,
+ const SALOMEDSImpl_SObject& theObject);
- virtual Handle(SALOMEDSImpl_TMPFile) DumpPython(const Handle(SALOMEDSImpl_Study)& theStudy,
- bool isPublished,
- bool& isValidScript,
- long& theStreamLength);
+ virtual SALOMEDSImpl_TMPFile* DumpPython(SALOMEDSImpl_Study* theStudy,
+ bool isPublished,
+ bool& isValidScript,
+ long& theStreamLength);
};
#include "SALOME_NamingService.hxx"
delete _name_service;
}
- virtual SALOMEDSImpl_Driver* GetDriverByType(const TCollection_AsciiString& theComponentType);
+ virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType);
- virtual SALOMEDSImpl_Driver* GetDriverByIOR(const TCollection_AsciiString& theIOR);
+ virtual SALOMEDSImpl_Driver* GetDriverByIOR(const std::string& theIOR);
};
#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_ExpandableAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class ExpandableAttribute from SALOMEDS inherits Integer from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; value : Integer from Standard)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns ExpandableAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable ExpandableAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end ExpandableAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_ExpandableAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_ExpandableAttribute.ixx"
-#include <TDataStd_Integer.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_ExpandableAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_ExpandableAttributeID ("12837185-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_ExpandableAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_ExpandableAttribute) SALOMEDS_ExpandableAttribute::Set (const TDF_Label& L,
- const Standard_Integer value)
-{
- Handle(SALOMEDS_ExpandableAttribute) A;
- if (!L.FindAttribute(SALOMEDS_ExpandableAttribute::GetID(),A)) {
- A = new SALOMEDS_ExpandableAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Integer)::DownCast(A))->Set (value);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_ExpandableAttribute::SALOMEDS_ExpandableAttribute()
-{
- TDataStd_Integer::Set(0);
-}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_ExpandableAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_ExpandableAttribute::NewEmpty () const
-{
- return new SALOMEDS_ExpandableAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_ExpandableAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer s = Handle(TDataStd_Integer)::DownCast (with)->Get ();
- TDataStd_Integer::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_ExpandableAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Integer)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_ExpandableAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_ExpandableAttribute_HeaderFile
-#define _SALOMEDS_ExpandableAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_ExpandableAttribute_HeaderFile
-#include <Handle_SALOMEDS_ExpandableAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_Integer_HeaderFile
-#include <TDataStd_Integer.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_ExpandableAttribute : public TDataStd_Integer {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_ExpandableAttribute Set(const TDF_Label& label,const Standard_Integer value) ;
-Standard_EXPORT SALOMEDS_ExpandableAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_ExpandableAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_ExpandableAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_ExpandableAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_ExpandableAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_ExpandableAttribute::~SALOMEDS_ExpandableAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_ExpandableAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Integer);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Integer);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_ExpandableAttribute",
- sizeof(SALOMEDS_ExpandableAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_ExpandableAttribute) Handle(SALOMEDS_ExpandableAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_ExpandableAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_ExpandableAttribute))) {
- _anOtherObject = Handle(SALOMEDS_ExpandableAttribute)((Handle(SALOMEDS_ExpandableAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_ExpandableAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_ExpandableAttribute) ;
-}
-Standard_Boolean SALOMEDS_ExpandableAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_ExpandableAttribute) == AType || TDataStd_Integer::IsKind(AType));
-}
-Handle_SALOMEDS_ExpandableAttribute::~Handle_SALOMEDS_ExpandableAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_ExpandableAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_ExpandableAttribute_HeaderFile
-#include "SALOMEDS_ExpandableAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_ExternalFileDef.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class ExternalFileDef from SALOMEDS inherits Comment from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF;
- Name : ExtendedString from TCollection)
- returns ExternalFileDef from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable ExternalFileDef from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end ExternalFileDef;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_ExternalFileDef.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_ExternalFileDef.ixx"
-#include <TDataStd_Comment.hxx>
-#include <TCollection_ExtendedString.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_ExternalFileDef::GetID ()
-{
- static Standard_GUID SALOMEDS_ExternalFileDefID ("7123AD4C-ACDB-4e3a-8FDC-70EA164D2CBE");
- return SALOMEDS_ExternalFileDefID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_ExternalFileDef) SALOMEDS_ExternalFileDef::Set (const TDF_Label& L,
- const TCollection_ExtendedString& S)
-{
-
- Handle(SALOMEDS_ExternalFileDef) A;
- if (!L.FindAttribute(SALOMEDS_ExternalFileDef::GetID(),A)) {
- A = new SALOMEDS_ExternalFileDef();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Comment)::DownCast(A))->Set (S);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_ExternalFileDef::SALOMEDS_ExternalFileDef()
-{}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_ExternalFileDef::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_ExternalFileDef::NewEmpty () const
-{
- return new SALOMEDS_ExternalFileDef();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_ExternalFileDef::Restore(const Handle(TDF_Attribute)& with)
-{
- TCollection_ExtendedString s = Handle(TDataStd_Comment)::DownCast (with)->Get ();
- TDataStd_Comment::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_ExternalFileDef::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Comment)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// File generated by CPPExt (Transient)
-//
-// Copyright (C) 1991,1995 by
-//
-// MATRA DATAVISION, FRANCE
-//
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
-#ifndef _SALOMEDS_ExternalFileDef_HeaderFile
-#define _SALOMEDS_ExternalFileDef_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_ExternalFileDef_HeaderFile
-#include <Handle_SALOMEDS_ExternalFileDef.hxx>
-#endif
-
-#ifndef _TDataStd_Comment_HeaderFile
-#include <TDataStd_Comment.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_ExternalFileDef : public TDataStd_Comment {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_ExternalFileDef Set(const TDF_Label& label,const TCollection_ExtendedString& Name) ;
-Standard_EXPORT SALOMEDS_ExternalFileDef();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_ExternalFileDef();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_ExternalFileDef_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// File generated by CPPExt (Transient)
-// Copyright (C) 1991,1995 by
-//
-// MATRA DATAVISION, FRANCE
-//
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
-#include <SALOMEDS_ExternalFileDef.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_ExternalFileDef::~SALOMEDS_ExternalFileDef() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_ExternalFileDef_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Comment);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Comment);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_ExternalFileDef",
- sizeof(SALOMEDS_ExternalFileDef),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_ExternalFileDef) Handle(SALOMEDS_ExternalFileDef)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_ExternalFileDef) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_ExternalFileDef))) {
- _anOtherObject = Handle(SALOMEDS_ExternalFileDef)((Handle(SALOMEDS_ExternalFileDef)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_ExternalFileDef::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_ExternalFileDef) ;
-}
-Standard_Boolean SALOMEDS_ExternalFileDef::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_ExternalFileDef) == AType || TDataStd_Comment::IsKind(AType));
-}
-Handle_SALOMEDS_ExternalFileDef::~Handle_SALOMEDS_ExternalFileDef() {}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_ExternalFileDef_HeaderFile
-#include <SALOMEDS_ExternalFileDef.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_FileType.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class FileType from SALOMEDS inherits Comment from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF;
- Name : ExtendedString from TCollection)
- returns FileType from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable FileType from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end FileType;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_FileType.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_FileType.ixx"
-#include <TDataStd_Comment.hxx>
-#include <TCollection_ExtendedString.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_FileType::GetID ()
-{
- static Standard_GUID SALOMEDS_FileTypeID ("0181B525-3F15-4ab2-9DE3-5E2F54B5F340");
- return SALOMEDS_FileTypeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_FileType) SALOMEDS_FileType::Set (const TDF_Label& L,
- const TCollection_ExtendedString& S)
-{
-
- Handle(SALOMEDS_FileType) A;
- if (!L.FindAttribute(SALOMEDS_FileType::GetID(),A)) {
- A = new SALOMEDS_FileType();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Comment)::DownCast(A))->Set (S);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_FileType::SALOMEDS_FileType()
-{}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_FileType::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_FileType::NewEmpty () const
-{
- return new SALOMEDS_FileType();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_FileType::Restore(const Handle(TDF_Attribute)& with)
-{
- TCollection_ExtendedString s = Handle(TDataStd_Comment)::DownCast (with)->Get ();
- TDataStd_Comment::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_FileType::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Comment)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// File generated by CPPExt (Transient)
-//
-// Copyright (C) 1991,1995 by
-//
-// MATRA DATAVISION, FRANCE
-//
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
-#ifndef _SALOMEDS_FileType_HeaderFile
-#define _SALOMEDS_FileType_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_FileType_HeaderFile
-#include <Handle_SALOMEDS_FileType.hxx>
-#endif
-
-#ifndef _TDataStd_Comment_HeaderFile
-#include <TDataStd_Comment.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_FileType : public TDataStd_Comment {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_FileType Set(const TDF_Label& label,const TCollection_ExtendedString& Name) ;
-Standard_EXPORT SALOMEDS_FileType();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_FileType();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_FileType_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// File generated by CPPExt (Transient)
-// Copyright (C) 1991,1995 by
-//
-// MATRA DATAVISION, FRANCE
-//
-// This software is furnished in accordance with the terms and conditions
-// of the contract and with the inclusion of the above copyright notice.
-// This software or any other copy thereof may not be provided or otherwise
-// be made available to any other person. No title to an ownership of the
-// software is hereby transferred.
-//
-// At the termination of the contract, the software and all copies of this
-// software must be deleted.
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#include <SALOMEDS_FileType.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_FileType::~SALOMEDS_FileType() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_FileType_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Comment);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Comment);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_FileType",
- sizeof(SALOMEDS_FileType),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_FileType) Handle(SALOMEDS_FileType)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_FileType) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_FileType))) {
- _anOtherObject = Handle(SALOMEDS_FileType)((Handle(SALOMEDS_FileType)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_FileType::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_FileType) ;
-}
-Standard_Boolean SALOMEDS_FileType::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_FileType) == AType || TDataStd_Comment::IsKind(AType));
-}
-Handle_SALOMEDS_FileType::~Handle_SALOMEDS_FileType() {}
-
+++ /dev/null
-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_FileType_HeaderFile
-#include <SALOMEDS_FileType.hxx>
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_FlagsAttribute.cxx
-// Author : Sergey LITONIN
-// Module : SALOME
-
-#include "SALOMEDS_FlagsAttribute.hxx"
-#include <TDataStd_Integer.hxx>
-#include <Standard_GUID.hxx>
-#include <TDF_Label.hxx>
-
-using namespace std;
-
-
-/*
- Class : SALOMEDS_FlagsAttribute
- Description : This class is intended for storing different object attributes that
- have only two states (0 and 1).
-*/
-
-IMPLEMENT_STANDARD_HANDLE( SALOMEDS_FlagsAttribute, TDataStd_Integer )
-IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_FlagsAttribute, TDataStd_Integer )
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::GetID
-//purpose : Get GUID of this attribute
-//=======================================================================
-const Standard_GUID& SALOMEDS_FlagsAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_FlagsAttributeID( "866EEC9F-A517-4cb4-88E6-E208DB8FC96F" );
- return SALOMEDS_FlagsAttributeID;
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::Set
-//purpose : Set value of the attribute
-//=======================================================================
-Handle(SALOMEDS_FlagsAttribute) SALOMEDS_FlagsAttribute::Set( const TDF_Label& L,
- const Standard_Integer value )
-{
- Handle(SALOMEDS_FlagsAttribute) A;
- if ( !L.FindAttribute(SALOMEDS_FlagsAttribute::GetID(),A ) )
- {
- A = new SALOMEDS_FlagsAttribute();
- L.AddAttribute( A );
- }
-
- ( Handle(TDataStd_Integer)::DownCast( A ) )->Set( value );
- return A;
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::SALOMEDS_FlagsAttribute
-//purpose : Constructor
-//=======================================================================
-SALOMEDS_FlagsAttribute::SALOMEDS_FlagsAttribute()
-{
- TDataStd_Integer::Set( 0 );
-}
-
-SALOMEDS_FlagsAttribute::~SALOMEDS_FlagsAttribute()
-{
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::ID
-//purpose : Get GUID of this attribute
-//=======================================================================
-const Standard_GUID& SALOMEDS_FlagsAttribute::ID () const
-{
- return GetID();
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::NewEmpty
-//purpose : Create new empty attribute
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_FlagsAttribute::NewEmpty () const
-{
- return new SALOMEDS_FlagsAttribute();
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::Restore
-//purpose : Assign given value to the attribute
-//=======================================================================
-void SALOMEDS_FlagsAttribute::Restore( const Handle(TDF_Attribute)& with )
-{
- Standard_Integer s = Handle(TDataStd_Integer)::DownCast( with )->Get();
- TDataStd_Integer::Set( s );
- return;
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::Paste
-//purpose : Assign internal value to the given attribute
-//=======================================================================
-void SALOMEDS_FlagsAttribute::Paste( const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT ) const
-{
- Handle(TDataStd_Integer)::DownCast( into )->Set( Get() );
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::Set
-//purpose : Set value
-//=======================================================================
-void SALOMEDS_FlagsAttribute::Set( const Standard_Integer v )
-{
- TDataStd_Integer::Set( v );
-}
-
-//=======================================================================
-//function : SALOMEDS_FlagsAttribute::Get
-//purpose : GetValue
-//=======================================================================
-Standard_Integer SALOMEDS_FlagsAttribute::Get() const
-{
- return TDataStd_Integer::Get();
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_FlagsAttribute.hxx
-// Author : Sergey LITONIN
-// Module : SALOME
-
-#ifndef SALOMEDS_FlagsAttribute_HeaderFile
-#define SALOMEDS_FlagsAttribute_HeaderFile
-
-#include <Standard_DefineHandle.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDataStd_Integer.hxx>
-
-class Standard_GUID;
-class TDF_Label;
-class Handle(TDF_Attribute);
-class Handle(TDF_RelocationTable);
-
-
-/*
- Class : SALOMEDS_FlagsAttribute
- Description : This class is intended for storing different object attributes that
- have only two states (0 and 1).
-*/
-
-DEFINE_STANDARD_HANDLE( SALOMEDS_FlagsAttribute, TDataStd_Integer )
-
-class Standard_EXPORT SALOMEDS_FlagsAttribute : public TDataStd_Integer
-{
-public:
-
-static const Standard_GUID& GetID() ;
-static Handle(SALOMEDS_FlagsAttribute) Set( const TDF_Label&,
- const Standard_Integer );
-
- SALOMEDS_FlagsAttribute();
-virtual ~SALOMEDS_FlagsAttribute();
-
-const Standard_GUID& ID() const;
-void Restore( const Handle(TDF_Attribute)& with );
-Handle_TDF_Attribute NewEmpty() const;
-void Paste( const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT ) const;
-void Set( const Standard_Integer );
-Standard_Integer Get() const;
-
-public:
- DEFINE_STANDARD_RTTI( SALOMEDS_FlagsAttribute )
-};
-
-#endif
#include <string>
-#include <TCollection_AsciiString.hxx>
#include "SALOMEDS_GenericAttribute.hxx"
#include "SALOMEDSImpl_SObject.hxx"
using namespace std;
-SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(const Handle(SALOMEDSImpl_GenericAttribute)& theGA)
+SALOMEDS_GenericAttribute::SALOMEDS_GenericAttribute(SALOMEDSImpl_GenericAttribute* theGA)
{
_isLocal = true;
_local_impl = theGA;
std::string aType;
if (_isLocal) {
SALOMEDS::Locker lock;
- aType = _local_impl->Type().ToCString();
+ aType = _local_impl->Type();
}
else {
aType = _corba_impl->Type();
std::string aType;
if (_isLocal) {
SALOMEDS::Locker lock;
- aType = _local_impl->GetClassType().ToCString();
+ aType = _local_impl->GetClassType();
}
else {
aType = _corba_impl->GetClassType();
}
-SALOMEDS_GenericAttribute* SALOMEDS_GenericAttribute::CreateAttribute
- (const Handle(SALOMEDSImpl_GenericAttribute)& theGA)
+SALOMEDS_GenericAttribute* SALOMEDS_GenericAttribute::CreateAttribute(SALOMEDSImpl_GenericAttribute* theGA)
{
SALOMEDS::Locker lock;
SALOMEDS_GenericAttribute* aGA = NULL;
- std::string aTypeOfAttribute = theGA->GetClassType().ToCString();
- __CreateGenericClientAttributeLocal
+ if(theGA) {
+ std::string aTypeOfAttribute = theGA->GetClassType();
+ __CreateGenericClientAttributeLocal
+ }
return aGA;
}
SALOMEDS_GenericAttribute* SALOMEDS_GenericAttribute::CreateAttribute(SALOMEDS::GenericAttribute_ptr theGA)
{
SALOMEDS_GenericAttribute* aGA = NULL;
- std::string aTypeOfAttribute = theGA->GetClassType();
- __CreateGenericClientAttributeCORBA
+ if(!CORBA::is_nil(theGA)) {
+ std::string aTypeOfAttribute = theGA->GetClassType();
+ __CreateGenericClientAttributeCORBA
+ }
return aGA;
}
{
protected:
bool _isLocal;
- Handle(SALOMEDSImpl_GenericAttribute) _local_impl;
+ SALOMEDSImpl_GenericAttribute* _local_impl;
SALOMEDS::GenericAttribute_var _corba_impl;
public:
- SALOMEDS_GenericAttribute(const Handle(SALOMEDSImpl_GenericAttribute)& theGA);
+ SALOMEDS_GenericAttribute(SALOMEDSImpl_GenericAttribute* theGA);
SALOMEDS_GenericAttribute(SALOMEDS::GenericAttribute_ptr theGA);
virtual ~SALOMEDS_GenericAttribute();
std::string GetClassType();
_PTR(SObject) GetSObject();
- static SALOMEDS_GenericAttribute* CreateAttribute(const Handle(SALOMEDSImpl_GenericAttribute)& theGA);
+ static SALOMEDS_GenericAttribute* CreateAttribute(SALOMEDSImpl_GenericAttribute* theGA);
static SALOMEDS_GenericAttribute* CreateAttribute(SALOMEDS::GenericAttribute_ptr theGA);
};
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_Study.hxx"
#include "Utils_ExceptHandlers.hxx"
-#include <TCollection_AsciiString.hxx>
#include <map>
#ifdef WIN32
UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection);
-SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(const Handle(TDF_Attribute)& theImpl, CORBA::ORB_ptr theOrb)
+SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb)
{
_orb = CORBA::ORB::_duplicate(theOrb);
_impl = theImpl;
SALOMEDS::Locker lock;
Unexpect aCatch(GALockProtection);
- if (!_impl.IsNull() && _impl->IsValid() && !CORBA::is_nil(_orb)) {
+ if (_impl && !CORBA::is_nil(_orb)) {
try {
SALOMEDSImpl_GenericAttribute::Impl_CheckLocked(_impl);
}
SALOMEDS::SObject_ptr SALOMEDS_GenericAttribute_i::GetSObject()
{
SALOMEDS::Locker lock;
- if (_impl.IsNull() || _impl->Label().IsNull()) return SALOMEDS::SObject::_nil();
- Handle(SALOMEDSImpl_SObject) so_impl = SALOMEDSImpl_Study::SObject(_impl->Label());
+ if (!_impl || _impl->Label().IsNull()) return SALOMEDS::SObject::_nil();
+ SALOMEDSImpl_SObject so_impl = SALOMEDSImpl_Study::SObject(_impl->Label());
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (so_impl, _orb);
return so._retn();
}
char* SALOMEDS_GenericAttribute_i::Type()
{
SALOMEDS::Locker lock;
- if (!_impl.IsNull()) {
+ if (_impl) {
return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetType(_impl));
}
char* SALOMEDS_GenericAttribute_i::GetClassType()
{
SALOMEDS::Locker lock;
- if (!_impl.IsNull()) {
+ if (_impl) {
return CORBA::string_dup(SALOMEDSImpl_GenericAttribute::Impl_GetClassType(_impl));
}
SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute
- (const Handle(TDF_Attribute)& theAttr,
- CORBA::ORB_ptr theOrb)
+ (DF_Attribute* theAttr,
+ CORBA::ORB_ptr theOrb)
{
SALOMEDS::Locker lock;
-/*
- static std::map<TDF_Attribute*, SALOMEDS_GenericAttribute_i*> _mapOfAttrib;
- SALOMEDS::GenericAttribute_var anAttribute;
- SALOMEDS_GenericAttribute_i* attr_servant = NULL;
-
- if(_mapOfAttrib.find(theAttr.operator->()) != _mapOfAttrib.end()) {
- attr_servant = _mapOfAttrib[theAttr.operator->()];
- anAttribute = SALOMEDS::GenericAttribute::_narrow(attr_servant->_this());
- }
- else {
- char* aTypeOfAttribute = Handle(SALOMEDSImpl_GenericAttribute)::DownCast(theAttr)->GetClassType().ToCString();
- __CreateGenericCORBAAttribute
- _mapOfAttrib[theAttr.operator->()] = attr_servant;
- }
-*/
- // mpv: now servants Destroyed by common algos of CORBA
- TCollection_AsciiString aClassType = Handle(SALOMEDSImpl_GenericAttribute)::
- DownCast(theAttr)->GetClassType();
- char* aTypeOfAttribute = aClassType.ToCString();
+ string aClassType = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(theAttr)->GetClassType();
+ char* aTypeOfAttribute = (char*)aClassType.c_str();
SALOMEDS::GenericAttribute_var anAttribute;
SALOMEDS_GenericAttribute_i* attr_servant = NULL;
__CreateGenericCORBAAttribute
long pid = (long)getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
- TDF_Attribute* local_impl = _impl.operator->();
- return ((CORBA::LongLong)local_impl);
+ return ((CORBA::LongLong)_impl);
}
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
#include <SALOME_GenericObj_i.hh>
-#include <TDF_Attribute.hxx>
+#include "DF_Attribute.hxx"
#include "SALOMEDS_SObject_i.hxx"
#include "SALOMEDSImpl_GenericAttribute.hxx"
{
protected:
- Handle(TDF_Attribute) _impl;
- CORBA::ORB_ptr _orb;
+ DF_Attribute* _impl;
+ CORBA::ORB_ptr _orb;
public:
- SALOMEDS_GenericAttribute_i(const Handle(TDF_Attribute)& theImpl, CORBA::ORB_ptr theOrb);
+ SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb);
virtual ~SALOMEDS_GenericAttribute_i() {};
void CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection);
SALOMEDS::SObject_ptr GetSObject();
- virtual Handle(TDF_Attribute) GetImpl() { return _impl; }
+ virtual DF_Attribute* GetImpl() { return _impl; }
- static SALOMEDS::GenericAttribute_ptr CreateAttribute(const Handle(TDF_Attribute)& theAttr, CORBA::ORB_ptr theOrb);
+ static SALOMEDS::GenericAttribute_ptr CreateAttribute(DF_Attribute* theAttr, CORBA::ORB_ptr theOrb);
virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_GraphicAttribute.cxx
-// Author : Sergey LITONIN
-// Module : SALOME
-
-#include "SALOMEDS_GraphicAttribute.hxx"
-#include <TDF_Attribute.hxx>
-#include <Standard_GUID.hxx>
-#include <TDF_Label.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
-
-/*
- Class : SALOMEDS_GraphicAttribute
- Description : This class is intended for storing information about
- graphic representation of objects in dirrent views
-*/
-
-IMPLEMENT_STANDARD_HANDLE( SALOMEDS_GraphicAttribute, TDF_Attribute )
-IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_GraphicAttribute, TDF_Attribute )
-
-//=======================================================================
-//function : GetID
-//purpose : Get GUID of this attribute
-//=======================================================================
-const Standard_GUID& SALOMEDS_GraphicAttribute::GetID()
-{
- static Standard_GUID SALOMEDS_GraphicAttributeID( "F17AE8F0-E354-4d6f-8E42-38385C36E67E" );
- return SALOMEDS_GraphicAttributeID;
-}
-
-//=======================================================================
-//function : SALOMEDS_GraphicAttribute
-//purpose : Empty Constructor
-//=======================================================================
-SALOMEDS_GraphicAttribute::SALOMEDS_GraphicAttribute()
-{
-}
-
-//=======================================================================
-//function : ~SALOMEDS_GraphicAttribute
-//purpose : Destructor
-//=======================================================================
-SALOMEDS_GraphicAttribute::~SALOMEDS_GraphicAttribute()
-{
-}
-
-//=======================================================================
-//function : SetVisibility
-//purpose : Set visibility of object in given view
-//=======================================================================
-void SALOMEDS_GraphicAttribute::SetVisibility( const Standard_Integer theViewId,
- const Standard_Boolean theValue )
-{
- if ( myVisibility.IsBound( theViewId ) && myVisibility( theViewId ) == theValue )
- return;
-
- Backup();
- if ( myVisibility.IsBound( theViewId ) )
- myVisibility.ChangeFind( theViewId ) = theValue ? 1 : 0;
- else
- myVisibility.Bind( theViewId, theValue ? 1 : 0 );
-}
-
-
-//=======================================================================
-//function : Get
-//purpose : Get visibility of object in given view
-//=======================================================================
-Standard_Boolean SALOMEDS_GraphicAttribute::GetVisibility(
- const Standard_Integer theViewId ) const
-{
- return myVisibility.IsBound( theViewId ) ? myVisibility( theViewId ) : false;
-}
-
-
-//=======================================================================
-//function : ID
-//purpose : Get GUID of this attribute
-//=======================================================================
-const Standard_GUID& SALOMEDS_GraphicAttribute::ID () const
-{
- return GetID();
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose : Create new empty attribute
-//=======================================================================
-Handle(TDF_Attribute) SALOMEDS_GraphicAttribute::NewEmpty () const
-{
- return new SALOMEDS_GraphicAttribute ();
-}
-
-//=======================================================================
-//function : SetVisibility
-//purpose : Set visibility of object in all views
-//=======================================================================
-void SALOMEDS_GraphicAttribute::SetVisibility( const TColStd_DataMapOfIntegerInteger& theMap )
-{
- myVisibility = theMap;
-}
-
-//=======================================================================
-//function : SetVisibility
-//purpose : Get visibility of object in all views
-//=======================================================================
-const TColStd_DataMapOfIntegerInteger& SALOMEDS_GraphicAttribute::GetVisibility()
-{
- return myVisibility;
-}
-
-//=======================================================================
-//function : Restore
-//purpose : Restore value of attribute with value of theWith one
-//=======================================================================
-void SALOMEDS_GraphicAttribute::Restore( const Handle(TDF_Attribute)& theWith )
-{
- Handle(SALOMEDS_GraphicAttribute) anAttr =
- Handle(SALOMEDS_GraphicAttribute)::DownCast( theWith );
-
- if ( !anAttr.IsNull() )
- SetVisibility( anAttr->GetVisibility() );
-}
-
-//=======================================================================
-//function : Paste
-//purpose : Paste value of current attribute to the value of entry one
-//=======================================================================
-void SALOMEDS_GraphicAttribute::Paste( const Handle(TDF_Attribute)& theInto,
- const Handle(TDF_RelocationTable)& ) const
-{
- Handle(SALOMEDS_GraphicAttribute) anAttr =
- Handle(SALOMEDS_GraphicAttribute)::DownCast( theInto );
-
- if ( !anAttr.IsNull() )
- anAttr->SetVisibility( myVisibility );
-}
-
-//=======================================================================
-//function : Dump
-//purpose : Dump
-//=======================================================================
-Standard_OStream& SALOMEDS_GraphicAttribute::Dump( Standard_OStream& anOS ) const
-{
- anOS << "Visibility of object:" << endl;
- TColStd_DataMapIteratorOfDataMapOfIntegerInteger anIter( myVisibility );
- for ( ; anIter.More(); anIter.Next() )
- {
- char str[ 100 ];
-
- if ( GetVisibility( anIter.Key() ) )
- sprintf( str, "Viewer ID = 0x%X State = VISIBLE\n", anIter.Key() );
- else
- sprintf( str, "Viewer ID = 0x%X State = INVISIBLE\n", anIter.Key() );
-
- anOS << str;
- }
-
- anOS << "Integer";
- return anOS;
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_GraphicAttribute.hxx
-// Author : Sergey LITONIN
-// Module : SALOME
-
-#ifndef SALOMEDS_GraphicAttribute_HeaderFile
-#define SALOMEDS_GraphicAttribute_HeaderFile
-
-#include <Standard_DefineHandle.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDF_Attribute.hxx>
-#include <TColStd_DataMapOfIntegerInteger.hxx>
-
-class Standard_GUID;
-class TDF_Label;
-class Handle(TDF_Attribute);
-class Handle(TDF_RelocationTable);
-
-
-/*
- Class : SALOMEDS_GraphicAttribute
- Description : This class is intended for storing information about
- graphic representation of objects in dirrent views
-*/
-
-DEFINE_STANDARD_HANDLE( SALOMEDS_GraphicAttribute, TDF_Attribute )
-
-class Standard_EXPORT SALOMEDS_GraphicAttribute : public TDF_Attribute
-{
-
-public:
- SALOMEDS_GraphicAttribute();
- ~SALOMEDS_GraphicAttribute();
-
- static const Standard_GUID& GetID() ;
-
- void SetVisibility( const Standard_Integer,
- const Standard_Boolean );
- Standard_Boolean GetVisibility( const Standard_Integer ) const;
- const Standard_GUID& ID() const;
- void Restore( const Handle(TDF_Attribute)& theWith );
- Handle(TDF_Attribute) NewEmpty() const;
- void Paste( const Handle(TDF_Attribute)& theInto,
- const Handle(TDF_RelocationTable)& ) const;
- virtual Standard_OStream& Dump( Standard_OStream& anOS ) const;
-
- void SetVisibility( const TColStd_DataMapOfIntegerInteger& );
-
- const TColStd_DataMapOfIntegerInteger& GetVisibility();
-
-private:
- TColStd_DataMapOfIntegerInteger myVisibility;
-
-public:
- DEFINE_STANDARD_RTTI( SALOMEDS_GraphicAttribute )
-};
-
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_IORAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class IORAttribute from SALOMEDS inherits Comment from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; string : ExtendedString from TCollection)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns IORAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable IORAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end IORAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_IORAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include <TDataStd_Comment.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-#include "SALOMEDS_IORAttribute.ixx"
-#include "SALOMEDS_Study_i.hxx"
-
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_IORAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_IORAttributeID ("92888E01-7074-11d5-A690-0800369C8A03");
- return SALOMEDS_IORAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_IORAttribute) SALOMEDS_IORAttribute::Set (const TDF_Label& L,
- const TCollection_ExtendedString& S,
- SALOMEDS_Study_i* theStudy)
-{
- Handle(SALOMEDS_IORAttribute) A;
- if (!L.FindAttribute(SALOMEDS_IORAttribute::GetID(),A)) {
- A = new SALOMEDS_IORAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Comment)::DownCast(A))->Set (S);
- theStudy->IORUpdated(A);
- return A;
-}
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_IORAttribute::SALOMEDS_IORAttribute()
-{}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_IORAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_IORAttribute::NewEmpty () const
-{
- return new SALOMEDS_IORAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_IORAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- TCollection_ExtendedString s = Handle(TDataStd_Comment)::DownCast (with)->Get ();
- TDataStd_Comment::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_IORAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Comment)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_IORAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_IORAttribute_HeaderFile
-#define _SALOMEDS_IORAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_IORAttribute_HeaderFile
-#include "Handle_SALOMEDS_IORAttribute.hxx"
-#endif
-
-#ifndef _TDataStd_Comment_HeaderFile
-#include <TDataStd_Comment.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOMEDS)
-
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-class SALOMEDS_Study_i;
-
-class SALOMEDS_IORAttribute : public TDataStd_Comment {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_IORAttribute Set(const TDF_Label& label,
- const TCollection_ExtendedString& string,
- SALOMEDS_Study_i* theStudy) ;
-Standard_EXPORT SALOMEDS_IORAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_IORAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_IORAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_IORAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_IORAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_IORAttribute::~SALOMEDS_IORAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_IORAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Comment);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Comment);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_IORAttribute",
- sizeof(SALOMEDS_IORAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_IORAttribute) Handle(SALOMEDS_IORAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_IORAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_IORAttribute))) {
- _anOtherObject = Handle(SALOMEDS_IORAttribute)((Handle(SALOMEDS_IORAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_IORAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_IORAttribute) ;
-}
-Standard_Boolean SALOMEDS_IORAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_IORAttribute) == AType || TDataStd_Comment::IsKind(AType));
-}
-Handle_SALOMEDS_IORAttribute::~Handle_SALOMEDS_IORAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_IORAttribute.jxx
-// Module : SALOME
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_IORAttribute_HeaderFile
-#include "SALOMEDS_IORAttribute.hxx"
-#endif
#include "SALOMEDS_IParameters.hxx"
#include <utilities.h>
-#include <TCollection_AsciiString.hxx>
-
using namespace std;
#define PT_INTEGER 0
vector<string> SALOMEDS_IParameters::parseValue(const string& value, const char separator, bool fromEnd)
{
- TCollection_AsciiString val((char*)value.c_str());
+ string val(value);
vector<string> v;
int pos;
- if(fromEnd) pos = val.SearchFromEnd(separator);
- else pos = val.Search(separator);
+ if(fromEnd) pos = val.rfind(separator);
+ else pos = val.find(separator);
if(pos < 0) {
v.push_back(value);
return v;
}
- TCollection_AsciiString part1, part2;
- part1 = val.SubString(1, pos-1);
- part2 = val.SubString(pos+1, val.Length());
- v.push_back(part1.ToCString());
- v.push_back(part2.ToCString());
+ string part1, part2;
+ part1 = val.substr(0, pos);
+ part2 = val.substr(pos+1, val.size());
+ v.push_back(part1);
+ v.push_back(part2);
return v;
}
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_LocalIDAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class LocalIDAttribute from SALOMEDS inherits Integer from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; value : Integer from Standard)
- returns OpenedAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable OpenedAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end LocalIDAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_LocalIDAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_LocalIDAttribute.ixx"
-#include <TDataStd_Integer.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_LocalIDAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_OpenedAttributeID ("12837196-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_OpenedAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_LocalIDAttribute) SALOMEDS_LocalIDAttribute::Set (const TDF_Label& L,
- const Standard_Integer value)
-{
- Handle(SALOMEDS_LocalIDAttribute) A;
- if (!L.FindAttribute(SALOMEDS_LocalIDAttribute::GetID(),A)) {
- A = new SALOMEDS_LocalIDAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Integer)::DownCast(A))->Set (value);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_LocalIDAttribute::SALOMEDS_LocalIDAttribute()
-{
- TDataStd_Integer::Set(0);
-}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_LocalIDAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_LocalIDAttribute::NewEmpty () const
-{
- return new SALOMEDS_LocalIDAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_LocalIDAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer s = Handle(TDataStd_Integer)::DownCast (with)->Get ();
- TDataStd_Integer::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_LocalIDAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Integer)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_LocalIDAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_LocalIDAttribute_HeaderFile
-#define _SALOMEDS_LocalIDAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_LocalIDAttribute_HeaderFile
-#include <Handle_SALOMEDS_LocalIDAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_Integer_HeaderFile
-#include <TDataStd_Integer.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_LocalIDAttribute : public TDataStd_Integer {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_LocalIDAttribute Set(const TDF_Label& label,const Standard_Integer value) ;
-Standard_EXPORT SALOMEDS_LocalIDAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_LocalIDAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_LocalIDAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_LocalIDAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_LocalIDAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_LocalIDAttribute::~SALOMEDS_LocalIDAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_LocalIDAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Integer);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Integer);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_LocalIDAttribute",
- sizeof(SALOMEDS_LocalIDAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_LocalIDAttribute) Handle(SALOMEDS_LocalIDAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_LocalIDAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_LocalIDAttribute))) {
- _anOtherObject = Handle(SALOMEDS_LocalIDAttribute)((Handle(SALOMEDS_LocalIDAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_LocalIDAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_LocalIDAttribute) ;
-}
-Standard_Boolean SALOMEDS_LocalIDAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_LocalIDAttribute) == AType || TDataStd_Integer::IsKind(AType));
-}
-Handle_SALOMEDS_LocalIDAttribute::~Handle_SALOMEDS_LocalIDAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_LocalIDAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_LocalIDAttribute_HeaderFile
-#include "SALOMEDS_LocalIDAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_OCAFApplication.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class OCAFApplication from SALOMEDS inherits Application from TDocStd
-
- ---Purpose:
-
-uses
- Label from TDF,
- SequenceOfExtendedString from TColStd,
- CString from Standard,
- Document from TDocStd
-
-
-is
-
- Create
- returns mutable OCAFApplication from SALOMEDS;
-
- Formats(me: mutable; Formats: out SequenceOfExtendedString from TColStd)
- is redefined;
-
- ResourcesName (me: mutable) returns CString from Standard;
-
-end OCAFApplication;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OCAFApplication.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_OCAFApplication.ixx"
-using namespace std;
-
-//=======================================================================
-//function : SALOMEDS_OCAFApplication
-//purpose :
-//=======================================================================
-
-SALOMEDS_OCAFApplication::SALOMEDS_OCAFApplication()
-{
-}
-
-
-//=======================================================================
-//function : Formats
-//purpose :
-//=======================================================================
-
-void SALOMEDS_OCAFApplication::Formats(TColStd_SequenceOfExtendedString& Formats)
-{
- Formats.Append(TCollection_ExtendedString ("SALOME_STUDY"));
-}
-
-
-//=======================================================================
-//function : ResourcesName
-//purpose :
-//=======================================================================
-
-Standard_CString SALOMEDS_OCAFApplication::ResourcesName()
-{
- return Standard_CString ("SALOMEDS_Resources");
-}
-
-
-
-
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OCAFApplication.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_OCAFApplication_HeaderFile
-#define _SALOMEDS_OCAFApplication_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_OCAFApplication_HeaderFile
-#include "Handle_SALOMEDS_OCAFApplication.hxx"
-#endif
-
-#ifndef _TDocStd_Application_HeaderFile
-#include <TDocStd_Application.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-class TColStd_SequenceOfExtendedString;
-
-
-class SALOMEDS_OCAFApplication : public TDocStd_Application {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT SALOMEDS_OCAFApplication();
-Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats) ;
-Standard_EXPORT Standard_CString ResourcesName() ;
-Standard_EXPORT ~SALOMEDS_OCAFApplication();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_OCAFApplication_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OCAFApplication.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_OCAFApplication.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_OCAFApplication::~SALOMEDS_OCAFApplication() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_OCAFApplication_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDocStd_Application);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDocStd_Application);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(CDF_Application);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(CDF_Application);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(CDM_Application);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(CDM_Application);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_OCAFApplication",
- sizeof(SALOMEDS_OCAFApplication),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_OCAFApplication) Handle(SALOMEDS_OCAFApplication)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_OCAFApplication) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_OCAFApplication))) {
- _anOtherObject = Handle(SALOMEDS_OCAFApplication)((Handle(SALOMEDS_OCAFApplication)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_OCAFApplication::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_OCAFApplication) ;
-}
-Standard_Boolean SALOMEDS_OCAFApplication::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_OCAFApplication) == AType || TDocStd_Application::IsKind(AType));
-}
-Handle_SALOMEDS_OCAFApplication::~Handle_SALOMEDS_OCAFApplication() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OCAFApplication.jxx
-// Module : SALOME
-
-#ifndef _TColStd_SequenceOfExtendedString_HeaderFile
-#include <TColStd_SequenceOfExtendedString.hxx>
-#endif
-#ifndef _SALOMEDS_OCAFApplication_HeaderFile
-#include "SALOMEDS_OCAFApplication.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_OpenedAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class OpenedAttribute from SALOMEDS inherits Integer from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; value : Integer from Standard)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns OpenedAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable OpenedAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end OpenedAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OpenedAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_OpenedAttribute.ixx"
-#include <TDataStd_Integer.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_OpenedAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_OpenedAttributeID ("12837186-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_OpenedAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_OpenedAttribute) SALOMEDS_OpenedAttribute::Set (const TDF_Label& L,
- const Standard_Integer value)
-{
- Handle(SALOMEDS_OpenedAttribute) A;
- if (!L.FindAttribute(SALOMEDS_OpenedAttribute::GetID(),A)) {
- A = new SALOMEDS_OpenedAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Integer)::DownCast(A))->Set (value);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_OpenedAttribute::SALOMEDS_OpenedAttribute()
-{
- TDataStd_Integer::Set(0);
-}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_OpenedAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_OpenedAttribute::NewEmpty () const
-{
- return new SALOMEDS_OpenedAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_OpenedAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer s = Handle(TDataStd_Integer)::DownCast (with)->Get ();
- TDataStd_Integer::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_OpenedAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Integer)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OpenedAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_OpenedAttribute_HeaderFile
-#define _SALOMEDS_OpenedAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_OpenedAttribute_HeaderFile
-#include <Handle_SALOMEDS_OpenedAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_Integer_HeaderFile
-#include <TDataStd_Integer.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_OpenedAttribute : public TDataStd_Integer {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_OpenedAttribute Set(const TDF_Label& label,const Standard_Integer value) ;
-Standard_EXPORT SALOMEDS_OpenedAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_OpenedAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_OpenedAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OpenedAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_OpenedAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_OpenedAttribute::~SALOMEDS_OpenedAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_OpenedAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Integer);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Integer);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_OpenedAttribute",
- sizeof(SALOMEDS_OpenedAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_OpenedAttribute) Handle(SALOMEDS_OpenedAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_OpenedAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_OpenedAttribute))) {
- _anOtherObject = Handle(SALOMEDS_OpenedAttribute)((Handle(SALOMEDS_OpenedAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_OpenedAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_OpenedAttribute) ;
-}
-Standard_Boolean SALOMEDS_OpenedAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_OpenedAttribute) == AType || TDataStd_Integer::IsKind(AType));
-}
-Handle_SALOMEDS_OpenedAttribute::~Handle_SALOMEDS_OpenedAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_OpenedAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_OpenedAttribute_HeaderFile
-#include "SALOMEDS_OpenedAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_PersRefAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class PersRefAttribute from SALOMEDS inherits Comment from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; string : ExtendedString from TCollection)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns PersRefAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable PersRefAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end PersRefAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PersRefAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_PersRefAttribute.ixx"
-#include <TDataStd_Comment.hxx>
-#include <TCollection_ExtendedString.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_PersRefAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_PersRefAttributeID ("92888E06-7074-11d5-A690-0800369C8A03");
- return SALOMEDS_PersRefAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_PersRefAttribute) SALOMEDS_PersRefAttribute::Set (const TDF_Label& L,
- const TCollection_ExtendedString& S)
-{
- Handle(SALOMEDS_PersRefAttribute) A;
- if (!L.FindAttribute(SALOMEDS_PersRefAttribute::GetID(),A)) {
- A = new SALOMEDS_PersRefAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Comment)::DownCast(A))->Set (S);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_PersRefAttribute::SALOMEDS_PersRefAttribute()
-{}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_PersRefAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_PersRefAttribute::NewEmpty () const
-{
- return new SALOMEDS_PersRefAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_PersRefAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- TCollection_ExtendedString s = Handle(TDataStd_Comment)::DownCast (with)->Get ();
- TDataStd_Comment::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_PersRefAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Comment)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PersRefAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_PersRefAttribute_HeaderFile
-#define _SALOMEDS_PersRefAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_PersRefAttribute_HeaderFile
-#include <Handle_SALOMEDS_PersRefAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_Comment_HeaderFile
-#include <TDataStd_Comment.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_PersRefAttribute : public TDataStd_Comment {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_PersRefAttribute Set(const TDF_Label& label,const TCollection_ExtendedString& string) ;
-Standard_EXPORT SALOMEDS_PersRefAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_PersRefAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_PersRefAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PersRefAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_PersRefAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_PersRefAttribute::~SALOMEDS_PersRefAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_PersRefAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Comment);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Comment);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_PersRefAttribute",
- sizeof(SALOMEDS_PersRefAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_PersRefAttribute) Handle(SALOMEDS_PersRefAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_PersRefAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_PersRefAttribute))) {
- _anOtherObject = Handle(SALOMEDS_PersRefAttribute)((Handle(SALOMEDS_PersRefAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_PersRefAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_PersRefAttribute) ;
-}
-Standard_Boolean SALOMEDS_PersRefAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_PersRefAttribute) == AType || TDataStd_Comment::IsKind(AType));
-}
-Handle_SALOMEDS_PersRefAttribute::~Handle_SALOMEDS_PersRefAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PersRefAttribute.jxx
-// Module : SALOME
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_PersRefAttribute_HeaderFile
-#include "SALOMEDS_PersRefAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_PixMapAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class PixMapAttribute from SALOMEDS inherits Comment from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; string : ExtendedString from TCollection)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns PixMapAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable PixMapAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end PixMapAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PixMapAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_PixMapAttribute.ixx"
-#include <TDataStd_Comment.hxx>
-#include <TCollection_ExtendedString.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_PixMapAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_PixMapAttributeID ("12837187-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_PixMapAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_PixMapAttribute) SALOMEDS_PixMapAttribute::Set (const TDF_Label& L,
- const TCollection_ExtendedString& S)
-{
- Handle(SALOMEDS_PixMapAttribute) A;
- if (!L.FindAttribute(SALOMEDS_PixMapAttribute::GetID(),A)) {
- A = new SALOMEDS_PixMapAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Comment)::DownCast(A))->Set (S);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_PixMapAttribute::SALOMEDS_PixMapAttribute()
-{TDataStd_Comment::Set("None");}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_PixMapAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_PixMapAttribute::NewEmpty () const
-{
- return new SALOMEDS_PixMapAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_PixMapAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- TCollection_ExtendedString s = Handle(TDataStd_Comment)::DownCast (with)->Get ();
- TDataStd_Comment::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_PixMapAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Comment)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PixMapAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_PixMapAttribute_HeaderFile
-#define _SALOMEDS_PixMapAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_PixMapAttribute_HeaderFile
-#include <Handle_SALOMEDS_PixMapAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_Comment_HeaderFile
-#include <TDataStd_Comment.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_PixMapAttribute : public TDataStd_Comment {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_PixMapAttribute Set(const TDF_Label& label,const TCollection_ExtendedString& string) ;
-Standard_EXPORT SALOMEDS_PixMapAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_PixMapAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_PixMapAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PixMapAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_PixMapAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_PixMapAttribute::~SALOMEDS_PixMapAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_PixMapAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Comment);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Comment);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_PixMapAttribute",
- sizeof(SALOMEDS_PixMapAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_PixMapAttribute) Handle(SALOMEDS_PixMapAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_PixMapAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_PixMapAttribute))) {
- _anOtherObject = Handle(SALOMEDS_PixMapAttribute)((Handle(SALOMEDS_PixMapAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_PixMapAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_PixMapAttribute) ;
-}
-Standard_Boolean SALOMEDS_PixMapAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_PixMapAttribute) == AType || TDataStd_Comment::IsKind(AType));
-}
-Handle_SALOMEDS_PixMapAttribute::~Handle_SALOMEDS_PixMapAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_PixMapAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_PixMapAttribute_HeaderFile
-#include "SALOMEDS_PixMapAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
---
--- File : SALOMEDS_PythonObjectAttribute.cdl
--- Author : Michael Ponikarov
--- Module : SALOME
-
-class PythonObjectAttribute from SALOMEDS inherits Attribute from TDF
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- DataSet from TDF,
- RelocationTable from TDF,
- Data from TDF,
- HArray1OfCharacter from TColStd
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF)
- returns PythonObjectAttribute from SALOMEDS;
-
- ---Purpose: Common methods
- -- ============
-
- Create
- returns mutable PythonObjectAttribute from SALOMEDS;
-
- SetObject(me: mutable; theSequence : CString from Standard; theScript : Boolean from Standard);
-
- GetObject(me) returns CString from Standard;
-
- IsScript(me) returns Boolean from Standard;
-
- GetLength(me) returns Integer from Standard;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-fields
-
- mySequence : CString from Standard;
- myIsScript : Boolean from Standard;
-
-end PythonObjectAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_PythonObjectAttribute.cxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_PythonObjectAttribute.ixx"
-#include <string>
-using namespace std;
-
-const Standard_GUID& SALOMEDS_PythonObjectAttribute::GetID()
-{
- static Standard_GUID SALOMEDS_PythonObjectAttributeID ("128371A3-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_PythonObjectAttributeID;
-}
-
-Handle(SALOMEDS_PythonObjectAttribute) SALOMEDS_PythonObjectAttribute::Set(const TDF_Label& label)
-{
- Handle(SALOMEDS_PythonObjectAttribute) anAttr;
- if (!label.FindAttribute(SALOMEDS_PythonObjectAttribute::GetID(),anAttr)) {
- anAttr = new SALOMEDS_PythonObjectAttribute();
- label.AddAttribute(anAttr);
- }
- return anAttr;
-}
-
-SALOMEDS_PythonObjectAttribute::SALOMEDS_PythonObjectAttribute()
-{
-}
-
-void SALOMEDS_PythonObjectAttribute::SetObject(const Standard_CString theSequence,
- const Standard_Boolean theScript)
-{
- Backup();
- if(mySequence != NULL) delete mySequence;
- if (theSequence == NULL) {
- mySequence = NULL;
- } else {
- mySequence = new char[strlen(theSequence)+1];
- strcpy(mySequence, theSequence);
- }
-
- myIsScript = theScript;
-}
-
-Standard_CString SALOMEDS_PythonObjectAttribute::GetObject() const
-{
- return mySequence;
-}
-
-Standard_Boolean SALOMEDS_PythonObjectAttribute::IsScript() const
-{
- return myIsScript;
-}
-
-Standard_Integer SALOMEDS_PythonObjectAttribute::GetLength() const
-{
- if (mySequence == NULL) return 0;
- return (strlen(mySequence)+1);
-}
-
-const Standard_GUID& SALOMEDS_PythonObjectAttribute::ID() const
-{
- return GetID();
-}
-
-void SALOMEDS_PythonObjectAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Handle(SALOMEDS_PythonObjectAttribute) anObj = Handle(SALOMEDS_PythonObjectAttribute)::DownCast(with);
- SetObject(anObj->GetObject(),anObj->IsScript());
-}
-
-Handle(TDF_Attribute) SALOMEDS_PythonObjectAttribute::NewEmpty() const
-{
- return new SALOMEDS_PythonObjectAttribute();
-}
-
-void SALOMEDS_PythonObjectAttribute::Paste(const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)&) const
-{
- Handle(SALOMEDS_PythonObjectAttribute) anObj = Handle(SALOMEDS_PythonObjectAttribute)::DownCast(into);
- anObj->SetObject(GetObject(),IsScript());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_PythonObjectAttribute.hxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_PythonObjectAttribute_HeaderFile
-#define _SALOMEDS_PythonObjectAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_PythonObjectAttribute_HeaderFile
-#include <Handle_SALOMEDS_PythonObjectAttribute.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HArray1OfCharacter_HeaderFile
-#include <Handle_TColStd_HArray1OfCharacter.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_CString_HeaderFile
-#include <Standard_CString.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class TColStd_HArray1OfCharacter;
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_PythonObjectAttribute : public TDF_Attribute {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_PythonObjectAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_PythonObjectAttribute();
-Standard_EXPORT void SetObject(const Standard_CString theSequence,const Standard_Boolean theScript) ;
-Standard_EXPORT Standard_CString GetObject() const;
-Standard_EXPORT Standard_Boolean IsScript() const;
-Standard_EXPORT Standard_Integer GetLength() const;
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_PythonObjectAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_PythonObjectAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_CString mySequence;
-Standard_Boolean myIsScript;
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_PythonObjectAttribute.ixx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_PythonObjectAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_PythonObjectAttribute::~SALOMEDS_PythonObjectAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_PythonObjectAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_PythonObjectAttribute",
- sizeof(SALOMEDS_PythonObjectAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_PythonObjectAttribute) Handle(SALOMEDS_PythonObjectAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_PythonObjectAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_PythonObjectAttribute))) {
- _anOtherObject = Handle(SALOMEDS_PythonObjectAttribute)((Handle(SALOMEDS_PythonObjectAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_PythonObjectAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_PythonObjectAttribute) ;
-}
-Standard_Boolean SALOMEDS_PythonObjectAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_PythonObjectAttribute) == AType || TDF_Attribute::IsKind(AType));
-}
-Handle_SALOMEDS_PythonObjectAttribute::~Handle_SALOMEDS_PythonObjectAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_PythonObjectAttribute.jxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _TColStd_HArray1OfCharacter_HeaderFile
-#include <TColStd_HArray1OfCharacter.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_PythonObjectAttribute_HeaderFile
-#include "SALOMEDS_PythonObjectAttribute.hxx"
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SAttribute_i.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef __SALOMEDS_SATTRIBUTE_I_H__
-#define __SALOMEDS_SATTRIBUTE_I_H__
-
-// std C++ headers
-#include <iostream>
-
-// IDL headers
-#include <SALOMEconfig.h>
-#include CORBA_SERVER_HEADER(SALOMEDS)
-
-
-
-// Cascade headers
-#include <TDocStd_Document.hxx>
-#include <stdio.h>
-
-class SALOMEDS_SAttribute_i: public POA_IStudy::SAttribute,
- public PortableServer::ServantBase {
-private:
- CORBA::ORB_ptr _orb;
- char* _Type;
- char
-public:
-
- SALOMEDS_SAttribute_i(const Handle(TDocStd_Document), CORBA::ORB_ptr);
-
- ~SALOMEDS_SAttribute_i();
-
- virtual char* GetID() ;
- virtual SObject_ptr GetOwner();
- virtual char* GetType();
- virtual char* GetValue();
-
-};
-#endif
#include "SALOMEDS_SComponent_i.hxx"
#include <string>
-#include <TCollection_AsciiString.hxx>
using namespace std;
:SALOMEDS_SObject(theSComponent)
{}
-SALOMEDS_SComponent::SALOMEDS_SComponent(const Handle(SALOMEDSImpl_SComponent)& theSComponent)
+SALOMEDS_SComponent::SALOMEDS_SComponent(const SALOMEDSImpl_SComponent& theSComponent)
:SALOMEDS_SObject(theSComponent)
{}
std::string aType;
if (_isLocal) {
SALOMEDS::Locker lock;
- aType = (Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()))->ComponentDataType().ToCString();
+ aType = (dynamic_cast<SALOMEDSImpl_SComponent*>(GetLocalImpl()))->ComponentDataType();
}
else aType = (SALOMEDS::SComponent::_narrow(GetCORBAImpl()))->ComponentDataType();
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- TCollection_AsciiString anIOR;
- ret = (Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()))->ComponentIOR(anIOR);
- theID = anIOR.ToCString();
+ ret = (dynamic_cast<SALOMEDSImpl_SComponent*>(GetLocalImpl()))->ComponentIOR(theID);
}
else {
CORBA::String_var anIOR;
{
if(_isLocal) {
if(!CORBA::is_nil(_corba_impl)) return SALOMEDS::SComponent::_duplicate(SALOMEDS::SComponent::_narrow(GetCORBAImpl()));
- SALOMEDS::SComponent_var aSCO = SALOMEDS_SComponent_i::New(Handle(SALOMEDSImpl_SComponent)::DownCast(GetLocalImpl()), _orb);
+ SALOMEDS::SComponent_var aSCO = SALOMEDS_SComponent_i::New(*(dynamic_cast<SALOMEDSImpl_SComponent*>(GetLocalImpl())), _orb);
_corba_impl = SALOMEDS::SComponent::_duplicate(aSCO);
return aSCO._retn();
}
{
public:
- SALOMEDS_SComponent(const Handle(SALOMEDSImpl_SComponent)& theSComponent);
+ SALOMEDS_SComponent(const SALOMEDSImpl_SComponent& theSComponent);
SALOMEDS_SComponent(SALOMEDS::SComponent_ptr theSComponent);
~SALOMEDS_SComponent();
#include "SALOMEDSImpl_SComponent.hxx"
SALOMEDS_SComponentIterator::SALOMEDS_SComponentIterator(const SALOMEDSImpl_SComponentIterator& theIterator)
-:_local_impl(theIterator)
+:_local_impl(theIterator.GetPersistentCopy())
{
_isLocal = true;
_corba_impl = SALOMEDS::SComponentIterator::_nil();
SALOMEDS_SComponentIterator::~SALOMEDS_SComponentIterator()
{
if(!_isLocal) _corba_impl->Destroy();
+ else if(_local_impl) delete _local_impl;
}
void SALOMEDS_SComponentIterator::Init()
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl.Init();
+ _local_impl->Init();
}
else _corba_impl->Init();
}
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl.More();
+ ret = _local_impl->More();
}
else ret = _corba_impl->More();
return ret;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl.Next();
+ _local_impl->Next();
}
else _corba_impl->Next();
}
SALOMEDSClient_SComponent* aSCO = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- aSCO = new SALOMEDS_SComponent(_local_impl.Value());
+ aSCO = new SALOMEDS_SComponent(_local_impl->Value());
}
else aSCO = new SALOMEDS_SComponent(_corba_impl->Value());
return _PTR(SComponent)(aSCO);
private:
bool _isLocal;
- SALOMEDSImpl_SComponentIterator _local_impl;
+ SALOMEDSImpl_SComponentIterator* _local_impl;
SALOMEDS::SComponentIterator_var _corba_impl;
public:
SALOMEDS_SComponentIterator_i::SALOMEDS_SComponentIterator_i(const SALOMEDSImpl_SComponentIterator& theImpl,
CORBA::ORB_ptr orb)
-:_impl(theImpl)
{
_orb = CORBA::ORB::_duplicate(orb);
+ _impl = theImpl.GetPersistentCopy();
}
//============================================================================
//============================================================================
SALOMEDS_SComponentIterator_i::~SALOMEDS_SComponentIterator_i()
{
+ if(_impl) delete _impl;
}
//============================================================================
void SALOMEDS_SComponentIterator_i::Init()
{
SALOMEDS::Locker lock;
- _impl.Init();
+ _impl->Init();
}
//============================================================================
CORBA::Boolean SALOMEDS_SComponentIterator_i::More()
{
SALOMEDS::Locker lock;
- return _impl.More();
+ return _impl->More();
}
//============================================================================
void SALOMEDS_SComponentIterator_i::Next()
{
SALOMEDS::Locker lock;
- _impl.Next();
+ _impl->Next();
}
SALOMEDS::SComponent_ptr SALOMEDS_SComponentIterator_i::Value()
{
SALOMEDS::Locker lock;
- SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (_impl.Value(), _orb);
+ SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (_impl->Value(), _orb);
return sco._retn();
}
private:
- CORBA::ORB_ptr _orb;
- SALOMEDSImpl_SComponentIterator _impl;
+ CORBA::ORB_ptr _orb;
+ SALOMEDSImpl_SComponentIterator* _impl;
public:
using namespace std;
-SALOMEDS::SComponent_ptr SALOMEDS_SComponent_i::New(const Handle(SALOMEDSImpl_SComponent)& theImpl, CORBA::ORB_ptr theORB)
+SALOMEDS::SComponent_ptr SALOMEDS_SComponent_i::New(const SALOMEDSImpl_SComponent& theImpl, CORBA::ORB_ptr theORB)
{
-/*
- static std::map<SALOMEDSImpl_SComponent*, SALOMEDS_SComponent_i*> _mapOfSCO;
- SALOMEDS::SComponent_var sco;
- SALOMEDS_SComponent_i* sco_servant = NULL;
-
- if(_mapOfSCO.find(theImpl.operator->()) != _mapOfSCO.end()) {
- sco_servant = _mapOfSCO[theImpl.operator->()];
- }
- else {
- sco_servant = new SALOMEDS_SComponent_i(theImpl, theORB);
- _mapOfSCO[theImpl.operator->()] = sco_servant;
- }
-
- sco = SALOMEDS::SComponent::_narrow(sco_servant->SComponent::_this());
-*/
SALOMEDS_SComponent_i* sco_servant = new SALOMEDS_SComponent_i(theImpl, theORB);
SALOMEDS::SComponent_var sco = SALOMEDS::SComponent::_narrow(sco_servant->SComponent::_this());
* Purpose :
*/
//============================================================================
-SALOMEDS_SComponent_i::SALOMEDS_SComponent_i(const Handle(SALOMEDSImpl_SComponent)& theImpl, CORBA::ORB_ptr orb)
+SALOMEDS_SComponent_i::SALOMEDS_SComponent_i(const SALOMEDSImpl_SComponent& theImpl, CORBA::ORB_ptr orb)
:SALOMEDS_SObject_i(theImpl, orb)
{}
char* SALOMEDS_SComponent_i::ComponentDataType()
{
SALOMEDS::Locker lock;
- TCollection_AsciiString aType = Handle(SALOMEDSImpl_SComponent)::DownCast(_impl)->ComponentDataType();
- return CORBA::string_dup(aType.ToCString());
+ string aType = dynamic_cast<SALOMEDSImpl_SComponent*>(_impl)->ComponentDataType();
+ return CORBA::string_dup(aType.c_str());
}
CORBA::Boolean SALOMEDS_SComponent_i::ComponentIOR(CORBA::String_out IOR)
{
SALOMEDS::Locker lock;
- TCollection_AsciiString ior;
- if(!Handle(SALOMEDSImpl_SComponent)::DownCast(_impl)->ComponentIOR(ior)) {
+ string ior;
+ if(!dynamic_cast<SALOMEDSImpl_SComponent*>(_impl)->ComponentIOR(ior)) {
IOR = CORBA::string_dup("");
return false;
}
- IOR = CORBA::string_dup(ior.ToCString());
+ IOR = CORBA::string_dup(ior.c_str());
return true;
}
public:
- static SALOMEDS::SComponent_ptr New(const Handle(SALOMEDSImpl_SComponent)&, CORBA::ORB_ptr);
+ static SALOMEDS::SComponent_ptr New(const SALOMEDSImpl_SComponent&, CORBA::ORB_ptr);
- SALOMEDS_SComponent_i(const Handle(SALOMEDSImpl_SComponent)&, CORBA::ORB_ptr);
+ SALOMEDS_SComponent_i(const SALOMEDSImpl_SComponent&, CORBA::ORB_ptr);
virtual ~SALOMEDS_SComponent_i();
// Module : SALOME
#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
#include "SALOMEDS_SObject.hxx"
init_orb();
}
-SALOMEDS_SObject::SALOMEDS_SObject(const Handle(SALOMEDSImpl_SObject)& theSObject)
+SALOMEDS_SObject::SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject)
:_isLocal(true)
{
_corba_impl = SALOMEDS::SObject::_nil();
- _local_impl = theSObject;
+
+ if(theSObject.IsComponent()) {
+ SALOMEDSImpl_SComponent sco = theSObject;
+ _local_impl = sco.GetPersistentCopy();
+ }
+ else {
+ _local_impl = theSObject.GetPersistentCopy();
+ }
init_orb();
}
if (!_isLocal) {
_corba_impl->Destroy();
}
+ else {
+ if(_local_impl) delete _local_impl;
+ }
}
std::string SALOMEDS_SObject::GetID()
std::string aValue;
if (_isLocal) {
SALOMEDS::Locker lock;
- aValue = _local_impl->GetID().ToCString();
+ aValue = _local_impl->GetID();
}
else aValue = _corba_impl->GetID();
return aValue;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SComponent) aSCO =
- Handle(SALOMEDSImpl_SComponent)::DownCast(_local_impl->GetFatherComponent());
- return _PTR(SComponent)(new SALOMEDS_SComponent(aSCO));
+ return _PTR(SComponent)(new SALOMEDS_SComponent(_local_impl->GetFatherComponent()));
}
return _PTR(SComponent)(new SALOMEDS_SComponent(_corba_impl->GetFatherComponent()));
}
bool ret = false;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_GenericAttribute) anAttr;
- ret = _local_impl->FindAttribute(anAttr, (char*)aTypeOfAttribute.c_str());
- if(ret) anAttribute = _PTR(GenericAttribute)(SALOMEDS_GenericAttribute::CreateAttribute(anAttr));
+ DF_Attribute* anAttr = NULL;
+ ret = _local_impl->FindAttribute(anAttr, aTypeOfAttribute);
+ if(ret) {
+ SALOMEDSImpl_GenericAttribute* ga = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(anAttr);
+ anAttribute = _PTR(GenericAttribute)(SALOMEDS_GenericAttribute::CreateAttribute(ga));
+ }
}
else {
SALOMEDS::GenericAttribute_var anAttr;
bool ret = false;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO;
+ SALOMEDSImpl_SObject aSO;
ret = _local_impl->ReferencedObject(aSO);
if(ret) theObject = _PTR(SObject)(new SALOMEDS_SObject(aSO));
}
bool ret = false;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO;
+ SALOMEDSImpl_SObject aSO;
ret = _local_impl->FindSubObject(theTag, aSO);
if(ret) theObject = _PTR(SObject)(new SALOMEDS_SObject(aSO));
}
std::string aName;
if (_isLocal) {
SALOMEDS::Locker lock;
- aName = _local_impl->Name().ToCString();
+ aName = _local_impl->Name();
}
else aName = _corba_impl->Name();
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl->Name((char*)theName.c_str());
+ _local_impl->Name(theName);
}
else _corba_impl->Name(theName.c_str());
}
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq = _local_impl->GetAllAttributes();
- aLength = aSeq->Length();
- for (int i = 1; i <= aLength; i++) {
- anAttr = SALOMEDS_GenericAttribute::CreateAttribute
- (Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aSeq->Value(i)));
+ vector<DF_Attribute*> aSeq = _local_impl->GetAllAttributes();
+ aLength = aSeq.size();
+ for (int i = 0; i < aLength; i++) {
+ anAttr = SALOMEDS_GenericAttribute::CreateAttribute(dynamic_cast<SALOMEDSImpl_GenericAttribute*>(aSeq[i]));
aVector.push_back(_PTR(GenericAttribute)(anAttr));
}
}
std::string aName;
if (_isLocal) {
SALOMEDS::Locker lock;
- aName = _local_impl->GetName().ToCString();
+ aName = _local_impl->GetName();
}
else aName = _corba_impl->GetName();
std::string aComment;
if (_isLocal) {
SALOMEDS::Locker lock;
- aComment = _local_impl->GetComment().ToCString();
+ aComment = _local_impl->GetComment();
}
else aComment = _corba_impl->GetComment();
std::string anIOR;
if (_isLocal) {
SALOMEDS::Locker lock;
- anIOR = _local_impl->GetIOR().ToCString();
+ anIOR = _local_impl->GetIOR();
}
else anIOR = _corba_impl->GetIOR();
{
if(_isLocal) {
if(!CORBA::is_nil(_corba_impl)) return SALOMEDS::SObject::_duplicate(_corba_impl);
- SALOMEDS::SObject_var aSO = SALOMEDS_SObject_i::New(_local_impl, _orb);
+ SALOMEDS::SObject_var aSO = SALOMEDS_SObject_i::New(*_local_impl, _orb);
_corba_impl = SALOMEDS::SObject::_duplicate(aSO);
return aSO._retn();
}
protected:
bool _isLocal;
- Handle(SALOMEDSImpl_SObject) _local_impl;
+ SALOMEDSImpl_SObject* _local_impl;
SALOMEDS::SObject_var _corba_impl;
CORBA::ORB_var _orb;
public:
SALOMEDS_SObject(SALOMEDS::SObject_ptr theSObject);
- SALOMEDS_SObject(const Handle(SALOMEDSImpl_SObject)& theSObject);
+ SALOMEDS_SObject(const SALOMEDSImpl_SObject& theSObject);
virtual ~SALOMEDS_SObject();
virtual std::string GetID();
virtual _PTR(Study) GetStudy();
virtual std::string Name();
virtual void Name(const std::string& theName);
- virtual vector<_PTR(GenericAttribute)> GetAllAttributes();
+ virtual std::vector<_PTR(GenericAttribute)> GetAllAttributes();
virtual std::string GetName();
virtual std::string GetComment();
virtual std::string GetIOR();
SALOMEDS::SObject_ptr GetSObject();
SALOMEDS::SObject_ptr GetCORBAImpl() { return SALOMEDS::SObject::_duplicate(_corba_impl); }
- Handle(SALOMEDSImpl_SObject) GetLocalImpl() { return _local_impl; }
+ SALOMEDSImpl_SObject* GetLocalImpl() { return _local_impl; }
private:
void init_orb();
#include "SALOMEDSImpl_Study.hxx"
#include "SALOMEDSImpl_AttributeIOR.hxx"
-// OCC Headers
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
#include <map>
#ifdef WIN32
using namespace std;
-SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const Handle(SALOMEDSImpl_SObject)& theImpl, CORBA::ORB_ptr theORB)
+SALOMEDS::SObject_ptr SALOMEDS_SObject_i::New(const SALOMEDSImpl_SObject& theImpl, CORBA::ORB_ptr theORB)
{
SALOMEDS_SObject_i* so_servant = new SALOMEDS_SObject_i(theImpl, theORB);
SALOMEDS::SObject_var so = SALOMEDS::SObject::_narrow(so_servant->_this());
* Purpose :
*/
//============================================================================
-SALOMEDS_SObject_i::SALOMEDS_SObject_i(const Handle(SALOMEDSImpl_SObject)& impl, CORBA::ORB_ptr orb)
- : _impl(impl)
+SALOMEDS_SObject_i::SALOMEDS_SObject_i(const SALOMEDSImpl_SObject& impl, CORBA::ORB_ptr orb)
{
+ if(!impl.IsNull()) {
+ if(impl.IsComponent()) {
+ SALOMEDSImpl_SComponent sco = impl;
+ _impl = sco.GetPersistentCopy();
+ }
+ else {
+ _impl = impl.GetPersistentCopy();
+ }
+ }
_orb = CORBA::ORB::_duplicate(orb);
//SALOME::GenericObj_i::myPOA = SALOMEDS_StudyManager_i::GetPOA(GetStudy());
}
*/
//============================================================================
SALOMEDS_SObject_i::~SALOMEDS_SObject_i()
-{}
+{
+ if(_impl) delete _impl;
+}
//============================================================================
char* SALOMEDS_SObject_i::GetID()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->GetID().ToCString());
+ return CORBA::string_dup(_impl->GetID().c_str());
}
//============================================================================
SALOMEDS::Study_ptr SALOMEDS_SObject_i::GetStudy()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_Study) aStudy = _impl->GetStudy();
- if(aStudy.IsNull()) {
+ SALOMEDSImpl_Study* aStudy = _impl->GetStudy();
+ if(!aStudy) {
MESSAGE("Problem GetStudy");
return SALOMEDS::Study::_nil();
}
- TCollection_AsciiString IOR = aStudy->GetTransientReference();
- CORBA::Object_var obj = _orb->string_to_object(IOR.ToCString());
+ string IOR = aStudy->GetTransientReference();
+ CORBA::Object_var obj = _orb->string_to_object(IOR.c_str());
SALOMEDS::Study_var Study = SALOMEDS::Study::_narrow(obj) ;
ASSERT(!CORBA::is_nil(Study));
return SALOMEDS::Study::_duplicate(Study);
const char* aTypeOfAttribute)
{
SALOMEDS::Locker lock;
- Handle(TDF_Attribute) anAttr;
+ DF_Attribute* anAttr = NULL;
if(_impl->FindAttribute(anAttr, (char*)aTypeOfAttribute)) {
anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb));
- return Standard_True;
+ return true;
}
- return Standard_False;
+ return false;
}
//============================================================================
SALOMEDS::ListOfAttributes* SALOMEDS_SObject_i::GetAllAttributes()
{
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq = _impl->GetAllAttributes();
+ vector<DF_Attribute*> aSeq = _impl->GetAllAttributes();
SALOMEDS::ListOfAttributes_var SeqOfAttr = new SALOMEDS::ListOfAttributes;
- Standard_Integer length = aSeq->Length();
+ int length = aSeq.size();
SeqOfAttr->length(length);
if (length != 0) {
- for(int i = 1; i<= length; i++) {
- Handle(SALOMEDSImpl_GenericAttribute) anAttr = Handle(SALOMEDSImpl_GenericAttribute)::DownCast(aSeq->Value(i));
+ for(int i = 0; i < length; i++) {
+ SALOMEDSImpl_GenericAttribute* anAttr = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(aSeq[i]);
SALOMEDS::GenericAttribute_var anAttribute;
anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb));
if (!CORBA::is_nil(anAttribute)) {
- SeqOfAttr[i - 1] = anAttribute;
+ SeqOfAttr[i] = anAttribute;
}
}
}
CORBA::Boolean SALOMEDS_SObject_i::ReferencedObject(SALOMEDS::SObject_out obj)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aRefObj;
+ SALOMEDSImpl_SObject aRefObj;
if(!_impl->ReferencedObject(aRefObj)) return false;
obj = SALOMEDS_SObject_i::New (aRefObj, _orb);
CORBA::Boolean SALOMEDS_SObject_i::FindSubObject(CORBA::Long atag, SALOMEDS::SObject_out obj)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSubObj;
+ SALOMEDSImpl_SObject aSubObj;
if(!_impl->FindSubObject(atag, aSubObj)) return false;
obj = SALOMEDS_SObject_i::New (aSubObj, _orb);
char* SALOMEDS_SObject_i::Name()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->Name().ToCString());
+ return CORBA::string_dup(_impl->Name().c_str());
}
//============================================================================
void SALOMEDS_SObject_i::Name(const char* name)
{
SALOMEDS::Locker lock;
- TCollection_AsciiString aName((char*)name);
+ string aName((char*)name);
_impl->Name(aName);
}
SALOMEDS::Locker lock;
CORBA::Object_ptr obj = CORBA::Object::_nil();
try {
- TCollection_AsciiString IOR = _impl->GetIOR();
- char* c_ior = CORBA::string_dup(IOR.ToCString());
+ string IOR = _impl->GetIOR();
+ char* c_ior = CORBA::string_dup(IOR.c_str());
obj = _orb->string_to_object(c_ior);
CORBA::string_free(c_ior);
} catch(...) {}
char* SALOMEDS_SObject_i::GetName()
{
SALOMEDS::Locker lock;
- CORBA::String_var aStr = CORBA::string_dup(_impl->GetName().ToCString());
+ CORBA::String_var aStr = CORBA::string_dup(_impl->GetName().c_str());
return aStr._retn();
}
char* SALOMEDS_SObject_i::GetComment()
{
SALOMEDS::Locker lock;
- CORBA::String_var aStr = CORBA::string_dup(_impl->GetComment().ToCString());
+ CORBA::String_var aStr = CORBA::string_dup(_impl->GetComment().c_str());
return aStr._retn();
}
char* SALOMEDS_SObject_i::GetIOR()
{
SALOMEDS::Locker lock;
- CORBA::String_var aStr = CORBA::string_dup(_impl->GetIOR().ToCString());
+ CORBA::String_var aStr = CORBA::string_dup(_impl->GetIOR().c_str());
return aStr._retn();
}
long pid = (long)getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
- SALOMEDSImpl_SObject* local_impl = _impl.operator->();
- return ((CORBA::LongLong)local_impl);
+ return ((CORBA::LongLong)(void*)_impl);
}
public virtual SALOME::GenericObj_i
{
protected:
- CORBA::ORB_ptr _orb;
- Handle(SALOMEDSImpl_SObject) _impl;
+ CORBA::ORB_ptr _orb;
+ SALOMEDSImpl_SObject* _impl;
public:
- static SALOMEDS::SObject_ptr New(const Handle(SALOMEDSImpl_SObject)&, CORBA::ORB_ptr);
+ static SALOMEDS::SObject_ptr New(const SALOMEDSImpl_SObject&, CORBA::ORB_ptr);
- SALOMEDS_SObject_i(const Handle(SALOMEDSImpl_SObject)&, CORBA::ORB_ptr);
+ SALOMEDS_SObject_i(const SALOMEDSImpl_SObject&, CORBA::ORB_ptr);
virtual ~SALOMEDS_SObject_i();
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_SelectableAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class SelectableAttribute from SALOMEDS inherits Integer from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF; value : Integer from Standard)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns SelectableAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable SelectableAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end SelectableAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SelectableAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_SelectableAttribute.ixx"
-#include <TDataStd_Integer.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_SelectableAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_SelectableAttributeID ("12837188-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_SelectableAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_SelectableAttribute) SALOMEDS_SelectableAttribute::Set (const TDF_Label& L,
- const Standard_Integer value)
-{
- Handle(SALOMEDS_SelectableAttribute) A;
- if (!L.FindAttribute(SALOMEDS_SelectableAttribute::GetID(),A)) {
- A = new SALOMEDS_SelectableAttribute();
- L.AddAttribute(A);
- }
-
- (Handle(TDataStd_Integer)::DownCast(A))->Set (value);
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_SelectableAttribute::SALOMEDS_SelectableAttribute()
-{
- TDataStd_Integer::Set(0);
-}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_SelectableAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_SelectableAttribute::NewEmpty () const
-{
- return new SALOMEDS_SelectableAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_SelectableAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer s = Handle(TDataStd_Integer)::DownCast (with)->Get ();
- TDataStd_Integer::Set(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_SelectableAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Integer)::DownCast (into)->Set (Get());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SelectableAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_SelectableAttribute_HeaderFile
-#define _SALOMEDS_SelectableAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_SelectableAttribute_HeaderFile
-#include <Handle_SALOMEDS_SelectableAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_Integer_HeaderFile
-#include <TDataStd_Integer.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_SelectableAttribute : public TDataStd_Integer {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_SelectableAttribute Set(const TDF_Label& label,const Standard_Integer value) ;
-Standard_EXPORT SALOMEDS_SelectableAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_SelectableAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_SelectableAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SelectableAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_SelectableAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_SelectableAttribute::~SALOMEDS_SelectableAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_SelectableAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Integer);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Integer);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_SelectableAttribute",
- sizeof(SALOMEDS_SelectableAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_SelectableAttribute) Handle(SALOMEDS_SelectableAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_SelectableAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_SelectableAttribute))) {
- _anOtherObject = Handle(SALOMEDS_SelectableAttribute)((Handle(SALOMEDS_SelectableAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_SelectableAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_SelectableAttribute) ;
-}
-Standard_Boolean SALOMEDS_SelectableAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_SelectableAttribute) == AType || TDataStd_Integer::IsKind(AType));
-}
-Handle_SALOMEDS_SelectableAttribute::~Handle_SALOMEDS_SelectableAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SelectableAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_SelectableAttribute_HeaderFile
-#include "SALOMEDS_SelectableAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_SequenceOfIntegerAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class SequenceOfIntegerAttribute from SALOMEDS inherits Attribute from TDF
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- HSequenceOfInteger from TColStd,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns SequenceOfIntegerAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable SequenceOfIntegerAttribute from SALOMEDS;
-
- ---Category: IntegerArray methods
- -- ===============
-
- Assign(me : mutable; other : HSequenceOfInteger from TColStd);
- ---Purpose: Initialize the inner sequence by other one
-
- ChangeValue (me : mutable; Index, Value : Integer from Standard);
- ---Purpose: Sets the <Index>th element of the sequence to <Value>
-
- Add (me : mutable; value : Integer from Standard);
- ---Purpose: Add new value
-
- Value (me : mutable; Index : Integer from Standard) returns Integer;
- ---Purpose: Value of index
-
- Remove (me : mutable; Index : Integer from Standard);
- ---Purpose: Remove element on index <Index>
-
- Length (me : mutable) returns Integer;
- ---Purpose: Returns length of sequence
-
-
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-fields
-
- myValue : HSequenceOfInteger from TColStd;
-
-end SequenceOfIntegerAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfIntegerAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_SequenceOfIntegerAttribute.ixx"
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_SequenceOfIntegerAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_SequenceOfIntegerAttributeID ("12837182-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_SequenceOfIntegerAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_SequenceOfIntegerAttribute) SALOMEDS_SequenceOfIntegerAttribute::Set (const TDF_Label& L)
-{
- Handle(SALOMEDS_SequenceOfIntegerAttribute) A;
- if (!L.FindAttribute(SALOMEDS_SequenceOfIntegerAttribute::GetID(),A)) {
- A = new SALOMEDS_SequenceOfIntegerAttribute();
- L.AddAttribute(A);
- }
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_SequenceOfIntegerAttribute::SALOMEDS_SequenceOfIntegerAttribute()
-{myValue = new TColStd_HSequenceOfInteger();}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_SequenceOfIntegerAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_SequenceOfIntegerAttribute::NewEmpty () const
-{
- return new SALOMEDS_SequenceOfIntegerAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_SequenceOfIntegerAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer i;
- Handle(SALOMEDS_SequenceOfIntegerAttribute) anSeq = Handle(SALOMEDS_SequenceOfIntegerAttribute)::DownCast(with);
- if(!anSeq->myValue.IsNull()) {
- myValue = new TColStd_HSequenceOfInteger();
- Standard_Integer Len = anSeq->Length();
- for(i = 1; i<=Len; i++) Add(anSeq->Value(i));
- }
- else
- myValue.Nullify();
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_SequenceOfIntegerAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& ) const
-{
- if(!myValue.IsNull()) {
- Handle(SALOMEDS_SequenceOfIntegerAttribute)::DownCast (into)->Assign(myValue);
- }
-}
-
-void SALOMEDS_SequenceOfIntegerAttribute::Assign(const Handle(TColStd_HSequenceOfInteger)& other)
-{
- Backup();
- if (myValue.IsNull()) myValue = new TColStd_HSequenceOfInteger;
- myValue->ChangeSequence() = other->Sequence();
-}
-
-void SALOMEDS_SequenceOfIntegerAttribute::ChangeValue(const Standard_Integer Index,const Standard_Integer Value)
-{
- Backup();
- myValue->SetValue(Index, Value);
-}
-
-void SALOMEDS_SequenceOfIntegerAttribute::Add(const Standard_Integer Value)
-{
- Backup();
- myValue->Append(Value);
-}
-
-void SALOMEDS_SequenceOfIntegerAttribute::Remove(const Standard_Integer Index)
-{
- Backup();
- myValue->Remove(Index);
-}
-
-Standard_Integer SALOMEDS_SequenceOfIntegerAttribute::Length()
-{
- return myValue->Length();
-}
-Standard_Integer SALOMEDS_SequenceOfIntegerAttribute::Value(const Standard_Integer Index)
-{
- return myValue->Value(Index);
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfIntegerAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_SequenceOfIntegerAttribute_HeaderFile
-#define _SALOMEDS_SequenceOfIntegerAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_SequenceOfIntegerAttribute_HeaderFile
-#include <Handle_SALOMEDS_SequenceOfIntegerAttribute.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
-#include <Handle_TColStd_HSequenceOfInteger.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class TColStd_HSequenceOfInteger;
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_SequenceOfIntegerAttribute : public TDF_Attribute {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_SequenceOfIntegerAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_SequenceOfIntegerAttribute();
-Standard_EXPORT void Assign(const Handle(TColStd_HSequenceOfInteger)& other) ;
-Standard_EXPORT void ChangeValue(const Standard_Integer Index,const Standard_Integer Value) ;
-Standard_EXPORT void Add(const Standard_Integer value) ;
-Standard_EXPORT Standard_Integer Value(const Standard_Integer Index) ;
-Standard_EXPORT void Remove(const Standard_Integer Index) ;
-Standard_EXPORT Standard_Integer Length() ;
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_SequenceOfIntegerAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_SequenceOfIntegerAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Handle_TColStd_HSequenceOfInteger myValue;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfIntegerAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_SequenceOfIntegerAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_SequenceOfIntegerAttribute::~SALOMEDS_SequenceOfIntegerAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_SequenceOfIntegerAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_SequenceOfIntegerAttribute",
- sizeof(SALOMEDS_SequenceOfIntegerAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_SequenceOfIntegerAttribute) Handle(SALOMEDS_SequenceOfIntegerAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_SequenceOfIntegerAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_SequenceOfIntegerAttribute))) {
- _anOtherObject = Handle(SALOMEDS_SequenceOfIntegerAttribute)((Handle(SALOMEDS_SequenceOfIntegerAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_SequenceOfIntegerAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_SequenceOfIntegerAttribute) ;
-}
-Standard_Boolean SALOMEDS_SequenceOfIntegerAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_SequenceOfIntegerAttribute) == AType || TDF_Attribute::IsKind(AType));
-}
-Handle_SALOMEDS_SequenceOfIntegerAttribute::~Handle_SALOMEDS_SequenceOfIntegerAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfIntegerAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _TColStd_HSequenceOfInteger_HeaderFile
-#include <TColStd_HSequenceOfInteger.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_SequenceOfIntegerAttribute_HeaderFile
-#include "SALOMEDS_SequenceOfIntegerAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_SequenceOfRealAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class SequenceOfRealAttribute from SALOMEDS inherits Attribute from TDF
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- HSequenceOfReal from TColStd,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF)
- ---Purpose: Find, or create a Comment attribute and set the string.
- -- the Comment attribute is returned.
- returns SequenceOfRealAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable SequenceOfRealAttribute from SALOMEDS;
-
- ---Category: IntegerArray methods
- -- ===============
-
- Assign(me : mutable; other : HSequenceOfReal from TColStd);
- ---Purpose: Initialize the inner sequence by other one
-
- ChangeValue (me : mutable; Index : Integer from Standard; Value : Real);
- ---Purpose: Sets the <Index>th element of the sequence to <Value>
-
- Add (me : mutable; Value : Real from Standard);
- ---Purpose: Add new value
-
- Value (me : mutable; Index : Integer from Standard) returns Real;
- ---Purpose: Value of index
-
- Remove (me : mutable; Index : Integer from Standard);
- ---Purpose: Remove element on index <Index>
-
- Length (me : mutable) returns Integer;
- ---Purpose: Returns length of sequence
-
-
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-fields
-
- myValue : HSequenceOfReal from TColStd;
-
-end SequenceOfRealAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfRealAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_SequenceOfRealAttribute.ixx"
-#include <TDataStd_Real.hxx>
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_SequenceOfRealAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_SequenceOfRealAttributeID ("12837183-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_SequenceOfRealAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_SequenceOfRealAttribute) SALOMEDS_SequenceOfRealAttribute::Set (const TDF_Label& L)
-{
- Handle(SALOMEDS_SequenceOfRealAttribute) A;
- if (!L.FindAttribute(SALOMEDS_SequenceOfRealAttribute::GetID(),A)) {
- A = new SALOMEDS_SequenceOfRealAttribute();
- L.AddAttribute(A);
- }
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_SequenceOfRealAttribute::SALOMEDS_SequenceOfRealAttribute()
-{myValue = new TColStd_HSequenceOfReal();}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_SequenceOfRealAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_SequenceOfRealAttribute::NewEmpty () const
-{
- return new SALOMEDS_SequenceOfRealAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_SequenceOfRealAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer i;
- Handle(SALOMEDS_SequenceOfRealAttribute) anSeq = Handle(SALOMEDS_SequenceOfRealAttribute)::DownCast(with);
- if(!anSeq->myValue.IsNull()) {
- myValue = new TColStd_HSequenceOfReal();
- Standard_Integer Len = anSeq->Length();
- for(i = 1; i<=Len; i++) Add(anSeq->Value(i));
- }
- else
- myValue.Nullify();
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_SequenceOfRealAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& ) const
-{
- if(!myValue.IsNull()) {
- Handle(SALOMEDS_SequenceOfRealAttribute)::DownCast (into)->Assign(myValue);
- }
-}
-
-void SALOMEDS_SequenceOfRealAttribute::Assign(const Handle(TColStd_HSequenceOfReal)& other)
-{
- Backup();
- if (myValue.IsNull()) myValue = new TColStd_HSequenceOfReal;
- myValue->ChangeSequence() = other->Sequence();
-}
-
-void SALOMEDS_SequenceOfRealAttribute::ChangeValue(const Standard_Integer Index,const Standard_Real Value)
-{
- Backup();
- myValue->SetValue(Index, Value);
-}
-
-void SALOMEDS_SequenceOfRealAttribute::Add(const Standard_Real Value)
-{
- Backup();
- myValue->Append(Value);
-}
-
-void SALOMEDS_SequenceOfRealAttribute::Remove(const Standard_Integer Index)
-{
- Backup();
- myValue->Remove(Index);
-}
-
-Standard_Integer SALOMEDS_SequenceOfRealAttribute::Length()
-{
- return myValue->Length();
-}
-
-Standard_Real SALOMEDS_SequenceOfRealAttribute::Value(const Standard_Integer Index)
-{
- return myValue->Value(Index);
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfRealAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_SequenceOfRealAttribute_HeaderFile
-#define _SALOMEDS_SequenceOfRealAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_SequenceOfRealAttribute_HeaderFile
-#include <Handle_SALOMEDS_SequenceOfRealAttribute.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HSequenceOfReal_HeaderFile
-#include <Handle_TColStd_HSequenceOfReal.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include <Standard_Real.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class TColStd_HSequenceOfReal;
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_SequenceOfRealAttribute : public TDF_Attribute {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_SequenceOfRealAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_SequenceOfRealAttribute();
-Standard_EXPORT void Assign(const Handle(TColStd_HSequenceOfReal)& other) ;
-Standard_EXPORT void ChangeValue(const Standard_Integer Index,const Standard_Real Value) ;
-Standard_EXPORT void Add(const Standard_Real Value) ;
-Standard_EXPORT Standard_Real Value(const Standard_Integer Index) ;
-Standard_EXPORT void Remove(const Standard_Integer Index) ;
-Standard_EXPORT Standard_Integer Length() ;
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_SequenceOfRealAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_SequenceOfRealAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Handle_TColStd_HSequenceOfReal myValue;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfRealAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_SequenceOfRealAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_SequenceOfRealAttribute::~SALOMEDS_SequenceOfRealAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_SequenceOfRealAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_SequenceOfRealAttribute",
- sizeof(SALOMEDS_SequenceOfRealAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_SequenceOfRealAttribute) Handle(SALOMEDS_SequenceOfRealAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_SequenceOfRealAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_SequenceOfRealAttribute))) {
- _anOtherObject = Handle(SALOMEDS_SequenceOfRealAttribute)((Handle(SALOMEDS_SequenceOfRealAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_SequenceOfRealAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_SequenceOfRealAttribute) ;
-}
-Standard_Boolean SALOMEDS_SequenceOfRealAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_SequenceOfRealAttribute) == AType || TDF_Attribute::IsKind(AType));
-}
-Handle_SALOMEDS_SequenceOfRealAttribute::~Handle_SALOMEDS_SequenceOfRealAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_SequenceOfRealAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _TColStd_HSequenceOfReal_HeaderFile
-#include <TColStd_HSequenceOfReal.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_SequenceOfRealAttribute_HeaderFile
-#include "SALOMEDS_SequenceOfRealAttribute.hxx"
-#endif
#include "SALOMEDS_Driver_i.hxx"
#include "SALOMEDS_Study_i.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <TColStd_HSequenceOfAsciiString.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
-
#include "Utils_ORB_INIT.hxx"
#include "Utils_SINGLETON.hxx"
using namespace std;
-SALOMEDS_Study::SALOMEDS_Study(const Handle(SALOMEDSImpl_Study)& theStudy)
+SALOMEDS_Study::SALOMEDS_Study(SALOMEDSImpl_Study* theStudy)
{
_isLocal = true;
_local_impl = theStudy;
std::string aRef;
if (_isLocal) {
SALOMEDS::Locker lock;
- aRef = _local_impl->GetPersistentReference().ToCString();
+ aRef = _local_impl->GetPersistentReference();
}
else aRef = _corba_impl->GetPersistentReference();
return aRef;
std::string aRef;
if (_isLocal) {
SALOMEDS::Locker lock;
- aRef = _local_impl->GetTransientReference().ToCString();
+ aRef = _local_impl->GetTransientReference();
}
else aRef = _corba_impl->GetTransientReference();
return aRef;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SComponent) aSCO_impl =
- _local_impl->FindComponent((char*)aComponentName.c_str());
- if (aSCO_impl.IsNull()) return _PTR(SComponent)(aSCO);
+ SALOMEDSImpl_SComponent aSCO_impl = _local_impl->FindComponent(aComponentName);
+ if (!aSCO_impl) return _PTR(SComponent)(aSCO);
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SComponent) aSCO_impl =
- _local_impl->FindComponentID((char*)aComponentID.c_str());
- if (aSCO_impl.IsNull()) return _PTR(SComponent)(aSCO);
+ SALOMEDSImpl_SComponent aSCO_impl = _local_impl->FindComponentID(aComponentID);
+ if (!aSCO_impl) return _PTR(SComponent)(aSCO);
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObject((char*)anObjectName.c_str());
- if (aSO_impl.IsNull()) return _PTR(SObject)(aSO);
- Handle(SALOMEDSImpl_SComponent) aSCO_impl = Handle(SALOMEDSImpl_SComponent)::DownCast(aSO_impl);
- if (!aSCO_impl.IsNull()) return _PTR(SObject)(new SALOMEDS_SComponent(aSCO_impl));
+ SALOMEDSImpl_SObject aSO_impl = _local_impl->FindObject(anObjectName);
+ if (!aSO_impl) return _PTR(SObject)(aSO);
+ if(aSO_impl.IsComponent()) {
+ SALOMEDSImpl_SComponent aSCO_impl = aSO_impl;
+ return _PTR(SObject)(new SALOMEDS_SComponent(aSCO_impl));
+ }
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq =
- _local_impl->FindObjectByName((char*)anObjectName.c_str(), (char*)aComponentName.c_str());
- aLength = aSeq->Length();
- for (i = 1; i<= aLength; i++)
- aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject
- (Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i)))));
+ vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindObjectByName(anObjectName, aComponentName);
+ aLength = aSeq.size();
+ for (i = 0; i< aLength; i++)
+ aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}
else {
SALOMEDS::Study::ListOfSObject_var aSeq = _corba_impl->FindObjectByName((char*)anObjectName.c_str(),
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectID((char*)anObjectID.c_str());
- if(aSO_impl.IsNull()) return _PTR(SObject)(aSO);
+ SALOMEDSImpl_SObject aSO_impl = _local_impl->FindObjectID(anObjectID);
+ if(!aSO_impl) return _PTR(SObject)(aSO);
return _PTR(SObject)(new SALOMEDS_SObject(aSO_impl));
}
else {
SALOMEDSClient_SObject* aSO = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->CreateObjectID((char*)anObjectID.c_str());
- if(aSO_impl.IsNull()) return _PTR(SObject)(aSO);
+ SALOMEDSImpl_SObject aSO_impl = _local_impl->CreateObjectID(anObjectID);
+ if(!aSO_impl) return _PTR(SObject)(aSO);
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectIOR((char*)anObjectIOR.c_str());
- if (aSO_impl.IsNull()) return _PTR(SObject)(aSO);
+ SALOMEDSImpl_SObject aSO_impl = _local_impl->FindObjectIOR(anObjectIOR);
+ if (!aSO_impl) return _PTR(SObject)(aSO);
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->FindObjectByPath((char*)thePath.c_str());
- if (aSO_impl.IsNull()) return _PTR(SObject)(aSO);
+ SALOMEDSImpl_SObject aSO_impl = _local_impl->FindObjectByPath(thePath);
+ if (!aSO_impl) return _PTR(SObject)(aSO);
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
std::string aPath;
if (_isLocal) {
SALOMEDS::Locker lock;
- aPath = _local_impl->GetObjectPath(aSO->GetLocalImpl()).ToCString();
+ aPath = _local_impl->GetObjectPath(*(aSO->GetLocalImpl()));
}
else aPath = _corba_impl->GetObjectPath(aSO->GetCORBAImpl());
return aPath;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl->SetContext((char*)thePath.c_str());
+ _local_impl->SetContext(thePath);
}
else _corba_impl->SetContext((char*)thePath.c_str());
}
std::string aPath;
if (_isLocal) {
SALOMEDS::Locker lock;
- aPath = _local_impl->GetContext().ToCString();
+ aPath = _local_impl->GetContext();
}
else aPath = _corba_impl->GetContext();
return aPath;
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
-
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetObjectNames((char*)theContext.c_str());
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
+ aVector = _local_impl->GetObjectNames(theContext);
}
else {
SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetObjectNames((char*)theContext.c_str());
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
-
- Handle(TColStd_HSequenceOfAsciiString) aSeq =
- _local_impl->GetDirectoryNames((char*)theContext.c_str());
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
+ aVector = _local_impl->GetDirectoryNames(theContext);
}
else {
SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetDirectoryNames((char*)theContext.c_str());
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
-
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetFileNames((char*)theContext.c_str());
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
+ aVector = _local_impl->GetFileNames(theContext);
}
else {
SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetFileNames((char*)theContext.c_str());
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
-
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetComponentNames((char*)theContext.c_str());
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
+ aVector = _local_impl->GetComponentNames(theContext);
}
else {
SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetComponentNames((char*)theContext.c_str());
SALOMEDSClient_ChildIterator* aCI = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
-
- Handle(SALOMEDSImpl_ChildIterator) aCIimpl = _local_impl->NewChildIterator(aSO->GetLocalImpl());
+ SALOMEDSImpl_ChildIterator aCIimpl = _local_impl->NewChildIterator(*(aSO->GetLocalImpl()));
aCI = new SALOMEDS_ChildIterator(aCIimpl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_StudyBuilder) aSBimpl = _local_impl->NewBuilder();
+ SALOMEDSImpl_StudyBuilder* aSBimpl = _local_impl->NewBuilder();
aSB = new SALOMEDS_StudyBuilder(aSBimpl);
}
else {
std::string aName;
if (_isLocal) {
SALOMEDS::Locker lock;
- aName = _local_impl->Name().ToCString();
+ aName = _local_impl->Name();
}
else aName = _corba_impl->Name();
return aName;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl->Name((char*)theName.c_str());
+ _local_impl->Name(theName);
}
else _corba_impl->Name((char*)theName.c_str());
}
SALOMEDS::Locker lock;
_local_impl->Modify();
}
- else _corba_impl->IsModified();
+ else _corba_impl->Modified();
}
std::string aURL;
if (_isLocal) {
SALOMEDS::Locker lock;
- aURL = _local_impl->URL().ToCString();
+ aURL = _local_impl->URL();
}
else aURL = _corba_impl->URL();
return aURL;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl->URL((char*)url.c_str());
+ _local_impl->URL(url);
}
else _corba_impl->URL((char*)url.c_str());
}
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq = _local_impl->FindDependances(aSO->GetLocalImpl());
- if (!aSeq.IsNull()) {
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++)
- aVector.push_back(_PTR(SObject)(
- new SALOMEDS_SObject(Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i)))));
+ vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindDependances(*(aSO->GetLocalImpl()));
+ if (aSeq.size()) {
+ aLength = aSeq.size();
+ for (i = 0; i < aLength; i++)
+ aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}
}
else {
std::string aDate;
if (_isLocal) {
SALOMEDS::Locker lock;
- aDate = _local_impl->GetLastModificationDate().ToCString();
+ aDate = _local_impl->GetLastModificationDate();
}
else aDate = _corba_impl->GetLastModificationDate();
return aDate;
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
-
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetModificationsDate();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
+ aVector = _local_impl->GetModificationsDate();
}
else {
SALOMEDS::ListOfDates_var aSeq = _corba_impl->GetModificationsDate();
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_UseCaseBuilder) aUBimpl = _local_impl->GetUseCaseBuilder();
+ SALOMEDSImpl_UseCaseBuilder* aUBimpl = _local_impl->GetUseCaseBuilder();
aUB = new SALOMEDS_UseCaseBuilder(aUBimpl);
}
else {
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl->SetStudyLock((char*)theLockerID.c_str());
+ _local_impl->SetStudyLock(theLockerID.c_str());
}
else _corba_impl->SetStudyLock((char*)theLockerID.c_str());
}
void SALOMEDS_Study::UnLockStudy(const string& theLockerID)
{
- if(_isLocal) _local_impl->UnLockStudy((char*)theLockerID.c_str());
+ if(_isLocal) _local_impl->UnLockStudy(theLockerID.c_str());
else _corba_impl->UnLockStudy((char*)theLockerID.c_str());
}
int aLength, i;
if (_isLocal) {
SALOMEDS::Locker lock;
-
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _local_impl->GetLockerID();
- aLength = aSeq->Length();
- for (i = 1; i <= aLength; i++) aVector.push_back(aSeq->Value(i).ToCString());
+ aVector = _local_impl->GetLockerID();
}
else {
SALOMEDS::ListOfStrings_var aSeq = _corba_impl->GetLockerID();
SALOMEDS::Locker lock;
if (!CORBA::is_nil(_corba_impl)) return SALOMEDS::Study::_duplicate(_corba_impl);
- std::string anIOR = _local_impl->GetTransientReference().ToCString();
+ std::string anIOR = _local_impl->GetTransientReference();
SALOMEDS::Study_var aStudy;
if (!_local_impl->IsError() && anIOR != "") {
aStudy = SALOMEDS::Study::_narrow(_orb->string_to_object(anIOR.c_str()));
private:
bool _isLocal;
- Handle(SALOMEDSImpl_Study) _local_impl;
+ SALOMEDSImpl_Study* _local_impl;
SALOMEDS::Study_var _corba_impl;
CORBA::ORB_var _orb;
public:
- SALOMEDS_Study(const Handle(SALOMEDSImpl_Study)& theStudy);
+ SALOMEDS_Study(SALOMEDSImpl_Study* theStudy);
SALOMEDS_Study(SALOMEDS::Study_ptr theStudy);
~SALOMEDS_Study();
#include <string>
#include <stdexcept>
-#include <TCollection_AsciiString.hxx>
-#include <TDF_Attribute.hxx>
+#include "DF_Attribute.hxx"
#include "Utils_CorbaException.hxx"
#include "Utils_ORB_INIT.hxx"
using namespace std;
-SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(const Handle(SALOMEDSImpl_StudyBuilder)& theBuilder)
+SALOMEDS_StudyBuilder::SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuilder)
{
_isLocal = true;
_local_impl = theBuilder;
CheckLocked();
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SComponent) aSCO_impl =_local_impl->NewComponent((char*)ComponentDataType.c_str());
- if(aSCO_impl.IsNull()) return _PTR(SComponent)(aSCO);
+ SALOMEDSImpl_SComponent aSCO_impl =_local_impl->NewComponent(ComponentDataType);
+ if(!aSCO_impl) return _PTR(SComponent)(aSCO);
aSCO = new SALOMEDS_SComponent(aSCO_impl);
}
else {
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->DefineComponentInstance(Handle(SALOMEDSImpl_SComponent)::DownCast(aSCO->GetLocalImpl()),
- (char*)ComponentIOR.c_str());
+ _local_impl->DefineComponentInstance(*(dynamic_cast<SALOMEDSImpl_SComponent*>(aSCO->GetLocalImpl())),
+ ComponentIOR);
}
else {
CORBA::Object_var obj = _orb->string_to_object(ComponentIOR.c_str());
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->RemoveComponent(Handle(SALOMEDSImpl_SComponent)::DownCast(aSCO->GetLocalImpl()));
+ _local_impl->RemoveComponent(*(dynamic_cast<SALOMEDSImpl_SComponent*>(aSCO->GetLocalImpl())));
}
else _corba_impl->RemoveComponent(SALOMEDS::SComponent::_narrow(aSCO->GetCORBAImpl()));
}
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->NewObject(father->GetLocalImpl());
- if(aSO_impl.IsNull()) return _PTR(SObject)(aSO);
+ SALOMEDSImpl_SObject aSO_impl = _local_impl->NewObject(*(father->GetLocalImpl()));
+ if(!aSO_impl) return _PTR(SObject)(aSO);
aSO = new SALOMEDS_SObject(aSO_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = _local_impl->NewObjectToTag(father->GetLocalImpl(), theTag);
+ SALOMEDSImpl_SObject aSO_impl = _local_impl->NewObjectToTag(*(father->GetLocalImpl()), theTag);
if(aSO_impl.IsNull()) return _PTR(SObject)(aSO);
aSO = new SALOMEDS_SObject(aSO_impl);
}
_local_impl->AddDirectory((char*)thePath.c_str());
if (_local_impl->IsError()) {
- std::string anErrorCode = _local_impl->GetErrorCode().ToCString();
+ std::string anErrorCode = _local_impl->GetErrorCode();
if (anErrorCode == "StudyNameAlreadyUsed") throw SALOMEDS::Study::StudyNameAlreadyUsed();
if (anErrorCode == "StudyInvalidDirectory") throw SALOMEDS::Study::StudyInvalidDirectory();
if (anErrorCode == "StudyInvalidComponent") throw SALOMEDS::Study::StudyInvalidComponent();
SALOMEDS::Locker lock;
SALOMEDS_Driver_i* drv = new SALOMEDS_Driver_i(aDriver, _orb);
- Handle(SALOMEDSImpl_SComponent) aSCO_impl =
- Handle(SALOMEDSImpl_SComponent)::DownCast(aSCO->GetLocalImpl());
+ SALOMEDSImpl_SComponent aSCO_impl = *(dynamic_cast<SALOMEDSImpl_SComponent*>(aSCO->GetLocalImpl()));
bool isDone = _local_impl->LoadWith(aSCO_impl, drv);
delete drv;
if(!isDone && _local_impl->IsError())
- THROW_SALOME_CORBA_EXCEPTION(_local_impl->GetErrorCode().ToCString(),SALOME::BAD_PARAM);
+ THROW_SALOME_CORBA_EXCEPTION(_local_impl->GetErrorCode().c_str(),SALOME::BAD_PARAM);
}
else {
_corba_impl->LoadWith(SALOMEDS::SComponent::_narrow(aSCO->GetCORBAImpl()), aDriver);
void SALOMEDS_StudyBuilder::Load(const _PTR(SObject)& theSCO)
{
SALOMEDS_SComponent* aSCO = dynamic_cast<SALOMEDS_SComponent*>(theSCO.get());
- if (_isLocal) _local_impl->Load(Handle(SALOMEDSImpl_SComponent)::DownCast(aSCO->GetLocalImpl()));
+ if (_isLocal) _local_impl->Load(*(dynamic_cast<SALOMEDSImpl_SComponent*>(aSCO->GetLocalImpl())));
else _corba_impl->Load(SALOMEDS::SComponent::_narrow(aSCO->GetCORBAImpl()));
}
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->RemoveObject(aSO->GetLocalImpl());
+ _local_impl->RemoveObject(*(aSO->GetLocalImpl()));
}
else _corba_impl->RemoveObject(aSO->GetCORBAImpl());
}
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->RemoveObjectWithChildren(aSO->GetLocalImpl());
+ _local_impl->RemoveObjectWithChildren(*(aSO->GetLocalImpl()));
}
else _corba_impl->RemoveObjectWithChildren(aSO->GetCORBAImpl());
}
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_GenericAttribute) aGA;
+ SALOMEDSImpl_GenericAttribute* aGA;
try {
- aGA = Handle(SALOMEDSImpl_GenericAttribute)::DownCast
- (_local_impl->FindOrCreateAttribute(aSO->GetLocalImpl(), (char*)aTypeOfAttribute.c_str()));
+ aGA = dynamic_cast<SALOMEDSImpl_GenericAttribute*>
+ (_local_impl->FindOrCreateAttribute(*(aSO->GetLocalImpl()), aTypeOfAttribute));
}
catch (...) {
throw SALOMEDS::StudyBuilder::LockProtection();
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_GenericAttribute) aGA;
- ret = _local_impl->FindAttribute(aSO->GetLocalImpl(), aGA, (char*)aTypeOfAttribute.c_str());
- if(ret) anAttribute = _PTR(GenericAttribute)(SALOMEDS_GenericAttribute::CreateAttribute(aGA));
+ DF_Attribute* anAttr = NULL;
+ ret = _local_impl->FindAttribute(*(aSO->GetLocalImpl()), anAttr, aTypeOfAttribute);
+ if(ret) {
+ SALOMEDSImpl_GenericAttribute* aGA = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(anAttr);
+ anAttribute = _PTR(GenericAttribute)(SALOMEDS_GenericAttribute::CreateAttribute(aGA));
+ }
}
else {
SALOMEDS::GenericAttribute_var aGA;
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->RemoveAttribute(aSO->GetLocalImpl(), (char*)aTypeOfAttribute.c_str());
+ _local_impl->RemoveAttribute(*(aSO->GetLocalImpl()), (char*)aTypeOfAttribute.c_str());
}
else _corba_impl->RemoveAttribute(aSO->GetCORBAImpl(), (char*)aTypeOfAttribute.c_str());
}
void SALOMEDS_StudyBuilder::Addreference(const _PTR(SObject)& me, const _PTR(SObject)& thereferencedObject)
{
- if(!me || !thereferencedObject) return;
+ if(!me || !thereferencedObject) {
+ throw DFexception("Invalid arguments");
+ }
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(me.get());
SALOMEDS_SObject* aRefSO = dynamic_cast<SALOMEDS_SObject*>(thereferencedObject.get());
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->Addreference(aSO->GetLocalImpl(), aRefSO->GetLocalImpl());
+ _local_impl->Addreference(*(aSO->GetLocalImpl()), *(aRefSO->GetLocalImpl()));
}
else _corba_impl->Addreference(aSO->GetCORBAImpl(), aRefSO->GetCORBAImpl());
}
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->RemoveReference(aSO->GetLocalImpl());
+ _local_impl->RemoveReference(*(aSO->GetLocalImpl()));
}
else _corba_impl->RemoveReference(aSO->GetCORBAImpl());
}
void SALOMEDS_StudyBuilder::SetGUID(const _PTR(SObject)& theSO, const std::string& theGUID)
{
if(!theSO) return;
- if(!Standard_GUID::CheckGUIDFormat((char*)theGUID.c_str())) throw invalid_argument("Invalid GUID");
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO.get());
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->SetGUID(aSO->GetLocalImpl(), (char*)theGUID.c_str());
+ _local_impl->SetGUID(*(aSO->GetLocalImpl()), theGUID);
}
else _corba_impl->SetGUID(aSO->GetCORBAImpl(), (char*)theGUID.c_str());
}
bool SALOMEDS_StudyBuilder::IsGUID(const _PTR(SObject)& theSO, const std::string& theGUID)
{
- if(!theSO || !Standard_GUID::CheckGUIDFormat((char*)theGUID.c_str())) return false;
-
SALOMEDS_SObject* aSO = dynamic_cast<SALOMEDS_SObject*>(theSO.get());
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->IsGUID(aSO->GetLocalImpl(), (char*)theGUID.c_str());
+ ret = _local_impl->IsGUID(*(aSO->GetLocalImpl()), (char*)theGUID.c_str());
}
else ret = _corba_impl->IsGUID(aSO->GetCORBAImpl(), (char*)theGUID.c_str());
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->SetName(aSO->GetLocalImpl(), (char*)theValue.c_str());
+ _local_impl->SetName(*(aSO->GetLocalImpl()), theValue);
}
else _corba_impl->SetName(aSO->GetCORBAImpl(), (char*)theValue.c_str());
}
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->SetComment(aSO->GetLocalImpl(), (char*)theValue.c_str());
+ _local_impl->SetComment(*(aSO->GetLocalImpl()), theValue);
}
else _corba_impl->SetComment(aSO->GetCORBAImpl(), (char*)theValue.c_str());
}
CheckLocked();
SALOMEDS::Locker lock;
- _local_impl->SetIOR(aSO->GetLocalImpl(), (char*)theValue.c_str());
+ _local_impl->SetIOR(*(aSO->GetLocalImpl()), theValue);
}
else _corba_impl->SetIOR(aSO->GetCORBAImpl(), (char*)theValue.c_str());
}
{
private:
bool _isLocal;
- Handle(SALOMEDSImpl_StudyBuilder) _local_impl;
+ SALOMEDSImpl_StudyBuilder* _local_impl;
SALOMEDS::StudyBuilder_var _corba_impl;
CORBA::ORB_var _orb;
public:
- SALOMEDS_StudyBuilder(const Handle(SALOMEDSImpl_StudyBuilder)& theBuilder);
+ SALOMEDS_StudyBuilder(SALOMEDSImpl_StudyBuilder* theBuilder);
SALOMEDS_StudyBuilder(SALOMEDS::StudyBuilder_ptr theBuilder);
~SALOMEDS_StudyBuilder();
#include "Utils_CorbaException.hxx"
#include "Utils_ExceptHandlers.hxx"
-#include <TDF_Attribute.hxx>
+#include <DF_Attribute.hxx>
+#include <DF_Document.hxx>
#include <stdlib.h>
using namespace std;
* Purpose :
*/
//============================================================================
-SALOMEDS_StudyBuilder_i::SALOMEDS_StudyBuilder_i(const Handle(SALOMEDSImpl_StudyBuilder) theImpl,
+SALOMEDS_StudyBuilder_i::SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder* theImpl,
CORBA::ORB_ptr orb)
{
_orb = CORBA::ORB::_duplicate(orb);
SALOMEDS::Locker lock;
CheckLocked();
//char* aDataType = CORBA::string_dup(DataType);
- Handle(SALOMEDSImpl_SComponent) aSCO = _impl->NewComponent(TCollection_AsciiString((char*)DataType));
+ SALOMEDSImpl_SComponent aSCO = _impl->NewComponent(string(DataType));
//CORBA::free_string(aDataType);
if(aSCO.IsNull()) return SALOMEDS::SComponent::_nil();
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_SComponent) aSCO;
- aSCO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSComponent((char*)aComponent->GetID());
+ SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(aComponent->GetID());
CORBA::String_var iorstr = _orb->object_to_string(IOR);
_impl->DefineComponentInstance(aSCO, (char*)iorstr.in());
SALOMEDS::Locker lock;
CheckLocked();
ASSERT(!CORBA::is_nil(aComponent));
- Handle(SALOMEDSImpl_SComponent) aSCO;
- aSCO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSComponent((char*)aComponent->GetID());
+ SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(aComponent->GetID());
_impl->RemoveComponent(aSCO);
}
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_SObject) aFO, aSO;
- aFO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)theFatherObject->GetID());
+ SALOMEDSImpl_SObject aFO, aSO;
+ aFO = _impl->GetOwner()->GetSObject(theFatherObject->GetID());
aSO = _impl->NewObject(aFO);
if(aSO.IsNull()) return SALOMEDS::SObject::_nil();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO,_orb);
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_SObject) aFO, aSO;
- aFO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)theFatherObject->GetID());
+ SALOMEDSImpl_SObject aFO, aSO;
+ aFO = _impl->GetOwner()->GetSObject(theFatherObject->GetID());
aSO = _impl->NewObjectToTag(aFO, atag);
if(aSO.IsNull()) return SALOMEDS::SObject::_nil();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)anObject->GetID());
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID());
_impl->RemoveObject(aSO);
}
{
SALOMEDS::Locker lock;
CheckLocked();
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)anObject->GetID());
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID());
_impl->RemoveObjectWithChildren(aSO);
}
SALOMEDS::Locker lock;
Unexpect aCatch(SBSalomeException);
- Handle(SALOMEDSImpl_SComponent) aSCO;
- aSCO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSComponent((char*)anSCO->GetID());
+ SALOMEDSImpl_SComponent aSCO = _impl->GetOwner()->GetSComponent(anSCO->GetID());
SALOMEDS_Driver_i* driver = new SALOMEDS_Driver_i(aDriver, _orb);
- bool isDone = _impl->LoadWith(aSCO, driver);
+ bool isDone = _impl->LoadWith(aSCO, driver);
delete driver;
if(!isDone && _impl->IsError()) {
- THROW_SALOME_CORBA_EXCEPTION(_impl->GetErrorCode().ToCString(),SALOME::BAD_PARAM);
+ THROW_SALOME_CORBA_EXCEPTION(_impl->GetErrorCode().c_str(),SALOME::BAD_PARAM);
}
}
const char* aTypeOfAttribute)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO;
CORBA::String_var anID = anObject->GetID();
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject(anID.inout());
- Handle(TDF_Attribute) anAttr;
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anID.inout());
+ DF_Attribute* anAttr;
try {
- anAttr = _impl->FindOrCreateAttribute(aSO, TCollection_AsciiString((char*)aTypeOfAttribute));
+ anAttr = _impl->FindOrCreateAttribute(aSO, string(aTypeOfAttribute));
}
catch (...) {
throw SALOMEDS::StudyBuilder::LockProtection();
}
SALOMEDS::GenericAttribute_var anAttribute;
- anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb));
+
+ if(anAttr)
+ anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb));
return anAttribute._retn();
}
//============================================================================
/*! Function : FindAttribute
- * Purpose : Find attribute of given type assigned SObject, returns Standard_True if it is found
+ * Purpose : Find attribute of given type assigned SObject, returns true if it is found
*/
//============================================================================
{
SALOMEDS::Locker lock;
ASSERT(!CORBA::is_nil(anObject));
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)anObject->GetID());
- Handle(TDF_Attribute) anAttr;
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID());
+ DF_Attribute* anAttr;
- if(!_impl->FindAttribute(aSO, anAttr, TCollection_AsciiString((char*)aTypeOfAttribute))) return false;
+ if(!_impl->FindAttribute(aSO, anAttr, string(aTypeOfAttribute))) return false;
anAttribute = SALOMEDS::GenericAttribute::_duplicate(SALOMEDS_GenericAttribute_i::CreateAttribute(anAttr, _orb));
return true;
SALOMEDS::Locker lock;
CheckLocked();
ASSERT(!CORBA::is_nil(anObject));
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)anObject->GetID());
- _impl->RemoveAttribute(aSO, TCollection_AsciiString((char*)aTypeOfAttribute));
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID());
+ _impl->RemoveAttribute(aSO, string(aTypeOfAttribute));
}
//============================================================================
ASSERT(!CORBA::is_nil(me));
ASSERT(!CORBA::is_nil(theReferencedObject));
- Handle(SALOMEDSImpl_SObject) aSO, aRefSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)me->GetID());
- aRefSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)theReferencedObject->GetID());
+ SALOMEDSImpl_SObject aSO, aRefSO;
+ aSO = _impl->GetOwner()->GetSObject(me->GetID());
+ aRefSO = _impl->GetOwner()->GetSObject(theReferencedObject->GetID());
_impl->Addreference(aSO, aRefSO);
}
SALOMEDS::Locker lock;
CheckLocked();
ASSERT(!CORBA::is_nil(me));
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)me->GetID());
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(me->GetID());
_impl->RemoveReference(aSO);
}
SALOMEDS::Locker lock;
CheckLocked();
if(thePath == NULL || strlen(thePath) == 0) throw SALOMEDS::Study::StudyInvalidDirectory();
- if(!_impl->AddDirectory(TCollection_AsciiString((char*)thePath))) {
- TCollection_AsciiString anErrorCode = _impl->GetErrorCode();
+ if(!_impl->AddDirectory(string(thePath))) {
+ string anErrorCode = _impl->GetErrorCode();
if(anErrorCode == "StudyNameAlreadyUsed") throw SALOMEDS::Study::StudyNameAlreadyUsed();
if(anErrorCode == "StudyInvalidDirectory") throw SALOMEDS::Study::StudyInvalidDirectory();
if(anErrorCode == "StudyInvalidComponent") throw SALOMEDS::Study::StudyInvalidComponent();
SALOMEDS::Locker lock;
CheckLocked();
ASSERT(!CORBA::is_nil(anObject));
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)anObject->GetID());
- _impl->SetGUID(aSO, TCollection_AsciiString((char*)theGUID));
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID());
+ _impl->SetGUID(aSO, string(theGUID));
}
//============================================================================
{
SALOMEDS::Locker lock;
ASSERT(!CORBA::is_nil(anObject));
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)anObject->GetID());
- return _impl->IsGUID(aSO, TCollection_AsciiString((char*)theGUID));
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(anObject->GetID());
+ return _impl->IsGUID(aSO, string(theGUID));
}
Unexpect aCatch(SBLockProtection);
CheckLocked();
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)theSO->GetID());
- _impl->SetName(aSO, TCollection_AsciiString((char*)theValue));
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(theSO->GetID());
+ _impl->SetName(aSO, string(theValue));
}
//============================================================================
Unexpect aCatch(SBLockProtection);
CheckLocked();
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)theSO->GetID());
- _impl->SetComment(aSO, TCollection_AsciiString((char*)theValue));
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(theSO->GetID());
+ _impl->SetComment(aSO, string(theValue));
}
//============================================================================
Unexpect aCatch(SBLockProtection);
CheckLocked();
- Handle(SALOMEDSImpl_SObject) aSO;
- aSO = Handle(SALOMEDSImpl_Study)::DownCast(_impl->GetOwner())->GetSObject((char*)theSO->GetID());
- _impl->SetIOR(aSO, TCollection_AsciiString((char*)theValue));
+ SALOMEDSImpl_SObject aSO = _impl->GetOwner()->GetSObject(theSO->GetID());
+ _impl->SetIOR(aSO, string(theValue));
}
#include "SALOMEDSImpl_StudyBuilder.hxx"
-// Cascade header
-#include <TDocStd_Document.hxx>
-
class SALOMEDS_StudyBuilder_i: public POA_SALOMEDS::StudyBuilder
{
private:
CORBA::ORB_ptr _orb;
- Handle(SALOMEDSImpl_StudyBuilder) _impl; // OCAF Document
+ SALOMEDSImpl_StudyBuilder* _impl;
public:
- SALOMEDS_StudyBuilder_i(const Handle(SALOMEDSImpl_StudyBuilder), CORBA::ORB_ptr);
+ SALOMEDS_StudyBuilder_i(SALOMEDSImpl_StudyBuilder*, CORBA::ORB_ptr);
~SALOMEDS_StudyBuilder_i();
virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
- Handle(SALOMEDSImpl_StudyBuilder) GetImpl() { return _impl; }
+ SALOMEDSImpl_StudyBuilder* GetImpl() { return _impl; }
};
#endif
#include <unistd.h>
#endif
-#include <string>
-#include <TCollection_AsciiString.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
-
#include "OpUtil.hxx"
using namespace std;
-SALOMEDS_Driver_i* GetDriver(const Handle(SALOMEDSImpl_SObject)& theObject, CORBA::ORB_ptr orb);
+SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb);
SALOMEDS_StudyManager::SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManager)
{
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq = _local_impl->GetOpenStudies();
- aLength = aSeq->Length();
- for(i = 1; i <= aLength; i++)
- aVector.push_back(Handle(SALOMEDSImpl_Study)::DownCast(aSeq->Value(i))->Name().ToCString());
+ vector<SALOMEDSImpl_Study*> aSeq = _local_impl->GetOpenStudies();
+ aLength = aSeq.size();
+ for(i = 0; i < aLength; i++)
+ aVector.push_back(aSeq[i]->Name());
}
else {
SALOMEDS::ListOfOpenStudies_var aSeq = _corba_impl->GetOpenStudies();
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->GetStudyByName((char*)theStudyName.c_str());
- if(aStudy_impl.IsNull()) return _PTR(Study)(aStudy);
+ SALOMEDSImpl_Study* aStudy_impl = _local_impl->GetStudyByName(theStudyName);
+ if(!aStudy_impl) return _PTR(Study)(aStudy);
aStudy = new SALOMEDS_Study(aStudy_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_Study) aStudy_impl = _local_impl->GetStudyByID(theStudyID);
- if(aStudy_impl.IsNull()) return _PTR(Study)(aStudy);
+ SALOMEDSImpl_Study* aStudy_impl = _local_impl->GetStudyByID(theStudyID);
+ if(!aStudy_impl) return _PTR(Study)(aStudy);
aStudy = new SALOMEDS_Study(aStudy_impl);
}
else {
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = aSO->GetLocalImpl();
+ SALOMEDSImpl_SObject aSO_impl = *(aSO->GetLocalImpl());
SALOMEDS_Driver_i* aDriver = GetDriver(aSO_impl, _orb);
ret = _local_impl->CanCopy(aSO_impl, aDriver);
delete aDriver;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = aSO->GetLocalImpl();
+ SALOMEDSImpl_SObject aSO_impl = *(aSO->GetLocalImpl());
SALOMEDS_Driver_i* aDriver = GetDriver(aSO_impl, _orb);
ret = _local_impl->Copy(aSO_impl, aDriver);
delete aDriver;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = aSO->GetLocalImpl();
+ SALOMEDSImpl_SObject aSO_impl = *(aSO->GetLocalImpl());
SALOMEDS_Driver_i* aDriver = GetDriver(aSO_impl, _orb);
ret = _local_impl->CanPaste(aSO_impl, aDriver);
delete aDriver;
if (_isLocal) {
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO_impl = aSO->GetLocalImpl();
+ SALOMEDSImpl_SObject aSO_impl = *(aSO->GetLocalImpl());
SALOMEDS_Driver_i* aDriver = GetDriver(aSO_impl, _orb);
- Handle(SALOMEDSImpl_SObject) aNewSO = _local_impl->Paste(aSO_impl, aDriver);
+ SALOMEDSImpl_SObject aNewSO = _local_impl->Paste(aSO_impl, aDriver);
delete aDriver;
if(aNewSO.IsNull()) return _PTR(SObject)(aResult);
aResult = new SALOMEDS_SObject(aNewSO);
_orb = init(0 , 0 );
}
-SALOMEDS_Driver_i* GetDriver(const Handle(SALOMEDSImpl_SObject)& theObject, CORBA::ORB_ptr orb)
+SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb)
{
SALOMEDS_Driver_i* driver = NULL;
- Handle(SALOMEDSImpl_SComponent) aSCO = theObject->GetFatherComponent();
+ SALOMEDSImpl_SComponent aSCO = theObject.GetFatherComponent();
if(!aSCO.IsNull()) {
- TCollection_AsciiString IOREngine = aSCO->GetIOR();
- if(!IOREngine.IsEmpty()) {
- CORBA::Object_var obj = orb->string_to_object(IOREngine.ToCString());
+ string IOREngine = aSCO.GetIOR();
+ if(!IOREngine.empty()) {
+ CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str());
SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ;
driver = new SALOMEDS_Driver_i(Engine, orb);
}
{
private:
bool _isLocal;
- Handle(SALOMEDSImpl_StudyManager) _local_impl;
+ SALOMEDSImpl_StudyManager* _local_impl;
SALOMEDS::StudyManager_var _corba_impl;
CORBA::ORB_var _orb;
#include "SALOMEDSImpl_SComponent.hxx"
#include "SALOMEDSImpl_AttributeIOR.hxx"
-#include <TColStd_HArray1OfCharacter.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TCollection_AsciiString.hxx>
-
#include "Utils_CorbaException.hxx"
#include <strstream>
+#include <vector>
#include <map>
using namespace std;
UNEXPECT_CATCH(SalomeException,SALOME::SALOME_Exception);
UNEXPECT_CATCH(LockProtection, SALOMEDS::StudyBuilder::LockProtection);
-static SALOMEDS_Driver_i* GetDriver(const Handle(SALOMEDSImpl_SObject)& theObject, CORBA::ORB_ptr orb);
+static SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb);
static std::map<int, PortableServer::POA_ptr> _mapOfPOA;
// Destroy directory to register open studies
_name_service->Destroy_Directory("/Study");
delete _factory;
+ delete _impl;
}
//============================================================================
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->NewStudy(TCollection_AsciiString((char*)study_name));
- if(aStudyImpl.IsNull()) {
+ SALOMEDSImpl_Study* aStudyImpl = _impl->NewStudy(study_name);
+ if(!aStudyImpl) {
MESSAGE("NewStudy : Error : " << _impl->GetErrorCode());
return SALOMEDS::Study::_nil();
}
Unexpect aCatch(SalomeException);
MESSAGE("Begin of SALOMEDS_StudyManager_i::Open");
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->Open(TCollection_AsciiString((char*)aUrl));
+ SALOMEDSImpl_Study* aStudyImpl = _impl->Open(string(aUrl));
MESSAGE("Open : Creating the CORBA servant holding it... ");
// Register study in the naming service
// Path to acces the study
if(!_name_service->Change_Directory("/Study")) MESSAGE( "Unable to access the study directory" )
- else _name_service->Register(Study, CORBA::string_dup(aStudyImpl->Name().ToCString()));
+ else _name_service->Register(Study, CORBA::string_dup(aStudyImpl->Name().c_str()));
return Study;
}
return false;
}
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
return _impl->Save(aStudyImpl, _factory, theMultiFile);
}
return false;
}
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
return _impl->SaveASCII(aStudyImpl, _factory, theMultiFile);
}
return false;
}
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- return _impl->SaveAs(TCollection_AsciiString((char*)aUrl), aStudyImpl, _factory, theMultiFile);
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ return _impl->SaveAs(string(aUrl), aStudyImpl, _factory, theMultiFile);
}
CORBA::Boolean SALOMEDS_StudyManager_i::SaveAsASCII(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
return false;
}
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- return _impl->SaveAsASCII(TCollection_AsciiString((char*)aUrl), aStudyImpl, _factory, theMultiFile);
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ return _impl->SaveAsASCII(string(aUrl), aStudyImpl, _factory, theMultiFile);
}
//============================================================================
{
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) anOpened = _impl->GetOpenStudies();
- int aLength = anOpened->Length();
+ vector<SALOMEDSImpl_Study*> anOpened = _impl->GetOpenStudies();
+ int aLength = anOpened.size();
SALOMEDS::ListOfOpenStudies_var _list_open_studies = new SALOMEDS::ListOfOpenStudies;
_list_open_studies->length(aLength);
}
else
{
- for (unsigned int ind=1; ind <= aLength; ind++)
+ for (unsigned int ind=0; ind < aLength; ind++)
{
- Handle(SALOMEDSImpl_Study) aStudy = Handle(SALOMEDSImpl_Study)::DownCast(anOpened->Value(ind));
- _list_open_studies[ind-1] = CORBA::string_dup(aStudy->Name().ToCString());
- SCRUTE(_list_open_studies[ind-1]) ;
+ _list_open_studies[ind] = CORBA::string_dup(anOpened[ind]->Name().c_str());
+ SCRUTE(_list_open_studies[ind]) ;
}
}
return _list_open_studies._retn();
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_Study) aStudyImpl =
- _impl->GetStudyByName(TCollection_AsciiString((char*)aStudyName));
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByName(string(aStudyName));
- if (aStudyImpl.IsNull())
+ if (!aStudyImpl)
{
- MESSAGE(_impl->GetErrorCode().ToCString());
+ MESSAGE(_impl->GetErrorCode().c_str());
return SALOMEDS::Study::_nil();
}
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudyID);
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudyID);
- if (aStudyImpl.IsNull())
+ if (!aStudyImpl)
{
- MESSAGE(_impl->GetErrorCode().ToCString());
+ MESSAGE(_impl->GetErrorCode().c_str());
return SALOMEDS::Study::_nil();
}
SALOMEDS::Locker lock;
SALOMEDS::Study_var aStudy = theObject->GetStudy();
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- Handle(SALOMEDSImpl_SObject) anObject = aStudyImpl->GetSObject((char*)theObject->GetID());
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID());
SALOMEDS_Driver_i* aDriver = GetDriver(anObject, _orb);
bool ret = _impl->CanCopy(anObject, aDriver);
SALOMEDS::Locker lock;
SALOMEDS::Study_var aStudy = theObject->GetStudy();
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- Handle(SALOMEDSImpl_SObject) anObject = aStudyImpl->GetSObject((char*)theObject->GetID());
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID());
SALOMEDS_Driver_i* aDriver = GetDriver(anObject, _orb);
bool ret = _impl->Copy(anObject, aDriver);
SALOMEDS::Locker lock;
SALOMEDS::Study_var aStudy = theObject->GetStudy();
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- Handle(SALOMEDSImpl_SObject) anObject = aStudyImpl->GetSObject((char*)theObject->GetID());
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID());
SALOMEDS_Driver_i* aDriver = GetDriver(anObject, _orb);
bool ret = _impl->CanPaste(anObject, aDriver);
Unexpect aCatch(LockProtection);
SALOMEDS::Study_var aStudy = theObject->GetStudy();
- Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- Handle(SALOMEDSImpl_SObject) anObject = aStudyImpl->GetSObject((char*)theObject->GetID());
- Handle(SALOMEDSImpl_SObject) aNewSO;
+ SALOMEDSImpl_Study* aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
+ SALOMEDSImpl_SObject anObject = aStudyImpl->GetSObject(theObject->GetID());
+ SALOMEDSImpl_SObject aNewSO;
try {
SALOMEDS_Driver_i* aDriver = GetDriver(anObject, _orb);
}
-SALOMEDS_Driver_i* GetDriver(const Handle(SALOMEDSImpl_SObject)& theObject, CORBA::ORB_ptr orb)
+SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb)
{
SALOMEDS_Driver_i* driver = NULL;
- Handle(SALOMEDSImpl_SComponent) aSCO = theObject->GetFatherComponent();
+ SALOMEDSImpl_SComponent aSCO = theObject.GetFatherComponent();
if(!aSCO.IsNull()) {
- TCollection_AsciiString IOREngine = aSCO->GetIOR();
- if(!IOREngine.IsEmpty()) {
- CORBA::Object_var obj = orb->string_to_object(IOREngine.ToCString());
+ string IOREngine = aSCO.GetIOR();
+ if(!IOREngine.empty()) {
+ CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str());
SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ;
driver = new SALOMEDS_Driver_i(Engine, orb);
}
long pid = (long)getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
- SALOMEDSImpl_StudyManager* aManager = _impl.operator->();
- return ((CORBA::LongLong)aManager);
+ return ((CORBA::LongLong)(void*)_impl);
}
//===========================================================================
namespace SALOMEDS
{
-/*
- CORBA::Object_var
- GetObject(const TDF_Label& theLabel, CORBA::ORB_ptr theORB)
- {
- try {
- Handle(SALOMEDS_IORAttribute) anAttr;
- if(theLabel.FindAttribute(SALOMEDS_IORAttribute::GetID(),anAttr))
- return theORB->string_to_object(TCollection_AsciiString(anAttr->Get()).ToCString());
- }catch(...){
- }
- return CORBA::Object::_nil();
- }
-*/
-
PortableServer::ServantBase_var
GetServant(CORBA::Object_ptr theObject, PortableServer::POA_ptr thePOA)
{
#include <stdlib.h>
-//Standard not implemented
-#include <Standard_NotImplemented.hxx>
#include "SALOMEDS_Driver_i.hxx"
#include "SALOMEDSImpl_StudyManager.hxx"
namespace SALOMEDS{
- // To convert IOR from SALOMEDS_IORAttribute to CORBA::Object
- /* CORBA::Object_var GetObject(const TDF_Label&, CORBA::ORB_ptr); */
-
// To convert CORBA::Object to PortableServer::ServantBase
PortableServer::ServantBase_var GetServant(CORBA::Object_ptr, PortableServer::POA_ptr);
CORBA::ORB_ptr _orb;
PortableServer::POA_var _poa;
- Handle(SALOMEDSImpl_StudyManager) _impl;
+ SALOMEDSImpl_StudyManager* _impl;
SALOME_NamingService* _name_service;
SALOMEDS_DriverFactory_i* _factory;
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_StudyPropertiesAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class StudyPropertiesAttribute from SALOMEDS inherits Attribute from TDF
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- DataSet from TDF,
- RelocationTable from TDF,
- Data from TDF,
- ExtendedString from TCollection,
- HSequenceOfExtendedString from TColStd,
- HSequenceOfInteger from TColStd
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF)
- returns StudyPropertiesAttribute from SALOMEDS;
-
- ---Purpose: Common methods
- -- ============
-
- Create
- returns mutable StudyPropertiesAttribute from SALOMEDS;
-
- Init(me: mutable);
-
- SetUserName(me: mutable; theName : ExtendedString from TCollection);
- GetCreatorName(me) returns ExtendedString from TCollection;
- GetUserNames(me) returns HSequenceOfExtendedString from TColStd;
- SetFirstName(me: mutable; theName : ExtendedString from TCollection);
-
- SetModificationDate(me: mutable; theMinute, theHour, theDay, theMonth, theYear : Integer from Standard);
- GetCreationDate(me; theMinute, theHour, theDay, theMonth, theYear : out Integer from Standard)
- returns Boolean from Standard;
- GetModificationDates(me; theMinutes, theHours, theDays, theMonths, theYears : out HSequenceOfInteger from TColStd);
-
- SetCreationMode(me: mutable; theMode : Integer from Standard);
- GetCreationMode(me) returns Integer from Standard;
-
- SetModified(me: mutable; theModified : Integer from Standard);
- IsModified(me) returns Boolean from Standard;
- GetModified(me) returns Integer from Standard;
-
- SetLocked(me: mutable; theLocked : Boolean from Standard);
- IsLocked(me) returns Boolean from Standard;
- IsLockChanged(me: mutable; theErase : Boolean from Standard) returns Boolean from Standard;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-fields
-
- myUserName : HSequenceOfExtendedString from TColStd;
- myMinute : HSequenceOfInteger from TColStd;
- myHour : HSequenceOfInteger from TColStd;
- myDay : HSequenceOfInteger from TColStd;
- myMonth : HSequenceOfInteger from TColStd;
- myYear : HSequenceOfInteger from TColStd;
- myMode : Integer from Standard;
- myModified : Integer from Standard;
- myLocked : Boolean from Standard;
- myLockChanged : Boolean from Standard;
-
-end StudyPropertiesAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_StudyPropertiesAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include <SALOMEDS_StudyPropertiesAttribute.ixx>
-using namespace std;
-
-const Standard_GUID& SALOMEDS_StudyPropertiesAttribute::GetID()
-{
- static Standard_GUID SALOMEDS_StudyPropertiesAttributeID ("128371A2-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_StudyPropertiesAttributeID;
-}
-
-Handle(SALOMEDS_StudyPropertiesAttribute) SALOMEDS_StudyPropertiesAttribute::Set(const TDF_Label& label)
-{
- Handle(SALOMEDS_StudyPropertiesAttribute) anAttr;
- if (!label.FindAttribute(SALOMEDS_StudyPropertiesAttribute::GetID(),anAttr)) {
- anAttr = new SALOMEDS_StudyPropertiesAttribute();
- label.AddAttribute(anAttr);
- }
- return anAttr;
-}
-
-SALOMEDS_StudyPropertiesAttribute::SALOMEDS_StudyPropertiesAttribute()
-{
- myLocked = Standard_False;
- myLockChanged = Standard_False;
- Init();
-}
-
-void SALOMEDS_StudyPropertiesAttribute::Init()
-{
- myUserName = new TColStd_HSequenceOfExtendedString();
- myMinute = new TColStd_HSequenceOfInteger();
- myHour = new TColStd_HSequenceOfInteger();
- myDay = new TColStd_HSequenceOfInteger();
- myMonth = new TColStd_HSequenceOfInteger();
- myYear = new TColStd_HSequenceOfInteger();
-// myModified = 0;
- myMode = 0; // none
-}
-
-void SALOMEDS_StudyPropertiesAttribute::SetUserName(const TCollection_ExtendedString& theName)
-{
- Backup();
- myUserName->Append(theName);
-}
-
-void SALOMEDS_StudyPropertiesAttribute::SetFirstName(const TCollection_ExtendedString& theName)
-{
- Backup();
- if (myUserName->Length() == 0) myUserName->Append(theName);
- else myUserName->SetValue(1, theName);
-}
-
-TCollection_ExtendedString SALOMEDS_StudyPropertiesAttribute::GetCreatorName() const
-{
- if (myUserName->Length() == 0) return TCollection_ExtendedString("");
- return myUserName->Value(1);
-}
-
-Handle(TColStd_HSequenceOfExtendedString) SALOMEDS_StudyPropertiesAttribute::GetUserNames() const
-{
- return myUserName;
-}
-
-void SALOMEDS_StudyPropertiesAttribute::SetModificationDate(const Standard_Integer theMinute,
- const Standard_Integer theHour,
- const Standard_Integer theDay,
- const Standard_Integer theMonth,
- const Standard_Integer theYear)
-{
- Backup();
- if (theMinute<0 || theMinute>60 || theHour<0 || theHour>24 || theDay<0 || theDay>31 || theMonth<0 || theMonth>12)
- return;
- myMinute->Append(theMinute);
- myHour->Append(theHour);
- myDay->Append(theDay);
- myMonth->Append(theMonth);
- myYear->Append(theYear);
-}
-
-Standard_Boolean SALOMEDS_StudyPropertiesAttribute::GetCreationDate(Standard_Integer& theMinute,
- Standard_Integer& theHour,
- Standard_Integer& theDay,
- Standard_Integer& theMonth,
- Standard_Integer& theYear) const
-{
- if (myMinute->Length() != 0) {
- theMinute = myMinute->Value(1);
- theHour = myHour->Value(1);
- theDay = myDay->Value(1);
- theMonth = myMonth->Value(1);
- theYear = myYear->Value(1);
- return Standard_True;
- }
- return Standard_False;
-}
-
-void SALOMEDS_StudyPropertiesAttribute::GetModificationDates(Handle(TColStd_HSequenceOfInteger)& theMinutes,
- Handle(TColStd_HSequenceOfInteger)& theHours,
- Handle(TColStd_HSequenceOfInteger)& theDays,
- Handle(TColStd_HSequenceOfInteger)& theMonths,
- Handle(TColStd_HSequenceOfInteger)& theYears) const
-{
- theMinutes = myMinute;
- theHours = myHour;
- theDays = myDay;
- theMonths = myMonth;
- theYears = myYear;
-}
-
-void SALOMEDS_StudyPropertiesAttribute::SetCreationMode(const Standard_Integer theMode)
-{
- Backup();
- myMode = theMode;
-}
-
-Standard_Integer SALOMEDS_StudyPropertiesAttribute::GetCreationMode() const
-{
- return myMode;
-}
-
-void SALOMEDS_StudyPropertiesAttribute::SetModified(const Standard_Integer theModified)
-{
- myModified = theModified;
-}
-
-Standard_Boolean SALOMEDS_StudyPropertiesAttribute::IsModified() const
-{
- return (myModified != 0);
-}
-
-Standard_Integer SALOMEDS_StudyPropertiesAttribute::GetModified() const
-{
- return myModified;
-}
-
-void SALOMEDS_StudyPropertiesAttribute::SetLocked(const Standard_Boolean theLocked)
-{
-// Backup();
- if (myLocked != theLocked) {
- myLockChanged = Standard_True;
- myLocked = theLocked;
- }
-}
-
-Standard_Boolean SALOMEDS_StudyPropertiesAttribute::IsLocked() const
-{
- return myLocked;
-}
-
-Standard_Boolean SALOMEDS_StudyPropertiesAttribute::IsLockChanged(const Standard_Boolean theErase) {
- if (!myLockChanged) return Standard_False;
- if (theErase) myLockChanged = Standard_False;
- return Standard_True;
-}
-
-const Standard_GUID& SALOMEDS_StudyPropertiesAttribute::ID() const
-{
- return GetID();
-}
-
-void SALOMEDS_StudyPropertiesAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Handle(SALOMEDS_StudyPropertiesAttribute) aProp = Handle(SALOMEDS_StudyPropertiesAttribute)::DownCast(with);
- Init();
- Standard_Integer i;
- Handle(TColStd_HSequenceOfExtendedString) aNames = aProp->GetUserNames();
- for(i = aNames->Length(); i > 0; i--) {
- myUserName->Prepend(aNames->Value(i));
- }
- Handle(TColStd_HSequenceOfInteger) aMinutes, aHours, aDays, aMonths, aYears;
- aProp->GetModificationDates(aMinutes, aHours, aDays, aMonths, aYears);
- for(i = aMinutes->Length(); i > 0; i--) {
- myMinute->Prepend(aMinutes->Value(i));
- myHour->Prepend(aHours->Value(i));
- myDay->Prepend(aDays->Value(i));
- myMonth->Prepend(aMonths->Value(i));
- myYear->Prepend(aYears->Value(i));
- }
- myMode = aProp->GetCreationMode();
-// myModified = aProp->GetModified();
-// myLocked = aProp->IsLocked();
-}
-
-Handle(TDF_Attribute) SALOMEDS_StudyPropertiesAttribute::NewEmpty() const
-{
- return new SALOMEDS_StudyPropertiesAttribute();
-}
-
-void SALOMEDS_StudyPropertiesAttribute::Paste(const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)&) const
-{
- Handle(SALOMEDS_StudyPropertiesAttribute) aProp = Handle(SALOMEDS_StudyPropertiesAttribute)::DownCast(into);
- aProp->Init();
-
- Standard_Integer i;
- for(i = 1; i <= myUserName->Length(); i++) {
- aProp->SetUserName(myUserName->Value(i));
- }
- for(i = 1; i <= myMinute->Length(); i++) {
- aProp->SetModificationDate(myMinute->Value(i), myHour->Value(i), myDay->Value(i), myMonth->Value(i), myYear->Value(i));
- }
-
- aProp->SetCreationMode(myMode);
-// aProp->SetModified(myModified);
-// aProp->SetLocked(myLocked);
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_StudyPropertiesAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_StudyPropertiesAttribute_HeaderFile
-#define _SALOMEDS_StudyPropertiesAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_StudyPropertiesAttribute_HeaderFile
-#include <Handle_SALOMEDS_StudyPropertiesAttribute.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
-#include <Handle_TColStd_HSequenceOfExtendedString.hxx>
-#endif
-#ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
-#include <Handle_TColStd_HSequenceOfInteger.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class TColStd_HSequenceOfExtendedString;
-class TColStd_HSequenceOfInteger;
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_StudyPropertiesAttribute : public TDF_Attribute {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_StudyPropertiesAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_StudyPropertiesAttribute();
-Standard_EXPORT void Init() ;
-Standard_EXPORT void SetUserName(const TCollection_ExtendedString& theName) ;
-Standard_EXPORT void SetFirstName(const TCollection_ExtendedString& theName) ;
-Standard_EXPORT TCollection_ExtendedString GetCreatorName() const;
-Standard_EXPORT Handle_TColStd_HSequenceOfExtendedString GetUserNames() const;
-Standard_EXPORT void SetModificationDate(const Standard_Integer theMinute,const Standard_Integer theHour,const Standard_Integer theDay,const Standard_Integer theMonth,const Standard_Integer theYear) ;
-Standard_EXPORT Standard_Boolean GetCreationDate(Standard_Integer& theMinute,Standard_Integer& theHour,Standard_Integer& theDay,Standard_Integer& theMonth,Standard_Integer& theYear) const;
-Standard_EXPORT void GetModificationDates(Handle(TColStd_HSequenceOfInteger)& theMinutes,Handle(TColStd_HSequenceOfInteger)& theHours,Handle(TColStd_HSequenceOfInteger)& theDays,Handle(TColStd_HSequenceOfInteger)& theMonths,Handle(TColStd_HSequenceOfInteger)& theYears) const;
-Standard_EXPORT void SetCreationMode(const Standard_Integer theMode) ;
-Standard_EXPORT Standard_Integer GetCreationMode() const;
-Standard_EXPORT void SetModified(const Standard_Integer theModified) ;
-Standard_EXPORT Standard_Boolean IsModified() const;
-Standard_EXPORT Standard_Integer GetModified() const;
-Standard_EXPORT void SetLocked(const Standard_Boolean theLocked) ;
-Standard_EXPORT Standard_Boolean IsLocked() const;
-Standard_EXPORT Standard_Boolean IsLockChanged(const Standard_Boolean theErase) ;
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_StudyPropertiesAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_StudyPropertiesAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Handle_TColStd_HSequenceOfExtendedString myUserName;
-Handle_TColStd_HSequenceOfInteger myMinute;
-Handle_TColStd_HSequenceOfInteger myHour;
-Handle_TColStd_HSequenceOfInteger myDay;
-Handle_TColStd_HSequenceOfInteger myMonth;
-Handle_TColStd_HSequenceOfInteger myYear;
-Standard_Integer myMode;
-Standard_Integer myModified;
-Standard_Boolean myLocked;
-Standard_Boolean myLockChanged;
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_StudyPropertiesAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include <SALOMEDS_StudyPropertiesAttribute.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_StudyPropertiesAttribute::~SALOMEDS_StudyPropertiesAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_StudyPropertiesAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_StudyPropertiesAttribute",
- sizeof(SALOMEDS_StudyPropertiesAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_StudyPropertiesAttribute) Handle(SALOMEDS_StudyPropertiesAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_StudyPropertiesAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_StudyPropertiesAttribute))) {
- _anOtherObject = Handle(SALOMEDS_StudyPropertiesAttribute)((Handle(SALOMEDS_StudyPropertiesAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_StudyPropertiesAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_StudyPropertiesAttribute) ;
-}
-Standard_Boolean SALOMEDS_StudyPropertiesAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_StudyPropertiesAttribute) == AType || TDF_Attribute::IsKind(AType));
-}
-Handle_SALOMEDS_StudyPropertiesAttribute::~Handle_SALOMEDS_StudyPropertiesAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_StudyPropertiesAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _TColStd_HSequenceOfExtendedString_HeaderFile
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#endif
-#ifndef _TColStd_HSequenceOfInteger_HeaderFile
-#include <TColStd_HSequenceOfInteger.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_StudyPropertiesAttribute_HeaderFile
-#include <SALOMEDS_StudyPropertiesAttribute.hxx>
-#endif
#include "SALOMEDSImpl_ChildIterator.hxx"
#include "SALOMEDSImpl_IParameters.hxx"
-#include <TColStd_SequenceOfExtendedString.hxx>
-#include <TColStd_HSequenceOfAsciiString.hxx>
-#include <TColStd_HSequenceOfTransient.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-#include <TDF_Label.hxx>
-#include <TDF_Attribute.hxx>
+#include "DF_Label.hxx"
+#include "DF_Attribute.hxx"
#ifdef WIN32
#include <process.h>
* Purpose : SALOMEDS_Study_i constructor
*/
//============================================================================
-SALOMEDS_Study_i::SALOMEDS_Study_i(const Handle(SALOMEDSImpl_Study) theImpl,
+SALOMEDS_Study_i::SALOMEDS_Study_i(SALOMEDSImpl_Study* theImpl,
CORBA::ORB_ptr orb)
{
_orb = CORBA::ORB::_duplicate(orb);
char* SALOMEDS_Study_i::GetPersistentReference()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->GetPersistentReference().ToCString());
+ return CORBA::string_dup(_impl->GetPersistentReference().c_str());
}
//============================================================================
/*! Function : GetTransientReference
char* SALOMEDS_Study_i::GetTransientReference()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->GetTransientReference().ToCString());
+ return CORBA::string_dup(_impl->GetTransientReference().c_str());
}
//============================================================================
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SComponent) aCompImpl = _impl->FindComponent(TCollection_AsciiString((char*)aComponentName));
+ SALOMEDSImpl_SComponent aCompImpl = _impl->FindComponent(string(aComponentName));
if(aCompImpl.IsNull()) return SALOMEDS::SComponent::_nil();
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (aCompImpl, _orb);
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SComponent) aCompImpl = _impl->FindComponentID(TCollection_AsciiString((char*)aComponentID));
+ SALOMEDSImpl_SComponent aCompImpl = _impl->FindComponentID(string((char*)aComponentID));
if(aCompImpl.IsNull()) return SALOMEDS::SComponent::_nil();
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (aCompImpl, _orb);
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO = _impl->FindObject(TCollection_AsciiString((char*)anObjectName));
+ SALOMEDSImpl_SObject aSO = _impl->FindObject(string((char*)anObjectName));
if(aSO.IsNull()) return SALOMEDS::SObject::_nil();
- if(aSO->DynamicType() == STANDARD_TYPE(SALOMEDSImpl_SComponent)) {
- Handle(SALOMEDSImpl_SComponent) aSCO = Handle(SALOMEDSImpl_SComponent)::DownCast(aSO);
+ if(aSO.IsComponent()) {
+ SALOMEDSImpl_SComponent aSCO = aSO;
SALOMEDS::SComponent_var sco = SALOMEDS_SComponent_i::New (aSCO, _orb);
return sco._retn();
}
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO = _impl->FindObjectID(TCollection_AsciiString((char*)anObjectID));
+ SALOMEDSImpl_SObject aSO = _impl->FindObjectID(string((char*)anObjectID));
if(aSO.IsNull()) return SALOMEDS::SObject::_nil();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
return so._retn();
if(!anObjectID || strlen(anObjectID) == 0) return SALOMEDS::SObject::_nil();
- Handle(SALOMEDSImpl_SObject) aSO = _impl->CreateObjectID((char*)anObjectID);
+ SALOMEDSImpl_SObject aSO = _impl->CreateObjectID((char*)anObjectID);
if(aSO.IsNull()) return SALOMEDS::SObject::_nil();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
{
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfTransient) aSeq = _impl->FindObjectByName(TCollection_AsciiString((char*)anObjectName),
- TCollection_AsciiString((char*)aComponentName));
- int aLength = aSeq->Length();
+ vector<SALOMEDSImpl_SObject> aSeq = _impl->FindObjectByName(string((char*)anObjectName),
+ string((char*)aComponentName));
+ int aLength = aSeq.size();
SALOMEDS::Study::ListOfSObject_var listSO = new SALOMEDS::Study::ListOfSObject ;
listSO->length(aLength);
- for(int i = 1; i<=aLength; i++) {
- Handle(SALOMEDSImpl_SObject) aSO = Handle(SALOMEDSImpl_SObject)::DownCast(aSeq->Value(i));
- SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
- listSO[i-1] = so ;
+ for(int i = 0; i<aLength; i++) {
+ SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSeq[i], _orb);
+ listSO[i] = so ;
}
return listSO._retn() ;
}
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO = _impl->FindObjectIOR(TCollection_AsciiString((char*)anObjectIOR));
+ SALOMEDSImpl_SObject aSO = _impl->FindObjectIOR(string((char*)anObjectIOR));
if(aSO.IsNull()) return SALOMEDS::SObject::_nil();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO = _impl->FindObjectByPath(TCollection_AsciiString((char*)thePath));
+ SALOMEDSImpl_SObject aSO = _impl->FindObjectByPath(string((char*)thePath));
if(aSO.IsNull()) return SALOMEDS::SObject::_nil();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
{
SALOMEDS::Locker lock;
- TCollection_AsciiString aPath("");
- if(CORBA::is_nil(theObject)) return CORBA::string_dup(aPath.ToCString());
- Handle(SALOMEDSImpl_SObject) aSO;
+ string aPath("");
+ if(CORBA::is_nil(theObject)) return CORBA::string_dup(aPath.c_str());
+ SALOMEDSImpl_SObject aSO;
SALOMEDS::SObject_var aSObj = SALOMEDS::SObject::_narrow(theObject);
if(!CORBA::is_nil(aSObj)) {
aSO = _impl->FindObjectIOR(_orb->object_to_string(theObject));
}
- if(aSO.IsNull()) return CORBA::string_dup(aPath.ToCString());
+ if(aSO.IsNull()) return CORBA::string_dup(aPath.c_str());
aPath = _impl->GetObjectPath(aSO);
- return CORBA::string_dup(aPath.ToCString());
+ return CORBA::string_dup(aPath.c_str());
}
{
SALOMEDS::Locker lock;
- _impl->SetContext(TCollection_AsciiString((char*)thePath));
+ _impl->SetContext(string((char*)thePath));
if(_impl->IsError() && _impl->GetErrorCode() == "InvalidContext")
throw SALOMEDS::Study::StudyInvalidContext();
}
char* SALOMEDS_Study_i::GetContext()
{
SALOMEDS::Locker lock;
-
+
if(!_impl->HasCurrentContext()) throw SALOMEDS::Study::StudyInvalidContext();
- return CORBA::string_dup(_impl->GetContext().ToCString());
+ return CORBA::string_dup(_impl->GetContext().c_str());
}
//============================================================================
if (strlen(theContext) == 0 && !_impl->HasCurrentContext())
throw SALOMEDS::Study::StudyInvalidContext();
- Handle(TColStd_HSequenceOfAsciiString) aSeq =
- _impl->GetObjectNames(TCollection_AsciiString((char*)theContext));
+ vector<string> aSeq = _impl->GetObjectNames(string((char*)theContext));
if (_impl->GetErrorCode() == "InvalidContext")
throw SALOMEDS::Study::StudyInvalidContext();
- int aLength = aSeq->Length();
+ int aLength = aSeq.size();
aResult->length(aLength);
- for (int anIndex = 1; anIndex <= aLength; anIndex++) {
- aResult[anIndex-1] = CORBA::string_dup(TCollection_AsciiString(aSeq->Value(anIndex)).ToCString());
+ for (int anIndex = 0; anIndex < aLength; anIndex++) {
+ aResult[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
}
return aResult._retn();
if (strlen(theContext) == 0 && !_impl->HasCurrentContext())
throw SALOMEDS::Study::StudyInvalidContext();
- Handle(TColStd_HSequenceOfAsciiString) aSeq =
- _impl->GetDirectoryNames(TCollection_AsciiString((char*)theContext));
+ vector<string> aSeq = _impl->GetDirectoryNames(string((char*)theContext));
if (_impl->GetErrorCode() == "InvalidContext")
throw SALOMEDS::Study::StudyInvalidContext();
- int aLength = aSeq->Length();
+ int aLength = aSeq.size();
aResult->length(aLength);
- for (int anIndex = 1; anIndex <= aLength; anIndex++) {
- aResult[anIndex-1] = CORBA::string_dup(TCollection_AsciiString(aSeq->Value(anIndex)).ToCString());
+ for (int anIndex = 0; anIndex < aLength; anIndex++) {
+ aResult[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
}
return aResult._retn();
if (strlen(theContext) == 0 && !_impl->HasCurrentContext())
throw SALOMEDS::Study::StudyInvalidContext();
- Handle(TColStd_HSequenceOfAsciiString) aSeq =
- _impl->GetFileNames(TCollection_AsciiString((char*)theContext));
+ vector<string> aSeq = _impl->GetFileNames(string((char*)theContext));
if (_impl->GetErrorCode() == "InvalidContext")
throw SALOMEDS::Study::StudyInvalidContext();
- int aLength = aSeq->Length();
+ int aLength = aSeq.size();
aResult->length(aLength);
- for (int anIndex = 1; anIndex <= aLength; anIndex++) {
- aResult[anIndex-1] = CORBA::string_dup(TCollection_AsciiString(aSeq->Value(anIndex)).ToCString());
+ for (int anIndex = 0; anIndex < aLength; anIndex++) {
+ aResult[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
}
return aResult._retn();
SALOMEDS::ListOfStrings_var aResult = new SALOMEDS::ListOfStrings;
- Handle(TColStd_HSequenceOfAsciiString) aSeq =
- _impl->GetComponentNames(TCollection_AsciiString((char*)theContext));
+ vector<string> aSeq = _impl->GetComponentNames(string((char*)theContext));
- int aLength = aSeq->Length();
+ int aLength = aSeq.size();
aResult->length(aLength);
- for(int anIndex = 1; anIndex <= aLength; anIndex++) {
- aResult[anIndex-1] = CORBA::string_dup(TCollection_AsciiString(aSeq->Value(anIndex)).ToCString());
+ for(int anIndex = 0; anIndex < aLength; anIndex++) {
+ aResult[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
}
return aResult._retn();
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO = _impl->GetSObject(theSO->GetID());
- Handle(SALOMEDSImpl_ChildIterator) anItr = new SALOMEDSImpl_ChildIterator(aSO);
+ SALOMEDSImpl_SObject aSO = _impl->GetSObject(theSO->GetID());
+ SALOMEDSImpl_ChildIterator anItr(aSO);
//Create iterator
SALOMEDS_ChildIterator_i* it_servant = new SALOMEDS_ChildIterator_i(anItr, _orb);
char* SALOMEDS_Study_i::Name()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->Name().ToCString());
+ return CORBA::string_dup(_impl->Name().c_str());
}
//============================================================================
void SALOMEDS_Study_i::Name(const char* name)
{
SALOMEDS::Locker lock;
- _impl->Name(TCollection_AsciiString((char*)name));
+ _impl->Name(string((char*)name));
}
//============================================================================
//============================================================================
/*! Function : Modified
- * Purpose : Set a Modified flag of a Study to True
+ * Purpose : Sets a Modified flag of a Study to True
*/
//============================================================================
void SALOMEDS_Study_i::Modified()
{
SALOMEDS::Locker lock;
- _impl->Modify();
+ return _impl->Modify();
}
char* SALOMEDS_Study_i::URL()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->URL().ToCString());
+ return CORBA::string_dup(_impl->URL().c_str());
}
//============================================================================
void SALOMEDS_Study_i::URL(const char* url)
{
SALOMEDS::Locker lock;
- _impl->URL(TCollection_AsciiString((char*)url));
+ _impl->URL(string((char*)url));
}
void SALOMEDS_Study_i::UpdateIORLabelMap(const char* anIOR,const char* anEntry)
{
SALOMEDS::Locker lock;
- _impl->UpdateIORLabelMap(TCollection_AsciiString((char*)anIOR), TCollection_AsciiString((char*)anEntry));
+ _impl->UpdateIORLabelMap(string((char*)anIOR), string((char*)anEntry));
}
-SALOMEDS::Study_ptr SALOMEDS_Study_i::GetStudy(const TDF_Label theLabel, CORBA::ORB_ptr orb)
+SALOMEDS::Study_ptr SALOMEDS_Study_i::GetStudy(const DF_Label& theLabel, CORBA::ORB_ptr orb)
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeIOR) Att;
- if (theLabel.Root().FindAttribute(SALOMEDSImpl_AttributeIOR::GetID(),Att)){
- char* IOR = CORBA::string_dup(TCollection_AsciiString(Att->Value()).ToCString());
+ SALOMEDSImpl_AttributeIOR* Att = NULL;
+ if ((Att=(SALOMEDSImpl_AttributeIOR*)theLabel.Root().FindAttribute(SALOMEDSImpl_AttributeIOR::GetID()))){
+ char* IOR = CORBA::string_dup(Att->Value().c_str());
CORBA::Object_var obj = orb->string_to_object(IOR);
SALOMEDS::Study_ptr aStudy = SALOMEDS::Study::_narrow(obj) ;
ASSERT(!CORBA::is_nil(aStudy));
return SALOMEDS::Study::_nil();
}
-void SALOMEDS_Study_i::IORUpdated(const Handle(SALOMEDSImpl_AttributeIOR) theAttribute)
+void SALOMEDS_Study_i::IORUpdated(SALOMEDSImpl_AttributeIOR* theAttribute)
{
SALOMEDS::Locker lock;
SALOMEDSImpl_Study::IORUpdated(theAttribute);
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeStudyProperties) anAttr = _impl->GetProperties();
+ SALOMEDSImpl_AttributeStudyProperties* anAttr = _impl->GetProperties();
SALOMEDS_AttributeStudyProperties_i* SP = new SALOMEDS_AttributeStudyProperties_i(anAttr, _orb);
return SP->AttributeStudyProperties::_this();
}
char* SALOMEDS_Study_i::GetLastModificationDate()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->GetLastModificationDate().ToCString());
+ return CORBA::string_dup(_impl->GetLastModificationDate().c_str());
}
SALOMEDS::ListOfDates* SALOMEDS_Study_i::GetModificationsDate()
{
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _impl->GetModificationsDate();
- int aLength = aSeq->Length();
+ vector<string> aSeq = _impl->GetModificationsDate();
+ int aLength = aSeq.size();
SALOMEDS::ListOfDates_var aDates = new SALOMEDS::ListOfDates;
aDates->length(aLength);
- for(int anIndex = 1; anIndex <= aLength; anIndex++) {
- aDates[anIndex-1] = CORBA::string_dup(aSeq->Value(anIndex).ToCString());
+ for(int anIndex = 0; anIndex < aLength; anIndex++) {
+ aDates[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
}
return aDates._retn();
}
void SALOMEDS_Study_i::Close()
{
SALOMEDS::Locker lock;
-
+
RemovePostponed(-1);
SALOMEDS::SComponentIterator_var itcomponent = NewComponentIterator();
-
for (; itcomponent->More(); itcomponent->Next()) {
SALOMEDS::SComponent_var sco = itcomponent->Value();
-
MESSAGE ( "Look for an engine for data type :"<< sco->ComponentDataType());
// if there is an associated Engine call its method for closing
CORBA::String_var IOREngine;
}
}
}
+
_impl->Close();
}
void SALOMEDS_Study_i::AddPostponed(const char* theIOR)
{
SALOMEDS::Locker lock;
-
- CORBA::Object_var obj = _orb->string_to_object(theIOR);
- if (!CORBA::is_nil(obj)) {
- SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj) ;
- if (!CORBA::is_nil(aGeneric)) _impl->AddPostponed((char*)theIOR);
- }
+ //Not implemented
}
void SALOMEDS_Study_i::AddCreatedPostponed(const char* theIOR)
{
SALOMEDS::Locker lock;
-
- CORBA::Object_var obj = _orb->string_to_object(theIOR);
- if (!CORBA::is_nil(obj)) {
- SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj) ;
- if (!CORBA::is_nil(aGeneric)) _impl->AddCreatedPostponed((char*)theIOR);
- }
+ //Not implemented
}
//============================================================================
*/
//============================================================================
#ifndef WNT
-void SALOMEDS_Study_i::RemovePostponed(const CORBA::Long theUndoLimit)
+void SALOMEDS_Study_i::RemovePostponed(const CORBA::Long /*theUndoLimit*/)
#else
-void SALOMEDS_Study_i::RemovePostponed(CORBA::Long theUndoLimit)
+void SALOMEDS_Study_i::RemovePostponed(CORBA::Long /*theUndoLimit*/)
#endif
{
SALOMEDS::Locker lock;
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _impl->RemovePostponed(theUndoLimit);
- int aLegth = aSeq->Length();
- for(int i = 1; i <= aLegth; i++) {
- TCollection_AsciiString anIOR = aSeq->Value(i);
- //mkr : fix for bug IPAL9408 : check the length of anIOR
- // before take value from it
- if ( !anIOR.IsEmpty() && anIOR.Value(1) == 'c') {
- CORBA::Object_var obj = _orb->string_to_object(anIOR.Split(1).ToCString());
- SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj);
- if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy();
- }
- else if ( !anIOR.IsEmpty() && anIOR.Value(1) == 'd') {
- CORBA::Object_var obj = _orb->string_to_object(anIOR.Split(1).ToCString());
+ vector<string> anIORs = _impl->GetIORs();
+ int i, aSize = (int)anIORs.size();
+
+ for(i = 0; i < aSize; i++) {
+ try {
+ CORBA::Object_var obj = _orb->string_to_object(anIORs[i].c_str());
SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj);
if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy();
- }
- else {
- try {
- CORBA::Object_var obj = _orb->string_to_object(anIOR.ToCString());
- SALOME::GenericObj_var aGeneric = SALOME::GenericObj::_narrow(obj);
- if (!CORBA::is_nil(aGeneric)) aGeneric->Destroy();
- } catch (...) {}
- }
+ } catch (...) {}
}
+
+ //Not implemented
}
//============================================================================
#endif
{
SALOMEDS::Locker lock;
-
- _impl->UndoPostponed(theWay);
+ //Not implemented
}
{
SALOMEDS::Locker lock;
- TCollection_AsciiString aPath((char*)thePath), aBaseName((char*)theBaseName);
+ string aPath((char*)thePath), aBaseName((char*)theBaseName);
SALOMEDS_DriverFactory_i* factory = new SALOMEDS_DriverFactory_i(_orb);
CORBA::Boolean ret = _impl->DumpStudy(aPath, aBaseName, isPublished, factory);
delete factory;
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) anAttr = _impl->GetCommonParameters(theID, theSavePoint);
+ SALOMEDSImpl_AttributeParameter* anAttr = _impl->GetCommonParameters(theID, theSavePoint);
SALOMEDS_AttributeParameter_i* SP = new SALOMEDS_AttributeParameter_i(anAttr, _orb);
return SP->AttributeParameter::_this();
}
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_AttributeParameter) anAttr = _impl->GetModuleParameters(theID, theModuleName, theSavePoint);
+ SALOMEDSImpl_AttributeParameter* anAttr = _impl->GetModuleParameters(theID, theModuleName, theSavePoint);
SALOMEDS_AttributeParameter_i* SP = new SALOMEDS_AttributeParameter_i(anAttr, _orb);
return SP->AttributeParameter::_this();
}
SALOMEDS::ListOfStrings_var aResult = new SALOMEDS::ListOfStrings;
- Handle(TColStd_HSequenceOfAsciiString) aSeq = _impl->GetLockerID();
+ vector<string> aSeq = _impl->GetLockerID();
- int aLength = aSeq->Length();
+ int aLength = aSeq.size();
aResult->length(aLength);
- for(int anIndex = 1; anIndex <= aLength; anIndex++) {
- aResult[anIndex-1] = CORBA::string_dup(TCollection_AsciiString(aSeq->Value(anIndex)).ToCString());
+ for(int anIndex = 0; anIndex < aLength; anIndex++) {
+ aResult[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
}
return aResult._retn();
}
void SALOMEDS_Study_i::EnableUseCaseAutoFilling(CORBA::Boolean isEnabled)
{
_impl->EnableUseCaseAutoFilling(isEnabled);
- Handle(SALOMEDSImpl_StudyBuilder) builder = _builder->GetImpl();
- if(!builder.IsNull()) {
+ SALOMEDSImpl_StudyBuilder* builder = _builder->GetImpl();
+ if(builder) {
if(isEnabled) {
builder->SetOnAddSObject(_impl->GetCallback());
builder->SetOnRemoveSObject(_impl->GetCallback());
long pid = (long)getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
- SALOMEDSImpl_Study* local_impl = _impl.operator->();
- return ((CORBA::LongLong)local_impl);
+ return ((CORBA::LongLong)_impl);
}
{
private:
CORBA::ORB_ptr _orb;
- Handle(SALOMEDSImpl_Study) _impl;
+ SALOMEDSImpl_Study* _impl;
SALOMEDS_StudyBuilder_i* _builder;
public:
//! standard constructor
- SALOMEDS_Study_i(const Handle(SALOMEDSImpl_Study), CORBA::ORB_ptr);
+ SALOMEDS_Study_i(SALOMEDSImpl_Study*, CORBA::ORB_ptr);
//! standard destructor
virtual ~SALOMEDS_Study_i();
*/
virtual CORBA::Boolean IsModified();
- //! method to set a Modified flag of a Study to True
- virtual void Modified();
-
+ //! method to set Modified flag of a Study to True
+ virtual void Modified();
//! method to get URL of the study (idem GetPersistentReference)
/*!
virtual CORBA::Short StudyId();
virtual void StudyId(CORBA::Short id);
- static SALOMEDS::Study_ptr GetStudy(const TDF_Label theLabel, CORBA::ORB_ptr orb);
+ static SALOMEDS::Study_ptr GetStudy(const DF_Label& theLabel, CORBA::ORB_ptr orb);
- static void IORUpdated(const Handle(SALOMEDSImpl_AttributeIOR) theAttribute);
+ static void IORUpdated(SALOMEDSImpl_AttributeIOR* theAttribute);
virtual void UpdateIORLabelMap(const char* anIOR, const char* aLabel);
virtual CORBA::Boolean DumpStudy(const char* thePath, const char* theBaseName, CORBA::Boolean isPublished);
- virtual Handle(SALOMEDSImpl_Study) GetImpl() { return _impl; }
+ virtual SALOMEDSImpl_Study* GetImpl() { return _impl; }
virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#include "SALOMEDS_TMPFile_i.hxx"
-#include <Handle_Standard_Type.hxx>
-#include <Standard_Transient.hxx>
-
#include <stdexcept>
-
-IMPLEMENT_STANDARD_HANDLE( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile )
-IMPLEMENT_STANDARD_RTTIEXT( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile )
-
SALOMEDS_TMPFile_i
::SALOMEDS_TMPFile_i(SALOMEDS::TMPFile* theStream):
myStream(theStream)
//-----------------------------------------------------------------------------
-IMPLEMENT_STANDARD_HANDLE( Engines_TMPFile_i, SALOMEDSImpl_TMPFile )
-IMPLEMENT_STANDARD_RTTIEXT( Engines_TMPFile_i, SALOMEDSImpl_TMPFile )
-
Engines_TMPFile_i
::Engines_TMPFile_i(Engines::TMPFile* theStream):
myStream(theStream)
//-----------------------------------------------------------------------------
-DEFINE_STANDARD_HANDLE( SALOMEDS_TMPFile_i, SALOMEDSImpl_TMPFile );
class SALOMEDS_TMPFile_i : public SALOMEDSImpl_TMPFile
{
virtual TOctet& Get(size_t);
- DEFINE_STANDARD_RTTI( SALOMEDS_TMPFile_i );
-
protected:
SALOMEDS::TMPFile_var myStream;
};
//-----------------------------------------------------------------------------
-DEFINE_STANDARD_HANDLE( Engines_TMPFile_i, SALOMEDSImpl_TMPFile );
class Engines_TMPFile_i : public SALOMEDSImpl_TMPFile
{
virtual TOctet& Get(size_t);
- DEFINE_STANDARD_RTTI( Engines_TMPFile_i );
-
protected:
Engines::TMPFile_var myStream;
};
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfIntegerAttribute.cxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#include <SALOMEDS_TableOfIntegerAttribute.ixx>
-#include <Standard_Failure.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
-
-#include <string>
-using namespace std;
-
-const Standard_GUID& SALOMEDS_TableOfIntegerAttribute::GetID()
-{
- static Standard_GUID SALOMEDS_TableOfIntegerAttributeID ("128371A0-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_TableOfIntegerAttributeID;
-}
-
-Handle(SALOMEDS_TableOfIntegerAttribute) SALOMEDS_TableOfIntegerAttribute::Set(const TDF_Label& label)
-{
- Handle(SALOMEDS_TableOfIntegerAttribute) anAttr;
- if (!label.FindAttribute(SALOMEDS_TableOfIntegerAttribute::GetID(),anAttr)) {
- anAttr = new SALOMEDS_TableOfIntegerAttribute();
- label.AddAttribute(anAttr);
- }
- return anAttr;
-}
-
-SALOMEDS_TableOfIntegerAttribute::SALOMEDS_TableOfIntegerAttribute() {
- myRows = new TColStd_HSequenceOfExtendedString();
- myCols = new TColStd_HSequenceOfExtendedString();
- myNbRows = 0;
- myNbColumns = 0;
-}
-
-void SALOMEDS_TableOfIntegerAttribute::SetNbColumns(const Standard_Integer theNbColumns)
-{
- Backup();
-
- TColStd_DataMapOfIntegerInteger aMap;
- aMap = myTable;
- myTable.Clear();
-
- TColStd_DataMapIteratorOfDataMapOfIntegerInteger anIterator(aMap);
- for(; anIterator.More(); anIterator.Next()) {
- int aRow = (int)(anIterator.Key()/myNbColumns) + 1;
- int aCol = (int)(anIterator.Key() - myNbColumns*(aRow-1));
- if(aCol == 0) { aCol = myNbColumns; aRow--; }
- if(aCol > theNbColumns) continue;
- int aKey = (aRow-1)*theNbColumns+aCol;
- myTable.Bind(aKey, anIterator.Value());
- }
-
- myNbColumns = theNbColumns;
-
- while (myCols->Length() < myNbColumns) { // append empty columns titles
- myCols->Append(TCollection_ExtendedString(""));
- }
-}
-
-void SALOMEDS_TableOfIntegerAttribute::SetTitle(const TCollection_ExtendedString& theTitle) {
- Backup();
- myTitle = theTitle;
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfIntegerAttribute::GetTitle() const {
- return myTitle;
-}
-
-void SALOMEDS_TableOfIntegerAttribute::SetRowData(const Standard_Integer theRow,
- const Handle(TColStd_HSequenceOfInteger)& theData)
-{
- if(theData->Length() > myNbColumns) SetNbColumns(theData->Length());
-
- Backup();
-
- while (myRows->Length() < theRow) { // append new row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
-
- Standard_Integer i, aShift = (theRow-1)*myNbColumns, aLength = theData->Length();
- for(i = 1; i <= aLength; i++) {
- myTable.Bind(aShift + i, theData->Value(i));
- }
-
- if(theRow > myNbRows) myNbRows = theRow;
-}
-
-Handle(TColStd_HSequenceOfInteger) SALOMEDS_TableOfIntegerAttribute::GetRowData(const Standard_Integer theRow)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger();
- Standard_Integer i, aShift = (theRow-1)*myNbColumns;
- for(i = 1; i <= myNbColumns; i++) {
- if(myTable.IsBound(aShift+i))
- aSeq->Append(myTable.Find(aShift+i));
- else
- aSeq->Append(0);
- }
-
- return aSeq;
-}
-
-void SALOMEDS_TableOfIntegerAttribute::SetRowTitle(const Standard_Integer theRow,
- const TCollection_ExtendedString& theTitle) {
- Backup();
- myRows->SetValue(theRow,theTitle);
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfIntegerAttribute::GetRowTitle(const Standard_Integer theRow) const {
- return myRows->Value(theRow);
-}
-
-
-void SALOMEDS_TableOfIntegerAttribute::SetColumnData(const Standard_Integer theColumn,
- const Handle(TColStd_HSequenceOfInteger)& theData)
-{
- if(theColumn > myNbColumns) SetNbColumns(theColumn);
-
- Backup();
-
- Standard_Integer i, aLength = theData->Length();
- for(i = 1; i <= aLength; i++) {
- myTable.Bind(myNbColumns*(i-1)+theColumn, theData->Value(i));
- }
-
- if(aLength > myNbRows) {
- myNbRows = aLength;
- while (myRows->Length() < myNbRows) { // append empty row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
- }
-}
-
-
-Handle(TColStd_HSequenceOfInteger) SALOMEDS_TableOfIntegerAttribute::GetColumnData(const Standard_Integer theColumn)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
-
- Standard_Integer i, anIndex;
- for(i = 1; i <= myNbRows; i++) {
- anIndex = myNbColumns*(i-1) + theColumn;
- if(myTable.IsBound(anIndex))
- aSeq->Append(myTable.Find(anIndex));
- else
- aSeq->Append(0);
- }
-
- return aSeq;
-}
-
-void SALOMEDS_TableOfIntegerAttribute::SetColumnTitle(const Standard_Integer theColumn,
- const TCollection_ExtendedString& theTitle) {
- Backup();
- while(myCols->Length() < theColumn) myCols->Append(TCollection_ExtendedString(""));
- myCols->SetValue(theColumn,theTitle);
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfIntegerAttribute::GetColumnTitle(const Standard_Integer theColumn) const {
- if(myCols.IsNull()) return "";
- if(myCols->Length() < theColumn) return "";
- return myCols->Value(theColumn);
-}
-
-
-Standard_Integer SALOMEDS_TableOfIntegerAttribute::GetNbRows() const
-{
- return myNbRows;
-}
-
-Standard_Integer SALOMEDS_TableOfIntegerAttribute::GetNbColumns() const
-{
- return myNbColumns;
-}
-
-void SALOMEDS_TableOfIntegerAttribute::PutValue(const Standard_Integer theValue,
- const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- if(theColumn > myNbColumns) SetNbColumns(theColumn);
-
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- myTable.Bind(anIndex, theValue);
-
- if(theRow > myNbRows) {
- while (myRows->Length() < theRow) { // append empty row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
- myNbRows = theRow;
- }
-}
-
-Standard_Boolean SALOMEDS_TableOfIntegerAttribute::HasValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- return myTable.IsBound(anIndex);
-}
-
-Standard_Integer SALOMEDS_TableOfIntegerAttribute::GetValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- if(myTable.IsBound(anIndex)) return myTable.Find(anIndex);
-
- Standard_Failure::Raise("Invalid cell index");
- return 0;
-}
-
-const Standard_GUID& SALOMEDS_TableOfIntegerAttribute::ID() const
-{
- return GetID();
-}
-
-void SALOMEDS_TableOfIntegerAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer anIndex;
- Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(with);
-
- myTable.Clear();
- myCols->Clear();
- myRows->Clear();
-
- myTable = aTable->myTable;
- myNbRows = aTable->myNbRows;
- myNbColumns = aTable->myNbColumns;
- myTitle = aTable->myTitle;
-
- for(anIndex = 1; anIndex <= aTable->GetNbRows();anIndex++)
- myRows->Append(aTable->GetRowTitle(anIndex));
-
- for(anIndex = 1; anIndex <= aTable->GetNbColumns(); anIndex++)
- myCols->Append(aTable->GetColumnTitle(anIndex));
-}
-
-Handle(TDF_Attribute) SALOMEDS_TableOfIntegerAttribute::NewEmpty() const
-{
- return new SALOMEDS_TableOfIntegerAttribute();
-}
-
-void SALOMEDS_TableOfIntegerAttribute::Paste(const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)&) const
-{
- Standard_Integer anIndex;
- Handle(SALOMEDS_TableOfIntegerAttribute) aTable = Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(into);
-
- aTable->myTable.Clear();
- aTable->myCols->Clear();
- aTable->myRows->Clear();
-
- aTable->myTable = myTable;
- aTable->myTitle = myTitle;
- aTable->myNbRows = myNbRows;
- aTable->myNbColumns = myNbColumns;
-
- for(anIndex = 1; anIndex <= GetNbRows();anIndex++)
- aTable->myRows->Append(GetRowTitle(anIndex));
- for(anIndex = 1; anIndex <= GetNbColumns(); anIndex++)
- aTable->myCols->Append(GetColumnTitle(anIndex));
-}
-
-
-Handle_TColStd_HSequenceOfInteger SALOMEDS_TableOfIntegerAttribute::GetSetRowIndices(const Standard_Integer theRow)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
-
- Standard_Integer i, aShift = myNbColumns*(theRow-1);
- for(i = 1; i <= myNbColumns; i++) {
- if(myTable.IsBound(aShift + i)) aSeq->Append(i);
- }
-
- return aSeq;
-}
-
-Handle_TColStd_HSequenceOfInteger SALOMEDS_TableOfIntegerAttribute::GetSetColumnIndices(const Standard_Integer theColumn)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
-
- Standard_Integer i, anIndex;
- for(i = 1; i <= myNbRows; i++) {
- anIndex = myNbColumns*(i-1)+theColumn;
- if(myTable.IsBound(anIndex)) aSeq->Append(i);
- }
-
- return aSeq;
-}
-
-
-void SALOMEDS_TableOfIntegerAttribute::ConvertToString(ostrstream& theStream)
-{
- int i, j, l;
-
- theStream.precision(64);
-
- //Title
- l = myTitle.Length();
- theStream << l << "\n";
- for(i=1; i<=l; i++)
- theStream << myTitle.Value(i) << "\n";
-
- //Nb rows
- theStream << myNbRows << "\n";
-
- //Rows titles
- for(i=1; i<=myNbRows; i++) {
- l = myRows->Value(i).Length();
- theStream << l << "\n";
- for(j=1; j<=l; j++)
- theStream << myRows->Value(i).Value(j) << "\n";
- }
-
- //Nb columns
- theStream << myNbColumns << "\n";
-
- //Columns titles
- for(i=1; i<=myNbColumns; i++) {
- l = myCols->Value(i).Length();
- theStream << l << "\n";
- for(j=1; j<=l; j++)
- theStream << myCols->Value(i).Value(j) << "\n";
- }
-
- //Store the table values
- l = myTable.Extent();
- theStream << l << "\n";
- TColStd_DataMapIteratorOfDataMapOfIntegerInteger anIterator(myTable);
- for(; anIterator.More(); anIterator.Next()) {
- theStream << anIterator.Key() << "\n";
- theStream << anIterator.Value() << "\n";
- }
-
- return;
-}
-
-bool SALOMEDS_TableOfIntegerAttribute::RestoreFromString(istrstream& theStream)
-{
- Backup();
-
- int i, j, l;
-
- Standard_ExtCharacter anExtChar;
- TCollection_ExtendedString aStr;
-
- //Title
- theStream >> l;
-
- myTitle = TCollection_ExtendedString(l, 0);
- for(i=1; i<=l; i++) {
- theStream >> anExtChar;
- myTitle.SetValue(i, anExtChar);
- }
-
- //Nb rows
- theStream >> myNbRows;
-
- //Rows titles
- myRows->Clear();
- for(i=1; i<=myNbRows; i++) {
- theStream >> l;
- aStr = TCollection_ExtendedString(l,0);
- for(j=1; j<=l; j++) {
- theStream >> anExtChar;
- aStr.SetValue(j, anExtChar);
- }
- myRows->Append(aStr);
- }
-
- //Nb columns
- theStream >> myNbColumns;
-
- //Columns titles
- myCols->Clear();
- for(i=1; i<=myNbColumns; i++) {
- theStream >> l;
- aStr = TCollection_ExtendedString(l,0);
- for(j=1; j<=l; j++) {
- theStream >> anExtChar;
- aStr.SetValue(j, anExtChar);
- }
- myCols->Append(aStr);
- }
-
- //Restore the table values
- theStream >> l;
- myTable.Clear();
- for(i=1; i<=l; i++) {
- int aKey, aValue;
- theStream >> aKey;
- theStream >> aValue;
- myTable.Bind(aKey, aValue);
- }
-
- return true;
-}
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfIntegerAttribute.hxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_TableOfIntegerAttribute_HeaderFile
-#define _SALOMEDS_TableOfIntegerAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_TableOfIntegerAttribute_HeaderFile
-#include <Handle_SALOMEDS_TableOfIntegerAttribute.hxx>
-#endif
-
-#ifndef _TColStd_SequenceOfTransient_HeaderFile
-#include <TColStd_SequenceOfTransient.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
-#include <Handle_TColStd_HSequenceOfExtendedString.hxx>
-#endif
-
-#ifndef _TColStd_DataMapOfIntegerInteger_HeaderFile
-#include <TColStd_DataMapOfIntegerInteger.hxx>
-#endif
-
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-#ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
-#include <Handle_TColStd_HSequenceOfInteger.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class TColStd_HSequenceOfExtendedString;
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TColStd_HSequenceOfInteger;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-#include <strstream>
-
-class SALOMEDS_TableOfIntegerAttribute : public TDF_Attribute {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_TableOfIntegerAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_TableOfIntegerAttribute();
-Standard_EXPORT void SetNbColumns(const Standard_Integer theNbColumns);
-Standard_EXPORT void SetTitle(const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetTitle() const;
-Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfInteger)& theData) ;
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetRowData(const Standard_Integer theRow) ;
-Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
-Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfInteger)& theData) ;
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetColumnData(const Standard_Integer theColumn) ;
-Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
-Standard_EXPORT Standard_Integer GetNbRows() const;
-Standard_EXPORT Standard_Integer GetNbColumns() const;
-
-Standard_EXPORT void PutValue(const Standard_Integer theValue,const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT Standard_Boolean HasValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT Standard_Integer GetValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
-
-Standard_EXPORT void ConvertToString(ostrstream& theStream);
-Standard_EXPORT bool RestoreFromString(istrstream& theStream);
-
-Standard_EXPORT ~SALOMEDS_TableOfIntegerAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TableOfIntegerAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TColStd_DataMapOfIntegerInteger myTable;
-TCollection_ExtendedString myTitle;
-Handle_TColStd_HSequenceOfExtendedString myRows;
-Handle_TColStd_HSequenceOfExtendedString myCols;
-Standard_Integer myNbRows;
-Standard_Integer myNbColumns;
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfIntegerAttribute.ixx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#include <SALOMEDS_TableOfIntegerAttribute.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_TableOfIntegerAttribute::~SALOMEDS_TableOfIntegerAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_TableOfIntegerAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_TableOfIntegerAttribute",
- sizeof(SALOMEDS_TableOfIntegerAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_TableOfIntegerAttribute) Handle(SALOMEDS_TableOfIntegerAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_TableOfIntegerAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_TableOfIntegerAttribute))) {
- _anOtherObject = Handle(SALOMEDS_TableOfIntegerAttribute)((Handle(SALOMEDS_TableOfIntegerAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_TableOfIntegerAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_TableOfIntegerAttribute) ;
-}
-Standard_Boolean SALOMEDS_TableOfIntegerAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_TableOfIntegerAttribute) == AType || TDF_Attribute::IsKind(AType));
-}
-Handle_SALOMEDS_TableOfIntegerAttribute::~Handle_SALOMEDS_TableOfIntegerAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfIntegerAttribute.jxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _TColStd_HSequenceOfExtendedString_HeaderFile
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TColStd_HSequenceOfInteger_HeaderFile
-#include <TColStd_HSequenceOfInteger.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_TableOfIntegerAttribute_HeaderFile
-#include <SALOMEDS_TableOfIntegerAttribute.hxx>
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfRealAttribute.cxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#include <SALOMEDS_TableOfRealAttribute.ixx>
-#include <Standard_Failure.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfIntegerReal.hxx>
-
-#include <string>
-#include <stdio.h>
-using namespace std;
-
-const Standard_GUID& SALOMEDS_TableOfRealAttribute::GetID()
-{
- static Standard_GUID SALOMEDS_TableOfRealAttributeID ("128371A1-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_TableOfRealAttributeID;
-}
-
-Handle(SALOMEDS_TableOfRealAttribute) SALOMEDS_TableOfRealAttribute::Set(const TDF_Label& label)
-{
- Handle(SALOMEDS_TableOfRealAttribute) anAttr;
- if (!label.FindAttribute(SALOMEDS_TableOfRealAttribute::GetID(),anAttr)) {
- anAttr = new SALOMEDS_TableOfRealAttribute();
- label.AddAttribute(anAttr);
- }
- return anAttr;
-}
-
-SALOMEDS_TableOfRealAttribute::SALOMEDS_TableOfRealAttribute() {
- myRows = new TColStd_HSequenceOfExtendedString();
- myCols = new TColStd_HSequenceOfExtendedString();
- myNbRows = 0;
- myNbColumns = 0;
-}
-
-void SALOMEDS_TableOfRealAttribute::SetNbColumns(const Standard_Integer theNbColumns)
-{
- Backup();
-
- TColStd_DataMapOfIntegerReal aMap;
- aMap = myTable;
- myTable.Clear();
-
- TColStd_DataMapIteratorOfDataMapOfIntegerReal anIterator(aMap);
- for(; anIterator.More(); anIterator.Next()) {
- int aRow = (int)(anIterator.Key()/myNbColumns) + 1;
- int aCol = (int)(anIterator.Key() - myNbColumns*(aRow-1));
- if(aCol == 0) { aCol = myNbColumns; aRow--; }
- if(aCol > theNbColumns) continue;
- int aKey = (aRow-1)*theNbColumns+aCol;
- myTable.Bind(aKey, anIterator.Value());
- }
-
- myNbColumns = theNbColumns;
-
- while (myCols->Length() < myNbColumns) { // append empty columns titles
- myCols->Append(TCollection_ExtendedString(""));
- }
-}
-
-void SALOMEDS_TableOfRealAttribute::SetTitle(const TCollection_ExtendedString& theTitle) {
- Backup();
- myTitle = theTitle;
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfRealAttribute::GetTitle() const {
- return myTitle;
-}
-
-void SALOMEDS_TableOfRealAttribute::SetRowData(const Standard_Integer theRow,
- const Handle(TColStd_HSequenceOfReal)& theData)
-{
- if(theData->Length() > myNbColumns) SetNbColumns(theData->Length());
-
- Backup();
-
- while (myRows->Length() < theRow) { // append new row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
-
- Standard_Integer i, aShift = (theRow-1)*myNbColumns, aLength = theData->Length();
- for(i = 1; i <= aLength; i++) {
- myTable.Bind(aShift + i, theData->Value(i));
- }
-
- if(theRow > myNbRows) myNbRows = theRow;
-}
-
-Handle(TColStd_HSequenceOfReal) SALOMEDS_TableOfRealAttribute::GetRowData(const Standard_Integer theRow)
-{
- Handle(TColStd_HSequenceOfReal) aSeq = new TColStd_HSequenceOfReal();
- Standard_Integer i, aShift = (theRow-1)*myNbColumns;
- for(i = 1; i <= myNbColumns; i++) {
- if(myTable.IsBound(aShift+i))
- aSeq->Append(myTable.Find(aShift+i));
- else
- aSeq->Append(0.);
- }
-
- return aSeq;
-}
-
-void SALOMEDS_TableOfRealAttribute::SetRowTitle(const Standard_Integer theRow,
- const TCollection_ExtendedString& theTitle) {
- Backup();
- myRows->SetValue(theRow,theTitle);
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfRealAttribute::GetRowTitle(const Standard_Integer theRow) const {
- return myRows->Value(theRow);
-}
-
-
-void SALOMEDS_TableOfRealAttribute::SetColumnData(const Standard_Integer theColumn,
- const Handle(TColStd_HSequenceOfReal)& theData)
-{
- if(theColumn > myNbColumns) SetNbColumns(theColumn);
-
- Backup();
-
- Standard_Integer i, aLength = theData->Length();
- for(i = 1; i <= aLength; i++) {
- myTable.Bind(myNbColumns*(i-1)+theColumn, theData->Value(i));
- }
-
- if(aLength > myNbRows) {
- myNbRows = aLength;
- while (myRows->Length() < myNbRows) { // append empty row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
- }
-}
-
-
-Handle(TColStd_HSequenceOfReal) SALOMEDS_TableOfRealAttribute::GetColumnData(const Standard_Integer theColumn)
-{
- Handle(TColStd_HSequenceOfReal) aSeq = new TColStd_HSequenceOfReal;
-
- Standard_Integer i, anIndex;
- for(i = 1; i <= myNbRows; i++) {
- anIndex = myNbColumns*(i-1) + theColumn;
- if(myTable.IsBound(anIndex))
- aSeq->Append(myTable.Find(anIndex));
- else
- aSeq->Append(0.);
- }
-
- return aSeq;
-}
-
-void SALOMEDS_TableOfRealAttribute::SetColumnTitle(const Standard_Integer theColumn,
- const TCollection_ExtendedString& theTitle) {
- Backup();
- while(myCols->Length() < theColumn) myCols->Append(TCollection_ExtendedString(""));
- myCols->SetValue(theColumn,theTitle);
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfRealAttribute::GetColumnTitle(const Standard_Integer theColumn) const {
- if(myCols.IsNull()) return "";
- if(myCols->Length() < theColumn) return "";
- return myCols->Value(theColumn);
-}
-
-
-Standard_Integer SALOMEDS_TableOfRealAttribute::GetNbRows() const
-{
- return myNbRows;
-}
-
-Standard_Integer SALOMEDS_TableOfRealAttribute::GetNbColumns() const
-{
- return myNbColumns;
-}
-
-void SALOMEDS_TableOfRealAttribute::PutValue(const Standard_Real theValue,
- const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- if(theColumn > myNbColumns) SetNbColumns(theColumn);
-
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- myTable.Bind(anIndex, theValue);
-
- if(theRow > myNbRows) {
- while (myRows->Length() < theRow) { // append empty row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
- myNbRows = theRow;
- }
-}
-
-Standard_Boolean SALOMEDS_TableOfRealAttribute::HasValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- return myTable.IsBound(anIndex);
-}
-
-Standard_Real SALOMEDS_TableOfRealAttribute::GetValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- if(myTable.IsBound(anIndex)) return myTable.Find(anIndex);
-
- Standard_Failure::Raise("Invalid cell index");
- return 0.;
-}
-
-const Standard_GUID& SALOMEDS_TableOfRealAttribute::ID() const
-{
- return GetID();
-}
-
-void SALOMEDS_TableOfRealAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer anIndex;
- Handle(SALOMEDS_TableOfRealAttribute) aTable = Handle(SALOMEDS_TableOfRealAttribute)::DownCast(with);
-
- myTable.Clear();
- myCols->Clear();
- myRows->Clear();
-
- myTable = aTable->myTable;
- myNbRows = aTable->myNbRows;
- myNbColumns = aTable->myNbColumns;
- myTitle = aTable->myTitle;
-
- for(anIndex = 1; anIndex <= aTable->GetNbRows();anIndex++)
- myRows->Append(aTable->GetRowTitle(anIndex));
-
- for(anIndex = 1; anIndex <= aTable->GetNbColumns(); anIndex++)
- myCols->Append(aTable->GetColumnTitle(anIndex));
-}
-
-Handle(TDF_Attribute) SALOMEDS_TableOfRealAttribute::NewEmpty() const
-{
- return new SALOMEDS_TableOfRealAttribute();
-}
-
-void SALOMEDS_TableOfRealAttribute::Paste(const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)&) const
-{
- Standard_Integer anIndex;
- Handle(SALOMEDS_TableOfRealAttribute) aTable = Handle(SALOMEDS_TableOfRealAttribute)::DownCast(into);
-
- aTable->myTable.Clear();
- aTable->myCols->Clear();
- aTable->myRows->Clear();
-
- aTable->myTable = myTable;
- aTable->myTitle = myTitle;
- aTable->myNbRows = myNbRows;
- aTable->myNbColumns = myNbColumns;
-
- for(anIndex = 1; anIndex <= GetNbRows();anIndex++)
- aTable->myRows->Append(GetRowTitle(anIndex));
- for(anIndex = 1; anIndex <= GetNbColumns(); anIndex++)
- aTable->myCols->Append(GetColumnTitle(anIndex));
-}
-
-
-Handle_TColStd_HSequenceOfInteger SALOMEDS_TableOfRealAttribute::GetSetRowIndices(const Standard_Integer theRow)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
-
- Standard_Integer i, aShift = myNbColumns*(theRow-1);
- for(i = 1; i <= myNbColumns; i++) {
- if(myTable.IsBound(aShift + i)) aSeq->Append(i);
- }
-
- return aSeq;
-}
-
-Handle_TColStd_HSequenceOfInteger SALOMEDS_TableOfRealAttribute::GetSetColumnIndices(const Standard_Integer theColumn)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
-
- Standard_Integer i, anIndex;
- for(i = 1; i <= myNbRows; i++) {
- anIndex = myNbColumns*(i-1)+theColumn;
- if(myTable.IsBound(anIndex)) aSeq->Append(i);
- }
-
- return aSeq;
-}
-
-
-
-void SALOMEDS_TableOfRealAttribute::ConvertToString(ostrstream& theStream)
-{
- int i, j, l;
-
-
- //Title
- l = myTitle.Length();
- theStream << l << "\n";
- for(i=1; i<=l; i++)
- theStream << myTitle.Value(i) << "\n";
-
- //Nb rows
- theStream << myNbRows << "\n";
-
- //Rows titles
- for(i=1; i<=myNbRows; i++) {
- l = myRows->Value(i).Length();
- theStream << l << "\n";
- for(j=1; j<=l; j++)
- theStream << myRows->Value(i).Value(j) << "\n";
- }
-
- //Nb columns
- theStream << myNbColumns << "\n";
-
- //Columns titles
- for(i=1; i<=myNbColumns; i++) {
- l = myCols->Value(i).Length();
- theStream << l << "\n";
- for(j=1; j<=l; j++)
- theStream << myCols->Value(i).Value(j) << "\n";
- }
-
- //Store the table values
- l = myTable.Extent();
- theStream << l << "\n";
- char *aBuffer = new char[128];
- TColStd_DataMapIteratorOfDataMapOfIntegerReal anIterator(myTable);
- for(; anIterator.More(); anIterator.Next()) {
- theStream << anIterator.Key() << "\n";
- sprintf(aBuffer, "%.64e", anIterator.Value());
- theStream << aBuffer << "\n";
- }
-
- delete []aBuffer;
-
- return;
-}
-
-bool SALOMEDS_TableOfRealAttribute::RestoreFromString(istrstream& theStream)
-{
- Backup();
-
- int i, j, l;
-
- Standard_ExtCharacter anExtChar;
- TCollection_ExtendedString aStr;
-
- //Title
- theStream >> l;
-
- myTitle = TCollection_ExtendedString(l, 0);
- for(i=1; i<=l; i++) {
- theStream >> anExtChar;
- myTitle.SetValue(i, anExtChar);
- }
-
- //Nb rows
- theStream >> myNbRows;
-
- //Rows titles
- myRows->Clear();
- for(i=1; i<=myNbRows; i++) {
- theStream >> l;
- aStr = TCollection_ExtendedString(l,0);
- for(j=1; j<=l; j++) {
- theStream >> anExtChar;
- aStr.SetValue(j, anExtChar);
- }
- myRows->Append(aStr);
- }
-
- //Nb columns
- theStream >> myNbColumns;
-
- //Columns titles
- myCols->Clear();
- for(i=1; i<=myNbColumns; i++) {
- theStream >> l;
- aStr = TCollection_ExtendedString(l,0);
- for(j=1; j<=l; j++) {
- theStream >> anExtChar;
- aStr.SetValue(j, anExtChar);
- }
- myCols->Append(aStr);
- }
-
- //Restore the table values
- theStream >> l;
- myTable.Clear();
- for(i=1; i<=l; i++) {
- Standard_Integer aKey;
- Standard_Real aValue;
- theStream >> aKey;
- theStream >> aValue;
- myTable.Bind(aKey, aValue);
- }
-
- return true;
-}
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfRealAttribute.hxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_TableOfRealAttribute_HeaderFile
-#define _SALOMEDS_TableOfRealAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_TableOfRealAttribute_HeaderFile
-#include <Handle_SALOMEDS_TableOfRealAttribute.hxx>
-#endif
-
-#ifndef _TColStd_SequenceOfTransient_HeaderFile
-#include <TColStd_SequenceOfTransient.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
-#include <Handle_TColStd_HSequenceOfExtendedString.hxx>
-#endif
-
-#ifndef _TColStd_DataMapOfIntegerReal_HeaderFile
-#include <TColStd_DataMapOfIntegerReal.hxx>
-#endif
-
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
-#include <Handle_TColStd_HSequenceOfInteger.hxx>
-#endif
-
-#ifndef TColStd_HSequenceOfInteger_HeaderFile
-#include <TColStd_HSequenceOfInteger.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HSequenceOfReal_HeaderFile
-#include <Handle_TColStd_HSequenceOfReal.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class TColStd_HSequenceOfExtendedString;
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TColStd_HSequenceOfReal;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-#include <strstream>
-
-class SALOMEDS_TableOfRealAttribute : public TDF_Attribute {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_TableOfRealAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_TableOfRealAttribute();
-Standard_EXPORT void SetNbColumns(const Standard_Integer theNbColumns);
-Standard_EXPORT void SetTitle(const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetTitle() const;
-Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfReal)& theData) ;
-Standard_EXPORT Handle_TColStd_HSequenceOfReal GetRowData(const Standard_Integer theRow) ;
-Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
-Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfReal)& theData) ;
-Standard_EXPORT Handle_TColStd_HSequenceOfReal GetColumnData(const Standard_Integer theColumn) ;
-Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
-Standard_EXPORT Standard_Integer GetNbRows() const;
-Standard_EXPORT Standard_Integer GetNbColumns() const;
-
-Standard_EXPORT void PutValue(const Standard_Real theValue,const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT Standard_Boolean HasValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT Standard_Real GetValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
-
-Standard_EXPORT void ConvertToString(ostrstream& theStream);
-Standard_EXPORT bool RestoreFromString(istrstream& theStream);
-
-Standard_EXPORT ~SALOMEDS_TableOfRealAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TableOfRealAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TColStd_DataMapOfIntegerReal myTable;
-TCollection_ExtendedString myTitle;
-Handle_TColStd_HSequenceOfExtendedString myRows;
-Handle_TColStd_HSequenceOfExtendedString myCols;
-Standard_Integer myNbRows;
-Standard_Integer myNbColumns;
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfRealAttribute.ixx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#include <SALOMEDS_TableOfRealAttribute.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_TableOfRealAttribute::~SALOMEDS_TableOfRealAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_TableOfRealAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_TableOfRealAttribute",
- sizeof(SALOMEDS_TableOfRealAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_TableOfRealAttribute) Handle(SALOMEDS_TableOfRealAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_TableOfRealAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_TableOfRealAttribute))) {
- _anOtherObject = Handle(SALOMEDS_TableOfRealAttribute)((Handle(SALOMEDS_TableOfRealAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_TableOfRealAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_TableOfRealAttribute) ;
-}
-Standard_Boolean SALOMEDS_TableOfRealAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_TableOfRealAttribute) == AType || TDF_Attribute::IsKind(AType));
-}
-Handle_SALOMEDS_TableOfRealAttribute::~Handle_SALOMEDS_TableOfRealAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfRealAttribute.jxx
-// Author : Michael Ponikarov
-// Module : SALOME
-// $Header$
-
-#ifndef _TColStd_HSequenceOfExtendedString_HeaderFile
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TColStd_HSequenceOfReal_HeaderFile
-#include <TColStd_HSequenceOfReal.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_TableOfRealAttribute_HeaderFile
-#include <SALOMEDS_TableOfRealAttribute.hxx>
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfStringAttribute.cxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#include <SALOMEDS_TableOfStringAttribute.ixx>
-#include <Standard_Failure.hxx>
-#include <SALOMEDS_DataMapIteratorOfDataMapOfIntegerString.hxx>
-
-#include <string>
-#include <stdio.h>
-using namespace std;
-
-const Standard_GUID& SALOMEDS_TableOfStringAttribute::GetID()
-{
- static Standard_GUID SALOMEDS_TableOfStringAttributeID ("128371A4-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_TableOfStringAttributeID;
-}
-
-Handle(SALOMEDS_TableOfStringAttribute) SALOMEDS_TableOfStringAttribute::Set(const TDF_Label& label)
-{
- Handle(SALOMEDS_TableOfStringAttribute) anAttr;
- if (!label.FindAttribute(SALOMEDS_TableOfStringAttribute::GetID(),anAttr)) {
- anAttr = new SALOMEDS_TableOfStringAttribute();
- label.AddAttribute(anAttr);
- }
- return anAttr;
-}
-
-SALOMEDS_TableOfStringAttribute::SALOMEDS_TableOfStringAttribute() {
- myRows = new TColStd_HSequenceOfExtendedString();
- myCols = new TColStd_HSequenceOfExtendedString();
- myNbRows = 0;
- myNbColumns = 0;
-}
-
-void SALOMEDS_TableOfStringAttribute::SetNbColumns(const Standard_Integer theNbColumns)
-{
- Backup();
-
- SALOMEDS_DataMapOfIntegerString aMap;
- aMap = myTable;
- myTable.Clear();
-
- SALOMEDS_DataMapIteratorOfDataMapOfIntegerString anIterator(aMap);
- for(; anIterator.More(); anIterator.Next()) {
- int aRow = (int)(anIterator.Key()/myNbColumns) + 1;
- int aCol = (int)(anIterator.Key() - myNbColumns*(aRow-1));
- if(aCol == 0) { aCol = myNbColumns; aRow--; }
- if(aCol > theNbColumns) continue;
- int aKey = (aRow-1)*theNbColumns+aCol;
- myTable.Bind(aKey, anIterator.Value());
- }
-
- myNbColumns = theNbColumns;
-
- while (myCols->Length() < myNbColumns) { // append empty columns titles
- myCols->Append(TCollection_ExtendedString(""));
- }
-}
-
-void SALOMEDS_TableOfStringAttribute::SetTitle(const TCollection_ExtendedString& theTitle) {
- Backup();
- myTitle = theTitle;
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfStringAttribute::GetTitle() const {
- return myTitle;
-}
-
-void SALOMEDS_TableOfStringAttribute::SetRowData(const Standard_Integer theRow,
- const Handle(TColStd_HSequenceOfExtendedString)& theData)
-{
- if(theData->Length() > myNbColumns) SetNbColumns(theData->Length());
-
- Backup();
-
- while (myRows->Length() < theRow) { // append new row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
-
- Standard_Integer i, aShift = (theRow-1)*myNbColumns, aLength = theData->Length();
- for(i = 1; i <= aLength; i++) {
- myTable.Bind(aShift + i, theData->Value(i));
- }
-
- if(theRow > myNbRows) myNbRows = theRow;
-}
-
-Handle(TColStd_HSequenceOfExtendedString) SALOMEDS_TableOfStringAttribute::GetRowData(const Standard_Integer theRow)
-{
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString();
- Standard_Integer i, aShift = (theRow-1)*myNbColumns;
- for(i = 1; i <= myNbColumns; i++) {
- if(myTable.IsBound(aShift+i))
- aSeq->Append(myTable.Find(aShift+i));
- else
- aSeq->Append(0.);
- }
-
- return aSeq;
-}
-
-void SALOMEDS_TableOfStringAttribute::SetRowTitle(const Standard_Integer theRow,
- const TCollection_ExtendedString& theTitle) {
- Backup();
- myRows->SetValue(theRow,theTitle);
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfStringAttribute::GetRowTitle(const Standard_Integer theRow) const {
- return myRows->Value(theRow);
-}
-
-
-void SALOMEDS_TableOfStringAttribute::SetColumnData(const Standard_Integer theColumn,
- const Handle(TColStd_HSequenceOfExtendedString)& theData)
-{
- if(theColumn > myNbColumns) SetNbColumns(theColumn);
-
- Backup();
-
- Standard_Integer i, aLength = theData->Length();
- for(i = 1; i <= aLength; i++) {
- myTable.Bind(myNbColumns*(i-1)+theColumn, theData->Value(i));
- }
-
- if(aLength > myNbRows) {
- myNbRows = aLength;
- while (myRows->Length() < myNbRows) { // append empty row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
- }
-}
-
-
-Handle(TColStd_HSequenceOfExtendedString) SALOMEDS_TableOfStringAttribute::GetColumnData(const Standard_Integer theColumn)
-{
- Handle(TColStd_HSequenceOfExtendedString) aSeq = new TColStd_HSequenceOfExtendedString;
-
- Standard_Integer i, anIndex;
- for(i = 1; i <= myNbRows; i++) {
- anIndex = myNbColumns*(i-1) + theColumn;
- if(myTable.IsBound(anIndex))
- aSeq->Append(myTable.Find(anIndex));
- else
- aSeq->Append(0.);
- }
-
- return aSeq;
-}
-
-void SALOMEDS_TableOfStringAttribute::SetColumnTitle(const Standard_Integer theColumn,
- const TCollection_ExtendedString& theTitle) {
- Backup();
- while(myCols->Length() < theColumn) myCols->Append(TCollection_ExtendedString(""));
- myCols->SetValue(theColumn,theTitle);
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfStringAttribute::GetColumnTitle(const Standard_Integer theColumn) const {
- if(myCols.IsNull()) return "";
- if(myCols->Length() < theColumn) return "";
- return myCols->Value(theColumn);
-}
-
-
-Standard_Integer SALOMEDS_TableOfStringAttribute::GetNbRows() const
-{
- return myNbRows;
-}
-
-Standard_Integer SALOMEDS_TableOfStringAttribute::GetNbColumns() const
-{
- return myNbColumns;
-}
-
-void SALOMEDS_TableOfStringAttribute::PutValue(const TCollection_ExtendedString& theValue,
- const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- if(theColumn > myNbColumns) SetNbColumns(theColumn);
-
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- myTable.Bind(anIndex, theValue);
-
- if(theRow > myNbRows) {
- while (myRows->Length() < theRow) { // append empty row titles
- myRows->Append(TCollection_ExtendedString(""));
- }
- myNbRows = theRow;
- }
-}
-
-Standard_Boolean SALOMEDS_TableOfStringAttribute::HasValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- return myTable.IsBound(anIndex);
-}
-
-TCollection_ExtendedString SALOMEDS_TableOfStringAttribute::GetValue(const Standard_Integer theRow,
- const Standard_Integer theColumn)
-{
- Standard_Integer anIndex = (theRow-1)*myNbColumns + theColumn;
- if(myTable.IsBound(anIndex)) return myTable.Find(anIndex);
-
- Standard_Failure::Raise("Invalid cell index");
- return 0.;
-}
-
-const Standard_GUID& SALOMEDS_TableOfStringAttribute::ID() const
-{
- return GetID();
-}
-
-void SALOMEDS_TableOfStringAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Standard_Integer anIndex;
- Handle(SALOMEDS_TableOfStringAttribute) aTable = Handle(SALOMEDS_TableOfStringAttribute)::DownCast(with);
-
- myTable.Clear();
- myCols->Clear();
- myRows->Clear();
-
- myTable = aTable->myTable;
- myNbRows = aTable->myNbRows;
- myNbColumns = aTable->myNbColumns;
- myTitle = aTable->myTitle;
-
- for(anIndex = 1; anIndex <= aTable->GetNbRows();anIndex++)
- myRows->Append(aTable->GetRowTitle(anIndex));
-
- for(anIndex = 1; anIndex <= aTable->GetNbColumns(); anIndex++)
- myCols->Append(aTable->GetColumnTitle(anIndex));
-}
-
-Handle(TDF_Attribute) SALOMEDS_TableOfStringAttribute::NewEmpty() const
-{
- return new SALOMEDS_TableOfStringAttribute();
-}
-
-void SALOMEDS_TableOfStringAttribute::Paste(const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)&) const
-{
- Standard_Integer anIndex;
- Handle(SALOMEDS_TableOfStringAttribute) aTable = Handle(SALOMEDS_TableOfStringAttribute)::DownCast(into);
-
- aTable->myTable.Clear();
- aTable->myCols->Clear();
- aTable->myRows->Clear();
-
- aTable->myTable = myTable;
- aTable->myTitle = myTitle;
- aTable->myNbRows = myNbRows;
- aTable->myNbColumns = myNbColumns;
-
- for(anIndex = 1; anIndex <= GetNbRows();anIndex++)
- aTable->myRows->Append(GetRowTitle(anIndex));
- for(anIndex = 1; anIndex <= GetNbColumns(); anIndex++)
- aTable->myCols->Append(GetColumnTitle(anIndex));
-}
-
-
-Handle_TColStd_HSequenceOfInteger SALOMEDS_TableOfStringAttribute::GetSetRowIndices(const Standard_Integer theRow)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
-
- Standard_Integer i, aShift = myNbColumns*(theRow-1);
- for(i = 1; i <= myNbColumns; i++) {
- if(myTable.IsBound(aShift + i)) aSeq->Append(i);
- }
-
- return aSeq;
-}
-
-Handle_TColStd_HSequenceOfInteger SALOMEDS_TableOfStringAttribute::GetSetColumnIndices(const Standard_Integer theColumn)
-{
- Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger;
-
- Standard_Integer i, anIndex;
- for(i = 1; i <= myNbRows; i++) {
- anIndex = myNbColumns*(i-1)+theColumn;
- if(myTable.IsBound(anIndex)) aSeq->Append(i);
- }
-
- return aSeq;
-}
-
-
-
-void SALOMEDS_TableOfStringAttribute::ConvertToString(ostrstream& theStream)
-{
- int i, j, l;
-
- //Title
- l = myTitle.Length();
- theStream << l << "\n";
- for(i=1; i<=l; i++)
- theStream << myTitle.Value(i) << "\n";
-
- //Nb rows
- theStream << myNbRows << "\n";
-
- //Rows titles
- for(i=1; i<=myNbRows; i++) {
- l = myRows->Value(i).Length();
- theStream << l << "\n";
- for(j=1; j<=l; j++)
- theStream << myRows->Value(i).Value(j) << "\n";
- }
-
- //Nb columns
- theStream << myNbColumns << "\n";
-
- //Columns titles
- for(i=1; i<=myNbColumns; i++) {
- l = myCols->Value(i).Length();
- theStream << l << "\n";
- for(j=1; j<=l; j++)
- theStream << myCols->Value(i).Value(j) << "\n";
- }
-
- //Store the table values
- l = myTable.Extent();
- theStream << l << "\n";
- SALOMEDS_DataMapIteratorOfDataMapOfIntegerString anIterator(myTable);
- for(; anIterator.More(); anIterator.Next()) {
- if (anIterator.Value().Length()) { // check empty string in the value table
- theStream << anIterator.Key() << "\n";
- unsigned long aValueSize = anIterator.Value().Length();
- theStream<<aValueSize << "\n";
- theStream.write((TCollection_AsciiString(anIterator.Value()).ToCString()),aValueSize);
- theStream<<"\n";
- } else { // write index only of kind: "0key"; "05", for an example
- theStream << "0" << anIterator.Key() << "\n";
- }
- }
- return;
-}
-
-bool SALOMEDS_TableOfStringAttribute::RestoreFromString(istrstream& theStream)
-{
- Backup();
-
- theStream.seekg(0, ios::end);
- long aSize = theStream.tellg();
- theStream.seekg(0, ios::beg);
-
- int i, j, l;
- char *aValueString = new char[aSize];
-
- Standard_ExtCharacter anExtChar;
- TCollection_ExtendedString aStr;
-
- //Title
- theStream >> l;
-
- myTitle = TCollection_ExtendedString(l, 0);
- for(i=1; i<=l; i++) {
- theStream >> anExtChar;
- myTitle.SetValue(i, anExtChar);
- }
-
- //Nb rows
- theStream >> myNbRows;
-
- //Rows titles
- myRows->Clear();
- for(i=1; i<=myNbRows; i++) {
- theStream >> l;
- aStr = TCollection_ExtendedString(l,0);
- for(j=1; j<=l; j++) {
- theStream >> anExtChar;
- aStr.SetValue(j, anExtChar);
- }
- myRows->Append(aStr);
- }
-
- //Nb columns
- theStream >> myNbColumns;
-
- //Columns titles
- myCols->Clear();
- for(i=1; i<=myNbColumns; i++) {
- theStream >> l;
- aStr = TCollection_ExtendedString(l,0);
- for(j=1; j<=l; j++) {
- theStream >> anExtChar;
- aStr.SetValue(j, anExtChar);
- }
- myCols->Append(aStr);
- }
-
- //Restore the table values
- TCollection_AsciiString aValue;
- theStream >> l;
- myTable.Clear();
- theStream.getline(aValueString,aSize,'\n');
- for(i=1; i<=l; i++) {
- Standard_Integer aKey;
-
- theStream.getline(aValueString,aSize,'\n');
- aValue = aValueString;
- aKey = aValue.IntegerValue();
- if (aValue.Value(1) == '0')
- aValue = "";
- else {
- unsigned long aValueSize;
- theStream >> aValueSize;
- theStream.read(aValueString, 1); // an '\n' omitting
- theStream.read(aValueString, aValueSize);
- theStream.read(aValueString, 1); // an '\n' omitting
- aValue = aValueString;
- }
- myTable.Bind(aKey, aValue);
- }
- delete(aValueString);
- return true;
-}
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfStringAttribute.hxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#ifndef _SALOMEDS_TableOfStringAttribute_HeaderFile
-#define _SALOMEDS_TableOfStringAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_TableOfStringAttribute_HeaderFile
-#include <Handle_SALOMEDS_TableOfStringAttribute.hxx>
-#endif
-
-#ifndef _TColStd_SequenceOfTransient_HeaderFile
-#include <TColStd_SequenceOfTransient.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
-#include <Handle_TColStd_HSequenceOfExtendedString.hxx>
-#endif
-
-#ifndef _SALOMEDS_DataMapOfIntegerString_HeaderFile
-#include <SALOMEDS_DataMapOfIntegerString.hxx>
-#endif
-
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include <Standard_Integer.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
-#include <Handle_TColStd_HSequenceOfInteger.hxx>
-#endif
-
-#ifndef TColStd_HSequenceOfInteger_HeaderFile
-#include <TColStd_HSequenceOfInteger.hxx>
-#endif
-
-#ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
-#include <Handle_TColStd_HSequenceOfExtendedString.hxx>
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include <Standard_Boolean.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class TColStd_HSequenceOfExtendedString;
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TColStd_HSequenceOfExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-#include <strstream>
-
-class SALOMEDS_TableOfStringAttribute : public TDF_Attribute {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_TableOfStringAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_TableOfStringAttribute();
-Standard_EXPORT void SetNbColumns(const Standard_Integer theNbColumns);
-Standard_EXPORT void SetTitle(const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetTitle() const;
-Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfExtendedString)& theData) ;
-Standard_EXPORT Handle_TColStd_HSequenceOfExtendedString GetRowData(const Standard_Integer theRow) ;
-Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
-Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfExtendedString)& theData) ;
-Standard_EXPORT Handle_TColStd_HSequenceOfExtendedString GetColumnData(const Standard_Integer theColumn) ;
-Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
-Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
-Standard_EXPORT Standard_Integer GetNbRows() const;
-Standard_EXPORT Standard_Integer GetNbColumns() const;
-
-Standard_EXPORT void PutValue(const TCollection_ExtendedString& theValue,const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT Standard_Boolean HasValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT TCollection_ExtendedString GetValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
-Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
-
-Standard_EXPORT void ConvertToString(ostrstream& theStream);
-Standard_EXPORT bool RestoreFromString(istrstream& theStream);
-
-Standard_EXPORT ~SALOMEDS_TableOfStringAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TableOfStringAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-SALOMEDS_DataMapOfIntegerString myTable;
-TCollection_ExtendedString myTitle;
-Handle_TColStd_HSequenceOfExtendedString myRows;
-Handle_TColStd_HSequenceOfExtendedString myCols;
-Standard_Integer myNbRows;
-Standard_Integer myNbColumns;
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfStringAttribute.ixx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#include <SALOMEDS_TableOfStringAttribute.jxx>
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_TableOfStringAttribute::~SALOMEDS_TableOfStringAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_TableOfStringAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDF_Attribute);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_TableOfStringAttribute",
- sizeof(SALOMEDS_TableOfStringAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_TableOfStringAttribute) Handle(SALOMEDS_TableOfStringAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_TableOfStringAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_TableOfStringAttribute))) {
- _anOtherObject = Handle(SALOMEDS_TableOfStringAttribute)((Handle(SALOMEDS_TableOfStringAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_TableOfStringAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_TableOfStringAttribute) ;
-}
-Standard_Boolean SALOMEDS_TableOfStringAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_TableOfStringAttribute) == AType || TDF_Attribute::IsKind(AType));
-}
-Handle_SALOMEDS_TableOfStringAttribute::~Handle_SALOMEDS_TableOfStringAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 CEA/DEN, EDF R&D
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File : SALOMEDS_TableOfStringAttribute.jxx
-// Author : Sergey Ruin
-// Module : SALOME
-
-#ifndef _TColStd_HSequenceOfExtendedString_HeaderFile
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#endif
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TCollection_ExtendedString_HeaderFile
-#include <TCollection_ExtendedString.hxx>
-#endif
-#ifndef _TColStd_HSequenceOfExtendedString_HeaderFile
-#include <TColStd_HSequenceOfExtendedString.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_TableOfStringAttribute_HeaderFile
-#include <SALOMEDS_TableOfStringAttribute.hxx>
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-
--- File : SALOMEDS_TargetAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class TargetAttribute from SALOMEDS inherits Relation from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- RelocationTable from TDF,
- LabelList from TDF
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- Set (myclass; label : Label from TDF)
- returns TargetAttribute from SALOMEDS;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable TargetAttribute from SALOMEDS;
-
- Append(me: mutable; theReferencedObject : mutable Label form TDF);
- Get(me; theReferencedObjects : mutable : LabelList from TDF);
- Remove(me: mutable; theReferencedObject : mutable Label form TDF);
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end TargetAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TargetAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_TargetAttribute.ixx"
-#include <TDF_Reference.hxx>
-#include <TDF_ListIteratorOfAttributeList.hxx>
-#include "utilities.h"
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_TargetAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_TargetAttributeID ("12837197-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_TargetAttributeID;
-}
-
-
-
-//=======================================================================
-//function : Set
-//purpose :
-//=======================================================================
-
-Handle(SALOMEDS_TargetAttribute) SALOMEDS_TargetAttribute::Set (const TDF_Label& L)
-{
- Handle(SALOMEDS_TargetAttribute) A;
- if (!L.FindAttribute(SALOMEDS_TargetAttribute::GetID(),A)) {
- A = new SALOMEDS_TargetAttribute();
- L.AddAttribute(A);
- }
- return A;
-}
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_TargetAttribute::SALOMEDS_TargetAttribute()
-{}
-
-//=======================================================================
-//function : Append
-//purpose :
-//=======================================================================
-
-void SALOMEDS_TargetAttribute::Append(TDF_Label& theReferencedObject) {
- Backup();
- Handle(TDF_Reference) aReference;
- if (theReferencedObject.FindAttribute(TDF_Reference::GetID(),aReference)) {
- TDF_ListIteratorOfAttributeList anIter(GetVariables());
- for(;anIter.More();anIter.Next()) if(anIter.Value()->Label() == theReferencedObject) return; //BugID: PAL6192
- GetVariables().Append(aReference);
- } else {
- MESSAGE("SALOMEDS_TargetAttribute::Append: can't append referenced object");
- }
-}
-
-//=======================================================================
-//function : Get
-//purpose :
-//=======================================================================
-void SALOMEDS_TargetAttribute::Get(TDF_LabelList& theReferencedObjects) {
- theReferencedObjects.Clear();
- TDF_ListIteratorOfAttributeList anIter(GetVariables());
- for(;anIter.More();anIter.Next()) {
- theReferencedObjects.Append(anIter.Value()->Label());
- }
-}
-
-//=======================================================================
-//function : Remove
-//purpose :
-//=======================================================================
-void SALOMEDS_TargetAttribute::Remove(TDF_Label& theReferencedObject) {
- Backup();
- TDF_ListIteratorOfAttributeList anIter(GetVariables());
- for(;anIter.More();anIter.Next()) {
- if (anIter.Value()->Label() == theReferencedObject) {
- GetVariables().Remove(anIter);
- return;
- }
- }
- MESSAGE("SALOMEDS_TargetAttribute::Remove: nothing to remove");
-}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_TargetAttribute::ID () const { return GetID(); }
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TargetAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_TargetAttribute_HeaderFile
-#define _SALOMEDS_TargetAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_TargetAttribute_HeaderFile
-#include <Handle_SALOMEDS_TargetAttribute.hxx>
-#endif
-
-#include <TDataStd_Relation.hxx>
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-#ifndef _TDF_LabelList_HeaderFile
-#include <TDF_LabelList.hxx>
-#endif
-#ifndef _Handle_TDF_Reference_HeaderFile
-#include <Handle_TDF_Reference.hxx>
-#endif
-class Standard_GUID;
-class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_TargetAttribute : public TDataStd_Relation {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT static Handle_SALOMEDS_TargetAttribute Set(const TDF_Label& label) ;
-Standard_EXPORT SALOMEDS_TargetAttribute();
-Standard_EXPORT void SALOMEDS_TargetAttribute::Append(TDF_Label& theReferencedObject);
-Standard_EXPORT void SALOMEDS_TargetAttribute::Get(TDF_LabelList& theReferencedObjects);
-Standard_EXPORT void SALOMEDS_TargetAttribute::Remove(TDF_Label& theReferencedObject);
-Standard_EXPORT const Standard_GUID& ID() const;
-
-// Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-// Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-// Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-
-Standard_EXPORT ~SALOMEDS_TargetAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TargetAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TargetAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_TargetAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_TargetAttribute::~SALOMEDS_TargetAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_TargetAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_Relation);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_Relation);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_TargetAttribute",
- sizeof(SALOMEDS_TargetAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_TargetAttribute) Handle(SALOMEDS_TargetAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_TargetAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_TargetAttribute))) {
- _anOtherObject = Handle(SALOMEDS_TargetAttribute)((Handle(SALOMEDS_TargetAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_TargetAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_TargetAttribute) ;
-}
-Standard_Boolean SALOMEDS_TargetAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_TargetAttribute) == AType || TDataStd_Relation::IsKind(AType));
-}
-Handle_SALOMEDS_TargetAttribute::~Handle_SALOMEDS_TargetAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TargetAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Label_HeaderFile
-#include <TDF_Label.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_TargetAttribute_HeaderFile
-#include "SALOMEDS_TargetAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
---
--- File : SALOMEDS_TextColorAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class TextColorAttribute from SALOMEDS inherits RealArray from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable TextColorAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end TextColorAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextColorAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_TextColorAttribute.ixx"
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_TextColorAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_TextColorAttributeID ("12837189-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_TextColorAttributeID;
-}
-
-
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_TextColorAttribute::SALOMEDS_TextColorAttribute()
-{Init(1,3);}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_TextColorAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_TextColorAttribute::NewEmpty () const
-{
- return new SALOMEDS_TextColorAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_TextColorAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Handle(TColStd_HArray1OfReal) s = Handle(TDataStd_RealArray)::DownCast (with)->Array ();
- TDataStd_RealArray::ChangeArray(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_TextColorAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_RealArray)::DownCast (into)->ChangeArray (Array());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextColorAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_TextColorAttribute_HeaderFile
-#define _SALOMEDS_TextColorAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_TextColorAttribute_HeaderFile
-#include <Handle_SALOMEDS_TextColorAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_RealArray_HeaderFile
-#include <TDataStd_RealArray.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_TextColorAttribute : public TDataStd_RealArray {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT SALOMEDS_TextColorAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_TextColorAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TextColorAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextColorAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_TextColorAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_TextColorAttribute::~SALOMEDS_TextColorAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_TextColorAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_RealArray);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_RealArray);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_TextColorAttribute",
- sizeof(SALOMEDS_TextColorAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_TextColorAttribute) Handle(SALOMEDS_TextColorAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_TextColorAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_TextColorAttribute))) {
- _anOtherObject = Handle(SALOMEDS_TextColorAttribute)((Handle(SALOMEDS_TextColorAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_TextColorAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_TextColorAttribute) ;
-}
-Standard_Boolean SALOMEDS_TextColorAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_TextColorAttribute) == AType || TDataStd_RealArray::IsKind(AType));
-}
-Handle_SALOMEDS_TextColorAttribute::~Handle_SALOMEDS_TextColorAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextColorAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_TextColorAttribute_HeaderFile
-#include "SALOMEDS_TextColorAttribute.hxx"
-#endif
+++ /dev/null
--- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
--- File : SALOMEDS_TextHighlightColorAttribute.cdl
--- Author : Yves FRICAUD
--- Module : SALOME
-
-class TextHighlightColorAttribute from SALOMEDS inherits RealArray from TDataStd
-
- ---Purpose:
-
-
-uses Attribute from TDF,
- Label from TDF,
- GUID from Standard,
- ExtendedString from TCollection,
- DataSet from TDF,
- RelocationTable from TDF,
- AttributeSequence from TDF,
- Data from TDF,
- Comment from TDataStd
-
-
-is
-
-
- ---Purpose: class methods
- -- =============
-
- GetID (myclass)
- ---C++: return const &
- returns GUID from Standard;
-
- ---Purpose: Comment methods
- -- ============
-
- Create
- returns mutable TextHighlightColorAttribute from SALOMEDS;
-
- ID (me)
- ---C++: return const &
- returns GUID from Standard;
-
- Restore (me: mutable; with : Attribute from TDF);
-
- NewEmpty (me)
- returns mutable Attribute from TDF;
-
- Paste (me; into : mutable Attribute from TDF;
- RT : mutable RelocationTable from TDF);
-
-end TextHighlightColorAttribute;
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextHighlightColorAttribute.cxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_TextHighlightColorAttribute.ixx"
-using namespace std;
-
-//=======================================================================
-//function : GetID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_TextHighlightColorAttribute::GetID ()
-{
- static Standard_GUID SALOMEDS_TextHighlightColorAttributeID ("12837190-8F52-11d6-A8A3-0001021E8C7F");
- return SALOMEDS_TextHighlightColorAttributeID;
-}
-
-
-
-//=======================================================================
-//function : constructor
-//purpose :
-//=======================================================================
-SALOMEDS_TextHighlightColorAttribute::SALOMEDS_TextHighlightColorAttribute()
-{Init(1,3);}
-
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& SALOMEDS_TextHighlightColorAttribute::ID () const { return GetID(); }
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) SALOMEDS_TextHighlightColorAttribute::NewEmpty () const
-{
- return new SALOMEDS_TextHighlightColorAttribute();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void SALOMEDS_TextHighlightColorAttribute::Restore(const Handle(TDF_Attribute)& with)
-{
- Handle(TColStd_HArray1OfReal) s = Handle(TDataStd_RealArray)::DownCast (with)->Array ();
- TDataStd_RealArray::ChangeArray(s);
- return;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void SALOMEDS_TextHighlightColorAttribute::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& ) const
-{
- Handle(TDataStd_RealArray)::DownCast (into)->ChangeArray (Array());
-}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextHighlightColorAttribute.hxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _SALOMEDS_TextHighlightColorAttribute_HeaderFile
-#define _SALOMEDS_TextHighlightColorAttribute_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include <Standard.hxx>
-#endif
-#ifndef _Handle_SALOMEDS_TextHighlightColorAttribute_HeaderFile
-#include <Handle_SALOMEDS_TextHighlightColorAttribute.hxx>
-#endif
-
-#ifndef _TDataStd_RealArray_HeaderFile
-#include <TDataStd_RealArray.hxx>
-#endif
-#ifndef _Handle_TDF_Attribute_HeaderFile
-#include <Handle_TDF_Attribute.hxx>
-#endif
-#ifndef _Handle_TDF_RelocationTable_HeaderFile
-#include <Handle_TDF_RelocationTable.hxx>
-#endif
-class Standard_GUID;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
-
-class SALOMEDS_TextHighlightColorAttribute : public TDataStd_RealArray {
-
-public:
-
- inline void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- inline void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- inline void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-// inline void operator delete(void *anAddress, size_t size)
-// {
-// if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
-// }
- // Methods PUBLIC
- //
-Standard_EXPORT static const Standard_GUID& GetID() ;
-Standard_EXPORT SALOMEDS_TextHighlightColorAttribute();
-Standard_EXPORT const Standard_GUID& ID() const;
-Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
-Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
-Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
-Standard_EXPORT ~SALOMEDS_TextHighlightColorAttribute();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TextHighlightColorAttribute_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-
-
-};
-
-
-
-
-
-// other inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextHighlightColorAttribute.ixx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#include "SALOMEDS_TextHighlightColorAttribute.jxx"
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include <Standard_TypeMismatch.hxx>
-#endif
-
-SALOMEDS_TextHighlightColorAttribute::~SALOMEDS_TextHighlightColorAttribute() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& SALOMEDS_TextHighlightColorAttribute_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TDataStd_RealArray);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDataStd_RealArray);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(TDF_Attribute);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(TDF_Attribute);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient);
- if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("SALOMEDS_TextHighlightColorAttribute",
- sizeof(SALOMEDS_TextHighlightColorAttribute),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(SALOMEDS_TextHighlightColorAttribute) Handle(SALOMEDS_TextHighlightColorAttribute)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(SALOMEDS_TextHighlightColorAttribute) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(SALOMEDS_TextHighlightColorAttribute))) {
- _anOtherObject = Handle(SALOMEDS_TextHighlightColorAttribute)((Handle(SALOMEDS_TextHighlightColorAttribute)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& SALOMEDS_TextHighlightColorAttribute::DynamicType() const
-{
- return STANDARD_TYPE(SALOMEDS_TextHighlightColorAttribute) ;
-}
-Standard_Boolean SALOMEDS_TextHighlightColorAttribute::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(SALOMEDS_TextHighlightColorAttribute) == AType || TDataStd_RealArray::IsKind(AType));
-}
-Handle_SALOMEDS_TextHighlightColorAttribute::~Handle_SALOMEDS_TextHighlightColorAttribute() {}
-
+++ /dev/null
-// SALOME SALOMEDS : data structure of SALOME and sources of Salome data server
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
-//
-// File : SALOMEDS_TextHighlightColorAttribute.jxx
-// Author : Yves FRICAUD
-// Module : SALOME
-// $Header$
-
-#ifndef _Standard_GUID_HeaderFile
-#include <Standard_GUID.hxx>
-#endif
-#ifndef _TDF_Attribute_HeaderFile
-#include <TDF_Attribute.hxx>
-#endif
-#ifndef _TDF_RelocationTable_HeaderFile
-#include <TDF_RelocationTable.hxx>
-#endif
-#ifndef _SALOMEDS_TextHighlightColorAttribute_HeaderFile
-#include "SALOMEDS_TextHighlightColorAttribute.hxx"
-#endif
#include "SALOMEDSImpl_SObject.hxx"
#include "SALOMEDSImpl_UseCaseIterator.hxx"
-#include <TCollection_AsciiString.hxx>
#include <string>
using namespace std;
-SALOMEDS_UseCaseBuilder::SALOMEDS_UseCaseBuilder(const Handle(SALOMEDSImpl_UseCaseBuilder)& theBuilder)
+SALOMEDS_UseCaseBuilder::SALOMEDS_UseCaseBuilder(SALOMEDSImpl_UseCaseBuilder* theBuilder)
{
_isLocal = true;
_local_impl = theBuilder;
SALOMEDS_SObject* obj = dynamic_cast<SALOMEDS_SObject*>(theObject.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->Append(obj->GetLocalImpl());
+ ret = _local_impl->Append(*(obj->GetLocalImpl()));
}
else ret = _corba_impl->Append(obj->GetCORBAImpl());
return ret;
SALOMEDS_SObject* obj = dynamic_cast<SALOMEDS_SObject*>(theObject.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->Remove(obj->GetLocalImpl());
+ ret = _local_impl->Remove(*(obj->GetLocalImpl()));
}
else ret = _corba_impl->Remove(obj->GetCORBAImpl());
return ret;
SALOMEDS_SObject* obj = dynamic_cast<SALOMEDS_SObject*>(theObject.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->AppendTo(father->GetLocalImpl(), obj->GetLocalImpl());
+ ret = _local_impl->AppendTo(*(father->GetLocalImpl()), *(obj->GetLocalImpl()));
}
else ret = _corba_impl->AppendTo(father->GetCORBAImpl(), obj->GetCORBAImpl());
return ret;
SALOMEDS_SObject* next = dynamic_cast<SALOMEDS_SObject*>(theNext.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->InsertBefore(first->GetLocalImpl(), next->GetLocalImpl());
+ ret = _local_impl->InsertBefore(*(first->GetLocalImpl()), *(next->GetLocalImpl()));
}
else ret = _corba_impl->InsertBefore(first->GetCORBAImpl(), next->GetCORBAImpl());
return ret;
SALOMEDS_SObject* obj = dynamic_cast<SALOMEDS_SObject*>(theObject.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->SetCurrentObject(obj->GetLocalImpl());
+ ret = _local_impl->SetCurrentObject(*(obj->GetLocalImpl()));
}
else ret = _corba_impl->SetCurrentObject(obj->GetCORBAImpl());
return ret;
SALOMEDS_SObject* obj = dynamic_cast<SALOMEDS_SObject*>(theObject.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->HasChildren(obj->GetLocalImpl());
+ ret = _local_impl->HasChildren(*(obj->GetLocalImpl()));
}
else ret = _corba_impl->HasChildren(obj->GetCORBAImpl());
return ret;
SALOMEDS_SObject* obj = dynamic_cast<SALOMEDS_SObject*>(theObject.get());
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->IsUseCase(obj->GetLocalImpl());
+ ret = _local_impl->IsUseCase(*(obj->GetLocalImpl()));
}
else ret = _corba_impl->IsUseCase(obj->GetCORBAImpl());
return ret;
bool ret;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->SetName((char*)theName.c_str());
+ ret = _local_impl->SetName(theName);
}
else ret = _corba_impl->SetName((char*)theName.c_str());
return ret;
std::string aName;
if (_isLocal) {
SALOMEDS::Locker lock;
- aName = _local_impl->GetName().ToCString();
+ aName = _local_impl->GetName();
}
else aName = _corba_impl->GetName();
return aName;
SALOMEDS_SObject* obj = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- obj = new SALOMEDS_SObject(_local_impl->AddUseCase((char*)theName.c_str()));
+ obj = new SALOMEDS_SObject(_local_impl->AddUseCase(theName));
}
else obj = new SALOMEDS_SObject(_corba_impl->AddUseCase((char*)theName.c_str()));
return _PTR(SObject)(obj);
if (_isLocal) {
SALOMEDS::Locker lock;
if(obj)
- it = new SALOMEDS_UseCaseIterator(_local_impl->GetUseCaseIterator(obj->GetLocalImpl()));
- else
- it = new SALOMEDS_UseCaseIterator(_local_impl->GetUseCaseIterator(NULL));
+ it = new SALOMEDS_UseCaseIterator(_local_impl->GetUseCaseIterator(*(obj->GetLocalImpl())));
+ else
+ it = new SALOMEDS_UseCaseIterator(_local_impl->GetUseCaseIterator(SALOMEDSImpl_SObject()));
}
else {
if(obj)
private:
bool _isLocal;
- Handle(SALOMEDSImpl_UseCaseBuilder) _local_impl;
- SALOMEDS::UseCaseBuilder_var _corba_impl;
+ SALOMEDSImpl_UseCaseBuilder* _local_impl;
+ SALOMEDS::UseCaseBuilder_var _corba_impl;
public:
- SALOMEDS_UseCaseBuilder(const Handle(SALOMEDSImpl_UseCaseBuilder)& theBuilder);
+ SALOMEDS_UseCaseBuilder(SALOMEDSImpl_UseCaseBuilder* theBuilder);
SALOMEDS_UseCaseBuilder(SALOMEDS::UseCaseBuilder_ptr theBuilder);
~SALOMEDS_UseCaseBuilder();
* Purpose :
*/
//============================================================================
-SALOMEDS_UseCaseBuilder_i::SALOMEDS_UseCaseBuilder_i(const Handle(SALOMEDSImpl_UseCaseBuilder)& theImpl,
+SALOMEDS_UseCaseBuilder_i::SALOMEDS_UseCaseBuilder_i(SALOMEDSImpl_UseCaseBuilder* theImpl,
CORBA::ORB_ptr orb)
{
_orb = CORBA::ORB::_duplicate(orb);
CORBA::Boolean SALOMEDS_UseCaseBuilder_i::Append(SALOMEDS::SObject_ptr theObject)
{
SALOMEDS::Locker lock;
- if(_impl.IsNull() || theObject->_is_nil()) return 0;
+ if(!_impl || theObject->_is_nil()) return 0;
return _impl->Append(_impl->GetSObject(theObject->GetID()));
}
CORBA::Boolean SALOMEDS_UseCaseBuilder_i::Remove(SALOMEDS::SObject_ptr theObject)
{
SALOMEDS::Locker lock;
- if(_impl.IsNull() || theObject->_is_nil()) return 0;
+ if(!_impl || theObject->_is_nil()) return 0;
return _impl->Remove(_impl->GetSObject(theObject->GetID()));
}
SALOMEDS::SObject_ptr theObject)
{
SALOMEDS::Locker lock;
- if(_impl.IsNull() || theFather->_is_nil() || theObject->_is_nil()) return 0;
+ if(!_impl || theFather->_is_nil() || theObject->_is_nil()) return 0;
return _impl->AppendTo(_impl->GetSObject(theFather->GetID()), _impl->GetSObject(theObject->GetID()));
}
SALOMEDS::SObject_ptr theNext)
{
SALOMEDS::Locker lock;
- if(_impl.IsNull() || theFirst->_is_nil() || theNext->_is_nil()) return 0;
+ if(!_impl || theFirst->_is_nil() || theNext->_is_nil()) return 0;
return _impl->InsertBefore(_impl->GetSObject(theFirst->GetID()), _impl->GetSObject(theNext->GetID()));
}
CORBA::Boolean SALOMEDS_UseCaseBuilder_i::SetCurrentObject(SALOMEDS::SObject_ptr theObject)
{
SALOMEDS::Locker lock;
- if(_impl.IsNull() || theObject->_is_nil()) return 0;
+ if(!_impl || theObject->_is_nil()) return 0;
return _impl->SetCurrentObject(_impl->GetSObject(theObject->GetID()));
}
CORBA::Boolean SALOMEDS_UseCaseBuilder_i::SetRootCurrent()
{
SALOMEDS::Locker lock;
- if(_impl.IsNull()) return 0;
+ if(!_impl) return 0;
return _impl->SetRootCurrent();
}
CORBA::Boolean SALOMEDS_UseCaseBuilder_i::HasChildren(SALOMEDS::SObject_ptr theObject)
{
SALOMEDS::Locker lock;
- if(_impl.IsNull()) return 0;
+ if(!_impl) return 0;
return _impl->HasChildren(_impl->GetSObject(theObject->GetID()));
}
CORBA::Boolean SALOMEDS_UseCaseBuilder_i::SetName(const char* theName)
{
SALOMEDS::Locker lock;
- if(_impl.IsNull()) return 0;
+ if(!_impl) return 0;
return _impl->SetName((char*)theName);
}
{
SALOMEDS::Locker lock;
- if(_impl.IsNull()) return NULL;
- Handle(SALOMEDSImpl_SObject) aSO = _impl->GetCurrentObject();
+ if(!_impl) return NULL;
+ SALOMEDSImpl_SObject aSO = _impl->GetCurrentObject();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
return so._retn();
}
char* SALOMEDS_UseCaseBuilder_i::GetName()
{
SALOMEDS::Locker lock;
- return CORBA::string_dup(_impl->GetName().ToCString());
+ return CORBA::string_dup(_impl->GetName().c_str());
}
//============================================================================
{
SALOMEDS::Locker lock;
- if(_impl.IsNull() || theObject->_is_nil()) return false;
+ if(!_impl || theObject->_is_nil()) return false;
return _impl->IsUseCase(_impl->GetSObject(theObject->GetID()));
}
{
SALOMEDS::Locker lock;
- if(_impl.IsNull()) return SALOMEDS::SObject::_nil();
- Handle(SALOMEDSImpl_SObject) aSO = _impl->AddUseCase((char*)theName);
+ if(!_impl) return SALOMEDS::SObject::_nil();
+ SALOMEDSImpl_SObject aSO = _impl->AddUseCase((char*)theName);
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
return so._retn();
}
{
SALOMEDS::Locker lock;
- if(_impl.IsNull()) return SALOMEDS::UseCaseIterator::_nil();
- Handle(SALOMEDSImpl_UseCaseIterator) anItr;
+ if(!_impl) return SALOMEDS::UseCaseIterator::_nil();
+ SALOMEDSImpl_UseCaseIterator anItr;
if(!CORBA::is_nil(theObject)) anItr = _impl->GetUseCaseIterator(_impl->GetSObject(theObject->GetID()));
- else anItr = _impl->GetUseCaseIterator(NULL);
+ else anItr = _impl->GetUseCaseIterator(SALOMEDSImpl_SObject());
SALOMEDS_UseCaseIterator_i* aServant = new SALOMEDS_UseCaseIterator_i(anItr, _orb);
SALOMEDS::UseCaseIterator_var anIterator = SALOMEDS::UseCaseIterator::_narrow(aServant->_this());
return anIterator._retn();
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
#include <SALOME_GenericObj_i.hh>
-// Cascade headers
-#include <Standard_GUID.hxx>
#include <stdio.h>
#include "SALOMEDSImpl_UseCaseIterator.hxx"
{
private:
- CORBA::ORB_ptr _orb;
- Handle(SALOMEDSImpl_UseCaseBuilder) _impl;
+ CORBA::ORB_ptr _orb;
+ SALOMEDSImpl_UseCaseBuilder* _impl;
public:
//! standard constructor
- SALOMEDS_UseCaseBuilder_i(const Handle(SALOMEDSImpl_UseCaseBuilder)& theDocument,
+ SALOMEDS_UseCaseBuilder_i(SALOMEDSImpl_UseCaseBuilder* theDocument,
CORBA::ORB_ptr);
//! standard destructor
using namespace std;
-SALOMEDS_UseCaseIterator::SALOMEDS_UseCaseIterator(const Handle(SALOMEDSImpl_UseCaseIterator)& theIterator)
+SALOMEDS_UseCaseIterator::SALOMEDS_UseCaseIterator(const SALOMEDSImpl_UseCaseIterator& theIterator)
{
_isLocal = true;
- _local_impl = theIterator;
+ _local_impl = theIterator.GetPersistentCopy();
_corba_impl = SALOMEDS::UseCaseIterator::_nil();
}
SALOMEDS_UseCaseIterator::SALOMEDS_UseCaseIterator(SALOMEDS::UseCaseIterator_ptr theIterator)
{
_isLocal = false;
- _local_impl = NULL;
_corba_impl = SALOMEDS::UseCaseIterator::_duplicate(theIterator);
}
SALOMEDS_UseCaseIterator::~SALOMEDS_UseCaseIterator()
{
if(!_isLocal) _corba_impl->Destroy();
+ else if(_local_impl) delete _local_impl;
}
void SALOMEDS_UseCaseIterator::Init(bool theAllLevels)
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl->Init(theAllLevels);
+ if(_local_impl) _local_impl->Init(theAllLevels);
}
else _corba_impl->Init(theAllLevels);
}
bool SALOMEDS_UseCaseIterator::More()
{
- bool ret;
+ bool ret = false;
if (_isLocal) {
SALOMEDS::Locker lock;
- ret = _local_impl->More();
+ if(_local_impl) ret = _local_impl->More();
}
else ret = _corba_impl->More();
return ret;
{
if (_isLocal) {
SALOMEDS::Locker lock;
- _local_impl->Next();
+ if(_local_impl) _local_impl->Next();
}
else _corba_impl->Next();
}
_PTR(SObject) SALOMEDS_UseCaseIterator::Value()
{
- SALOMEDS_SObject* aSO;
+ SALOMEDS_SObject* aSO = NULL;
if (_isLocal) {
SALOMEDS::Locker lock;
- aSO = new SALOMEDS_SObject(_local_impl->Value());
+ if(_local_impl) aSO = new SALOMEDS_SObject(_local_impl->Value());
}
else aSO = new SALOMEDS_SObject(_corba_impl->Value());
return _PTR(SObject)(aSO);
{
private:
bool _isLocal;
- Handle(SALOMEDSImpl_UseCaseIterator) _local_impl;
- SALOMEDS::UseCaseIterator_var _corba_impl;
+ SALOMEDSImpl_UseCaseIterator* _local_impl;
+ SALOMEDS::UseCaseIterator_var _corba_impl;
public:
- SALOMEDS_UseCaseIterator(const Handle(SALOMEDSImpl_UseCaseIterator)& theIterator);
+ SALOMEDS_UseCaseIterator(const SALOMEDSImpl_UseCaseIterator& theIterator);
SALOMEDS_UseCaseIterator(SALOMEDS::UseCaseIterator_ptr theIterator);
~SALOMEDS_UseCaseIterator();
* Purpose :
*/
//============================================================================
-SALOMEDS_UseCaseIterator_i::SALOMEDS_UseCaseIterator_i(const Handle(SALOMEDSImpl_UseCaseIterator)& theImpl,
+SALOMEDS_UseCaseIterator_i::SALOMEDS_UseCaseIterator_i(const SALOMEDSImpl_UseCaseIterator& theImpl,
CORBA::ORB_ptr orb)
{
_orb = CORBA::ORB::_duplicate(orb);
- _impl = theImpl;
+ _impl = theImpl.GetPersistentCopy();
}
//============================================================================
//============================================================================
SALOMEDS_UseCaseIterator_i::~SALOMEDS_UseCaseIterator_i()
{
+ if(_impl) delete _impl;
}
//============================================================================
void SALOMEDS_UseCaseIterator_i::Init(CORBA::Boolean allLevels)
{
SALOMEDS::Locker lock;
- _impl->Init(allLevels);
+ if(_impl) _impl->Init(allLevels);
}
//============================================================================
CORBA::Boolean SALOMEDS_UseCaseIterator_i::More()
{
SALOMEDS::Locker lock;
+ if(!_impl) return false;
return _impl->More();
}
void SALOMEDS_UseCaseIterator_i::Next()
{
SALOMEDS::Locker lock;
- _impl->Next();
+ if(_impl) _impl->Next();
}
SALOMEDS::SObject_ptr SALOMEDS_UseCaseIterator_i::Value()
{
SALOMEDS::Locker lock;
- Handle(SALOMEDSImpl_SObject) aSO = _impl->Value();
+ if(!_impl) return SALOMEDS::SObject::_nil();
+ SALOMEDSImpl_SObject aSO = _impl->Value();
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New (aSO, _orb);
return so._retn();
}
{
private:
CORBA::ORB_ptr _orb;
- Handle(SALOMEDSImpl_UseCaseIterator) _impl;
+ SALOMEDSImpl_UseCaseIterator* _impl;
public:
//! standard constructor
- SALOMEDS_UseCaseIterator_i(const Handle(SALOMEDSImpl_UseCaseIterator)& theImpl,
+ SALOMEDS_UseCaseIterator_i(const SALOMEDSImpl_UseCaseIterator& theImpl,
CORBA::ORB_ptr);
//! standard destructor
return self._ComponentDataType
def Save(self, theComponent, theURL, isMultiFile):
- return ""
+ return NULL
def SaveASCII(self, theComponent, theURL, isMultiFile):
return self.Save(theComponent, theURL, isMultiFile)
return 1
def PublishInStudy(self, theStudy, theSObject, theObject, theName):
- return None
+ return NULL
def CanCopy(self, theObject):
return 0
-I$(srcdir)/$(RPATH)/LifeCycleCORBA \
-I$(srcdir)/$(RPATH)/SALOMEDS \
-I$(srcdir)/$(RPATH)/SALOMEDSClient \
- -I$(srcdir)/$(RPATH)/SALOMEDSImpl -I$(srcdir)/$(RPATH)/SALOMEDSImpl/Test \
+ -I$(srcdir)/$(RPATH)/DF \
+ -I$(srcdir)/$(RPATH)/SALOMEDSImpl -I$(srcdir)/$(RPATH)/SALOMEDSImpl/Test \
-I$(top_builddir)/salome_adm/unix \
-I$(top_builddir)/idl \
- @CAS_CPPFLAGS@ @CAS_CXXFLAGS@ \
@CORBA_CXXFLAGS@ @CORBA_INCLUDES@
# This local variable defines the list of dependant libraries common to all target in this package.
$(RPATH)/SALOMELocalTrace/libSALOMELocalTrace.la \
$(RPATH)/SALOMETraceCollector/Test/libSALOMETraceCollectorTest.la \
$(RPATH)/SALOMEDSImpl/Test/libSALOMEDSImplTest.la \
+ $(RPATH)/DF/libDF.la \
$(RPATH)/SALOMEDSImpl/libSalomeDSImpl.la \
$(RPATH)/SALOMEDSClient/libSalomeDSClient.la \
$(RPATH)/SALOMEDS/libSalomeDS.la \
#include "SALOMEDS_SObject.hxx"
-#include <TCollection_AsciiString.hxx>
-#include <Standard_GUID.hxx>
-
using namespace std;
// ============================================================================
void SALOMEDSTest::setUp()
{
- int argc = 1;\r
- char* argv[] = {""};\r
+ int argc = 1;
+ char* argv[] = {""};
ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
void SALOMEDSTest_Embedded::setUp()
{
- int argc = 1;\r
- char* argv[] = {""};\r
+ int argc = 1;
+ char* argv[] = {""};
ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
CPPUNIT_TEST_SUITE( SALOMEDSTest );
//Attributes' tests
-
+
CPPUNIT_TEST( testAttributeComment );
CPPUNIT_TEST( testAttributeDrawable );
CPPUNIT_TEST( testAttributeExpandable );
CPPUNIT_TEST( testAttributeLocalID );
CPPUNIT_TEST( testAttributeName );
CPPUNIT_TEST( testAttributeOpened );
- CPPUNIT_TEST( testAttributeParameter );
+ CPPUNIT_TEST( testAttributeParameter );
CPPUNIT_TEST( testAttributePersistentRef );
CPPUNIT_TEST( testAttributePixMap );
CPPUNIT_TEST( testAttributePythonObject );
CPPUNIT_TEST( testAttributeSequenceOfInteger );
CPPUNIT_TEST( testAttributeSequenceOfReal );
CPPUNIT_TEST( testAttributeStudyProperties );
- CPPUNIT_TEST( testAttributeTableOfInteger );
- CPPUNIT_TEST( testAttributeTableOfReal );
+ CPPUNIT_TEST( testAttributeTableOfInteger );
+ CPPUNIT_TEST( testAttributeTableOfReal );
CPPUNIT_TEST( testAttributeTableOfString );
CPPUNIT_TEST( testAttributeTarget );
CPPUNIT_TEST( testAttributeTextColor );
CPPUNIT_TEST( testSComponent );
CPPUNIT_TEST( testSComponentIterator );
CPPUNIT_TEST( testSObject );
- CPPUNIT_TEST( testStudy );
+ CPPUNIT_TEST( testStudy );
CPPUNIT_TEST( testStudyBuilder );
CPPUNIT_TEST( testStudyManager );
CPPUNIT_TEST( testUseCase );
CPPUNIT_TEST_SUITE( SALOMEDSTest_Embedded );
//Attributes' tests
-
+
CPPUNIT_TEST( testAttributeComment );
CPPUNIT_TEST( testAttributeDrawable );
CPPUNIT_TEST( testAttributeExpandable );
CPPUNIT_TEST( testAttributeParameter );
CPPUNIT_TEST( testAttributePersistentRef );
CPPUNIT_TEST( testAttributePixMap );
- CPPUNIT_TEST( testAttributePythonObject );
+ CPPUNIT_TEST( testAttributePythonObject );
CPPUNIT_TEST( testAttributeReal );
CPPUNIT_TEST( testAttributeSelectable );
CPPUNIT_TEST( testAttributeSequenceOfInteger );
CPPUNIT_TEST( testAttributeSequenceOfReal );
CPPUNIT_TEST( testAttributeStudyProperties );
- CPPUNIT_TEST( testAttributeTableOfInteger );
+ CPPUNIT_TEST( testAttributeTableOfInteger );
CPPUNIT_TEST( testAttributeTableOfReal );
CPPUNIT_TEST( testAttributeTableOfString );
CPPUNIT_TEST( testAttributeTarget );
CPPUNIT_TEST( testAttributeTreeNode );
CPPUNIT_TEST( testAttributeUserID );
CPPUNIT_TEST( testChildIterator );
- CPPUNIT_TEST( testSComponent );
+ CPPUNIT_TEST( testSComponent );
CPPUNIT_TEST( testSComponentIterator );
CPPUNIT_TEST( testSObject );
CPPUNIT_TEST( testStudy );
- CPPUNIT_TEST( testStudyBuilder );
+ CPPUNIT_TEST( testStudyBuilder );
+ CPPUNIT_TEST( testChildIterator );
CPPUNIT_TEST( testStudyManager );
CPPUNIT_TEST( testUseCase );
-
-
+
CPPUNIT_TEST_SUITE_END();
public:
//Check method IsExpandable
bool isExpandable = _attr->IsExpandable();
- CPPUNIT_ASSERT(!isExpandable);
+ CPPUNIT_ASSERT(isExpandable);
//Check method SetExpandable
- _attr->SetExpandable(true);
-
- CPPUNIT_ASSERT(_attr->IsExpandable());
-
_attr->SetExpandable(false);
CPPUNIT_ASSERT(!_attr->IsExpandable());
+ _attr->SetExpandable(true);
+
+ CPPUNIT_ASSERT(_attr->IsExpandable());
+
sm->Close(study);
}
//Check method IsSelectable
bool isSelectable = _attr->IsSelectable();
- CPPUNIT_ASSERT(!isSelectable);
+ CPPUNIT_ASSERT(isSelectable);
//Check method SetSelectable
- _attr->SetSelectable(true);
-
- CPPUNIT_ASSERT(_attr->IsSelectable());
-
_attr->SetSelectable(false);
CPPUNIT_ASSERT(!_attr->IsSelectable());
+ _attr->SetSelectable(true);
+
+ CPPUNIT_ASSERT(_attr->IsSelectable());
+
sm->Close(study);
}
vector<int> v = _attr->CorbaSequence();
CPPUNIT_ASSERT(v.size() == 3);
+
for(int i = 0; i<v.size(); i++)
CPPUNIT_ASSERT((i+1) == v[i]);
//Check the attribute creation
CPPUNIT_ASSERT(_attr);
-/*
+
//Check method SetTitle
_attr->SetTitle("Table_1");
vector<int> rs = _attr->GetRowSetIndices(1);
CPPUNIT_ASSERT(rs.size() == 1 && rs[0] == 1);
-*/
+
_attr->PutValue(32, 2,2);
CPPUNIT_ASSERT(_attr->HasValue(2, 2));
-/*
+
vector<string> rowTitles;
rowTitles.push_back("title1");
rowTitles.push_back("title2");
//Check method SetRowTitles
_attr->SetRowTitles(rowTitles);
-
+
//Check method SetRowTitle
_attr->SetRowTitle(1, "new_title");
//Check method GetColumnTitles
vector<string> ct = _attr->GetColumnTitles();
-
CPPUNIT_ASSERT(ct.size() == 2 && ct[0] == "new_title" && ct[1] == "title2");
-*/
vector<string> rowUnits;
rowUnits.push_back("unit1");
//Check method SetRowUnits
_attr->SetRowUnits(rowUnits);
-/*
-
//Check method SetRowUnit
_attr->SetRowUnit(1, "new_unit");
_attr->AddColumn(data);
+
CPPUNIT_ASSERT(_attr->GetNbColumns() == 3);
//Check method GetColumn
data2 = _attr->GetColumn(3);
CPPUNIT_ASSERT(data2.size() == 3 && data2[0] == 11 && data2[1] == -22 && data2[2] == -33);
-*/
+
sm->Close(study);
}
CPPUNIT_ASSERT(rt.size() == 2 && rt[0] == "new_title" && rt[1] == "title2");
-
vector<string> colTitles;
colTitles.push_back("title1");
colTitles.push_back("title2");
CPPUNIT_ASSERT(color.B == color2.B);
- sm->Close(study);
+ sm->Close(study);
}
CPPUNIT_ASSERT(isRaised);
_attr->Append(_attr2);
-
+
//Check method HasNext
CPPUNIT_ASSERT(_attr1->HasNext());
CPPUNIT_ASSERT(_attr2->GetPrevious()->Label() == _attr1->Label());
//Check method Depth
- CPPUNIT_ASSERT(_attr->Depth() == 0 && _attr1->Depth() == 1);
+ CPPUNIT_ASSERT(_attr->Depth() == 1 && _attr1->Depth() == 2);
//Check method IsRoot
CPPUNIT_ASSERT(_attr->IsRoot());
//Check method Prepend
_attr->Prepend(_attr2);
+
CPPUNIT_ASSERT(_attr->GetFirst()->Label() == _attr2->Label());
//Check possibility to Prepend to itself
//Try to create the attribute with given TreeID
string value = "0e1c36e6-1111-4d90-ab3b-18a14310e648";
- _PTR(AttributeTreeNode) _attr_guid = studyBuilder->FindOrCreateAttribute(so, "AttributeTreeNode"+value);
+ _PTR(AttributeTreeNode) _attr_guid = studyBuilder->FindOrCreateAttribute(so, "AttributeTreeNodeGUID"+value);
CPPUNIT_ASSERT(_attr_guid && _attr_guid->GetTreeID() == value);
-
- //Try to set invalid GUID
- isRaised = false;
- try {
- _attr->SetTreeID("invalid guid");
- }
- catch(...) {
- isRaised = true;
- }
- CPPUNIT_ASSERT(isRaised);
-
+
sm->Close(study);
}
#undef SALOMEDS_ALL_TESTS
value = "0e1c36e6-379b-4d90-ab3b-18a14310e648";
_PTR(AttributeUserID) _attr2 = studyBuilder->FindOrCreateAttribute(so, "AttributeUserID"+value);
CPPUNIT_ASSERT(_attr2 && _attr2->Value() == value);
-
- //Try to set invalid GUID
- bool isRaised = false;
- try {
- _attr->SetValue("invalid guid");
- }
- catch(...) {
- isRaised = true;
- }
- CPPUNIT_ASSERT(isRaised);
-
-
+
sm->Close(study);
}
//Check that there are two SObject under so
CPPUNIT_ASSERT(count == 2);
-
+
sm->Close(study);
}
//Check method GetAllAttributes
vector< _PTR(GenericAttribute) > v = so->GetAllAttributes();
+
CPPUNIT_ASSERT(v.size() == 5); //+AttributeTarget +AttributeTreeNode
//Check method GetName
//Check method NewComponentIterator
_PTR(SComponentIterator) componentIterator = study->NewComponentIterator();
+
CPPUNIT_ASSERT(componentIterator);
//Check method GetTransientReference
isException = true;
}
CPPUNIT_ASSERT(!isException);
-
}
_PTR(AttributeName) an3 = studyBuilder->FindOrCreateAttribute(so3, "AttributeName");
CPPUNIT_ASSERT(an3);
- cout << endl << "########## 1" << endl;
-
//Try to create attribute with invalid type
CPPUNIT_ASSERT(!studyBuilder->FindOrCreateAttribute(so3, "invalid type"));
- cout << endl << "########## 2" << endl;
-
//Check method FindAttribute
_PTR(GenericAttribute) ga;
CPPUNIT_ASSERT(studyBuilder->FindAttribute(so3, ga, "AttributeName"));
- cout << endl << "########## 3" << endl;
-
//Try to find attribute with invalid type
CPPUNIT_ASSERT(!studyBuilder->FindAttribute(so3, ga, "invalid type"));
- cout << endl << "########## 4" << endl;
-
//Check method RemoveObject
studyBuilder->RemoveObject(so3);
CPPUNIT_ASSERT(!studyBuilder->FindAttribute(so3, ga, "AttributeName"));
//Check method SetGUID and IsGUID
string value = "0e1c36e6-379b-4d90-ab3b-17a14310e648";
studyBuilder->SetGUID(so1, value);
- CPPUNIT_ASSERT(studyBuilder->IsGUID(so1, value));
- //Try to set invalid GUID
- isRaised = false;
- try {
- studyBuilder->SetGUID(so1, "invalid GUID");
- }
- catch(...) {
- isRaised = true;
- }
- CPPUNIT_ASSERT(isRaised);
+ CPPUNIT_ASSERT(studyBuilder->IsGUID(so1, value));
+/* Not implemented
//Check method UndoLimit (set/get)
studyBuilder->UndoLimit(10);
CPPUNIT_ASSERT(studyBuilder->UndoLimit() == 10);
-
- //Check transactions methods: NewCommand, CommitCommand, AbortCommand,
- //HasOpenedCommand, Undo, Redo, GetAvailableUndos, GetAvailableRedos
- _PTR(SObject) so4 = studyBuilder->NewObject(sco3);
- CPPUNIT_ASSERT(so4);
- studyBuilder->NewCommand();
- CPPUNIT_ASSERT(studyBuilder->HasOpenCommand());
- _PTR(AttributeName) an4 = studyBuilder->FindOrCreateAttribute(so4, "AttributeName");
- CPPUNIT_ASSERT(an4);
- an4->SetValue("command1");
- studyBuilder->CommitCommand();
- CPPUNIT_ASSERT(!studyBuilder->HasOpenCommand());
- studyBuilder->NewCommand();
- an4->SetValue("command2");
- studyBuilder->AbortCommand();
- CPPUNIT_ASSERT(an4->Value() == "command1");
- studyBuilder->NewCommand();
- an4->SetValue("command2");
- studyBuilder->CommitCommand();
- studyBuilder->Undo();
- CPPUNIT_ASSERT(an4->Value() == "command1");
- CPPUNIT_ASSERT(studyBuilder->GetAvailableRedos());
- studyBuilder->Redo();
- CPPUNIT_ASSERT(an4->Value() == "command2");
- CPPUNIT_ASSERT(studyBuilder->GetAvailableUndos());
+*/
//Check method SetName
studyBuilder->SetName(so1, "new name");
//Check method LoadWith
_PTR(Study) study2 = sm->NewStudy("Study2");
-
+
SALOME_NamingService NS(_orb);
- CORBA::Object_var obj = SALOME_LifeCycleCORBA(&NS).FindOrLoad_Component("SuperVisionContainer", "SUPERV");
+ CORBA::Object_var obj = SALOME_LifeCycleCORBA(&NS).FindOrLoad_Component("FactoryServer", "SMESH");
CPPUNIT_ASSERT(!CORBA::is_nil(obj));
- MESSAGE("Created a new GEOM component");
+ MESSAGE("Created a new SMESH component");
SALOMEDS::Driver_var drv = SALOMEDS::Driver::_narrow(obj);
CPPUNIT_ASSERT(!CORBA::is_nil(drv));
+
_PTR(StudyBuilder) sb2 = study2->NewBuilder();
- _PTR(SComponent) sco = sb2->NewComponent("SUPERV");
+ _PTR(SComponent) sco = sb2->NewComponent("SMESH");
+
ior = _orb->object_to_string(drv);
sb2->DefineComponentInstance(sco, ior);
_PTR(Study) study3 = sm->Open("srn_SALOMEDS_UnitTests.hdf");
_PTR(StudyBuilder) sb3 = study3->NewBuilder();
- _PTR(SComponent) aComp = study3->FindComponent("SUPERV");
+ _PTR(SComponent) aComp = study3->FindComponent("SMESH");
CPPUNIT_ASSERT(aComp);
- CORBA::Object_var obj2 = SALOME_LifeCycleCORBA(&NS).FindOrLoad_Component("SuperVisionContainer", "SUPERV");
+ CORBA::Object_var obj2 = SALOME_LifeCycleCORBA(&NS).FindOrLoad_Component("FactoryServer", "SMESH");
CPPUNIT_ASSERT(!CORBA::is_nil(obj2));
SALOMEDS::Driver_var drv2 = SALOMEDS::Driver::_narrow(obj2);
ior = _orb->object_to_string(drv2);
isRaised = false;
try {
+ //getchar();
sb3->LoadWith(aComp, ior);
}
catch(...) {
isRaised = true;
}
+
CPPUNIT_ASSERT(!isRaised);
ior = "";
isRaised = true;
}
+
CPPUNIT_ASSERT(!isRaised);
_PTR(SObject) so5 = study3->FindObjectByPath("/Component/Dir1");
CPPUNIT_ASSERT(so5);
}
CPPUNIT_ASSERT(isRaised);
- sm->Close(study3);
+ sm->Close(study3);
}
CPPUNIT_ASSERT(sm->Copy(so1));
-
CPPUNIT_ASSERT(!sm->CanPaste(so1)); //The father component has no IOR
_PTR(SObject) so1_2 = sb1->NewObject(sco1);
CPPUNIT_ASSERT(na2 && na2->Value() == "Some name");
-
//Check method SaveAs
sm->SaveAs("srn_UnitTest_Save.hdf", study1, false);
string url = study1->URL();
string soID = so3->GetID();
_PTR(AttributeName) na3 = sb3->FindOrCreateAttribute(so3, "AttributeName");
CPPUNIT_ASSERT(na3);
+
na3->SetValue("Saved study");
+
// Save and close the study
sm->Save(study1_opened, false);
+
sm->Close(study1_opened);
// Open saved study and find the created SObject with AttributeName, then compare the stored string
_PTR(Study) study2_opened = sm->Open("srn_UnitTest_Save.hdf");
+
system("rm -f srn_UnitTest_Save.hdf");
+
CPPUNIT_ASSERT(study2_opened);
+
_PTR(SObject) so4 = study2_opened->CreateObjectID(soID);
_PTR(StudyBuilder) sb4 = study2_opened->NewBuilder();
_PTR(AttributeName) na4 = sb4->FindOrCreateAttribute(so4, "AttributeName");
CPPUNIT_ASSERT(na4 && na4->Value() == "Saved study"); //Compare the value of restored attribute with string that has to be saved.
-
//Check method SaveAsASCII
sm->SaveAsASCII("srn_UnitTest_SaveASCII.hdf", study2_opened, false);
url = study2_opened->URL();
sm->Close(study2_opened);
+
_PTR(Study) study3_opened = sm->Open("srn_UnitTest_SaveASCII.hdf"); //Contains Test component
system("rm -f srn_UnitTest_SaveASCII.hdf");
CPPUNIT_ASSERT(study3_opened);
#include "SALOMEDSImplTest.hxx"
#include "SALOMEDSTest.hxx"
-#include <TCollection_AsciiString.hxx>
-
// --- Registers the fixture into the 'registry'
CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest );
string kernel_root = getenv("KERNEL_ROOT_DIR");
CPPUNIT_ASSERT(!kernel_root.empty());
kernel_root+="/share/salome/resources/kernel";
- setenv("CSF_PluginDefaults", kernel_root.c_str(), 1);
- setenv("CSF_SALOMEDS_ResourcesDefaults", kernel_root.c_str(), 1);
CORBA::Object_var poaObj = orb->resolve_initial_references("RootPOA");
if(!CORBA::is_nil(poaObj)) {
import sys, os,signal,string,commands
import runSalome
-import setenv
import orbmodule
import TestKiller
# get SALOME environment :
-args, modules_list, modules_root_dir = setenv.get_config()
-setenv.set_env(args, modules_list, modules_root_dir)
+args, modules_list, modules_root_dir = runSalome.get_config()
+runSalome.set_env(args, modules_list, modules_root_dir)
# launch CORBA naming server