-// Copyright (C) 2008 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// 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
//
+
// File : SMESH_NoteBook.cxx
// Author : Roman NIKOLAEV
-
+//
#include "SMESH_2smeshpy.hxx"
#include "SMESH_NoteBook.hxx"
#include "SMESH_Gen_i.hxx"
using namespace std;
-void SetVariable(Handle(_pyCommand) theCommand,const ObjectStates* theStates, int position, int theArgNb);
+void SetVariable(Handle(_pyCommand) theCommand,const SMESH_ObjectStates* theStates, int position, int theArgNb);
//================================================================================
/*!
* \brief Constructor
*/
//================================================================================
-ObjectStates::ObjectStates(TCollection_AsciiString theType)
+SMESH_ObjectStates::SMESH_ObjectStates(TCollection_AsciiString theType)
{
_type = theType;
_dumpstate = 0;
* \brief Destructor
*/
//================================================================================
-ObjectStates::~ObjectStates()
+SMESH_ObjectStates::~SMESH_ObjectStates()
{
}
* \param theState - Object state (vector of notebook variable)
*/
//================================================================================
-void ObjectStates::AddState(const TState &theState)
+void SMESH_ObjectStates::AddState(const TState &theState)
{
_states.push_back(theState);
}
* \\retval state - Object state (vector of notebook variable)
*/
//================================================================================
-TState ObjectStates::GetCurrectState() const
+TState SMESH_ObjectStates::GetCurrectState() const
{
if(_states.size() > _dumpstate)
return _states[_dumpstate];
*
*/
//================================================================================
-TAllStates ObjectStates::GetAllStates() const
+TAllStates SMESH_ObjectStates::GetAllStates() const
{
return _states;
}
*
*/
//================================================================================
-void ObjectStates::IncrementState()
+void SMESH_ObjectStates::IncrementState()
{
_dumpstate++;
}
*
*/
//================================================================================
-TCollection_AsciiString ObjectStates::GetObjectType() const{
+TCollection_AsciiString SMESH_ObjectStates::GetObjectType() const{
return _type;
}
*/
//================================================================================
LayerDistributionStates::LayerDistributionStates():
- ObjectStates("LayerDistribution")
+ SMESH_ObjectStates("LayerDistribution")
{
}
//================================================================================
if(it != _objectMap.end()) {
if(MYDEBUG)
cout << "Found object : " << (*it).first << endl;
- ObjectStates *aStates = (*it).second;
+ SMESH_ObjectStates *aStates = (*it).second;
// Case for LocalLength hypothesis
if(aStates->GetObjectType().IsEqual("LocalLength") && aStates->GetCurrectState().size() >= 2) {
if(aMethod.IsEqual("SetLength")) {
}
if(MYDEBUG)
cout<<"The object Type : "<<anObjType<<endl;
- ObjectStates *aState = NULL;
+ SMESH_ObjectStates *aState = NULL;
if(anObjType == "LayerDistribution") {
aState = new LayerDistributionStates();
}
else
- aState = new ObjectStates(anObjType);
+ aState = new SMESH_ObjectStates(anObjType);
for(int i = 0; i < aSections->length(); i++) {
TState aVars;
}
aState->AddState(aVars);
}
- _objectMap.insert(pair<TCollection_AsciiString,ObjectStates*>(TCollection_AsciiString(aSObject->GetID()),aState));
+ _objectMap.insert(pair<TCollection_AsciiString,SMESH_ObjectStates*>(TCollection_AsciiString(aSObject->GetID()),aState));
}
}
}
/*!
- * Set variable of the ObjectStates from position to the _pyCommand
+ * Set variable of the SMESH_ObjectStates from position to the _pyCommand
* method as nbArg argument
*/
-void SetVariable(Handle(_pyCommand) theCommand, const ObjectStates* theStates, int position, int theArgNb)
+void SetVariable(Handle(_pyCommand) theCommand, const SMESH_ObjectStates* theStates, int position, int theArgNb)
{
if(theStates->GetCurrectState().size() > position)
if(!theStates->GetCurrectState().at(position).IsEmpty())