X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModelAPI%2FModelAPI_Session.cpp;h=3d5a9591799236facb99edc59e218d634f4367de;hb=a55586483e5dccc5466d6ec241e2147e210d839f;hp=d11dd623d2c4588f975a02345fc9348e74cfa456;hpb=38afbd899a8645c83e17f2c24a17a2b7414911b4;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Session.cpp b/src/ModelAPI/ModelAPI_Session.cpp index d11dd623d..3d5a95917 100644 --- a/src/ModelAPI/ModelAPI_Session.cpp +++ b/src/ModelAPI/ModelAPI_Session.cpp @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: ModelAPI_Session.hxx -// Created: 20 Mar 2014 -// Author: Mikhail PONIKAROV +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// 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, or (at your option) any later version. +// +// 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 +// #include // to avoid unresolved ModelAPI_Document() @@ -28,8 +42,11 @@ #include #include #include +#include +#include #include +#include #ifdef WIN32 #include @@ -37,8 +54,6 @@ #include #endif -using namespace std; - #ifdef _DEBUG #include #endif @@ -46,10 +61,6 @@ using namespace std; /// Manager that will be initialized from Model package, one per application std::shared_ptr MY_MANAGER; -ModelAPI_Session::ModelAPI_Session() -{ -} - void ModelAPI_Session::setSession(std::shared_ptr theManager) { MY_MANAGER = theManager; @@ -59,11 +70,23 @@ std::shared_ptr ModelAPI_Session::get() { if (!MY_MANAGER) { // import Model library that implements this interface of ModelAPI Config_ModuleReader::loadLibrary("Model"); + + Config_PropManager::registerProp("Visualization", "body_deflection", + "Body deflection coefficient", + Config_Prop::Double, + ModelAPI_ResultBody::DEFAULT_DEFLECTION()); + + Config_PropManager::registerProp("Visualization", "construction_deflection", + "Construction deflection coefficient", + Config_Prop::Double, + ModelAPI_ResultConstruction::DEFAULT_DEFLECTION()); + } return MY_MANAGER; } -const ModelAPI_EventCreator* MY_API_CREATOR = 0; ///< instance of the events creator, one pre application +/// instance of the events creator, one pre application +const ModelAPI_EventCreator* MY_API_CREATOR = 0; const ModelAPI_EventCreator* ModelAPI_EventCreator::get() {