-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007 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 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
#include <Standard_Stream.hxx>
#include "utilities.h"
* SetColor
*/
//=============================================================================
-void GEOM_Object::SetColor(const SALOMEDS::Color& theColor)
+void GEOM_Object::SetColor(const GEOM_Object::Color& theColor)
{
Handle(TDataStd_RealArray) anArray = new TDataStd_RealArray();
anArray->Init( 1, 3 );
* GetColor
*/
//=============================================================================
-SALOMEDS::Color GEOM_Object::GetColor()
+GEOM_Object::Color GEOM_Object::GetColor()
{
Handle(TDataStd_RealArray) anArray;
bool isFound = _label.FindChild(COLOR_LABEL).FindAttribute(TDataStd_RealArray::GetID(), anArray);
- SALOMEDS::Color aColor;
+ GEOM_Object::Color aColor;
aColor.R = isFound ? anArray->Value( 1 ) : -1;
aColor.G = isFound ? anArray->Value( 2 ) : -1;
aColor.B = isFound ? anArray->Value( 3 ) : -1;
* SetAutoColor
*/
//=============================================================================
-void GEOM_Object::SetAutoColor(CORBA::Boolean theAutoColor)
+void GEOM_Object::SetAutoColor(bool theAutoColor)
{
TDataStd_Integer::Set(_label.FindChild(AUTO_COLOR_LABEL), (int)theAutoColor);
}
* GetAutoColor
*/
//=============================================================================
-CORBA::Boolean GEOM_Object::GetAutoColor()
+bool GEOM_Object::GetAutoColor()
{
Handle(TDataStd_Integer) anAutoColor;
if(!_label.FindChild(AUTO_COLOR_LABEL).FindAttribute(TDataStd_Integer::GetID(), anAutoColor)) return false;
- return anAutoColor->Get();
+ return bool(anAutoColor->Get());
}
//=============================================================================
Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID, int theFunctionType)
{
Standard_Integer nb = GetNbFunctions();
- if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape
+ if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub-shape
nb++;
TDF_Label aChild = FUNCTION_LABEL(nb);