From: vsv Date: Thu, 16 Jun 2016 12:24:01 +0000 (+0300) Subject: Remove inline methods X-Git-Tag: V_2.4.0~98 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=be991bebcf3d2b5d43b86ecb5d6f075d875e9786;p=modules%2Fshaper.git Remove inline methods --- diff --git a/src/Events/CMakeLists.txt b/src/Events/CMakeLists.txt index 9b3f7773f..5982c15de 100644 --- a/src/Events/CMakeLists.txt +++ b/src/Events/CMakeLists.txt @@ -21,6 +21,7 @@ SET(PROJECT_SOURCES Events_Listener.cpp Events_Loop.cpp Events_LongOp.cpp + Events_InfoMessage.cpp ) ADD_DEFINITIONS(-DEVENTS_EXPORTS) diff --git a/src/Events/Events_InfoMessage.cpp b/src/Events/Events_InfoMessage.cpp new file mode 100644 index 000000000..18d38a95c --- /dev/null +++ b/src/Events/Events_InfoMessage.cpp @@ -0,0 +1,30 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: Events_InfoMessage.cpp +// Created: 16 June 2016 +// Author: Vitaly SMETANNIKOV + +#include "Events_InfoMessage.h" + + +void Events_InfoMessage::addParameter(double theParam) +{ + char aBuf[50]; + int n = sprintf(aBuf, "%g", theParam); + std::string aStr(aBuf); + myParameters.push_back(aStr); +} + +void Events_InfoMessage::addParameter(int theParam) +{ + char aBuf[50]; + int n = sprintf(aBuf, "%d", theParam); + std::string aStr(aBuf); + myParameters.push_back(aStr); +} + +void Events_InfoMessage::send() +{ + std::shared_ptr aMsg(new Events_InfoMessage(*this)); + Events_Loop::loop()->send(aMsg); +} diff --git a/src/Events/Events_InfoMessage.h b/src/Events/Events_InfoMessage.h index 556c1db27..959001c43 100644 --- a/src/Events/Events_InfoMessage.h +++ b/src/Events/Events_InfoMessage.h @@ -63,23 +63,11 @@ public: /// Add parameter for message string of double type /// \param theParam the parameter - void addParameter(double theParam) - { - char aBuf[50]; - int n = sprintf(aBuf, "%g", theParam); - std::string aStr(aBuf); - myParameters.push_back(aStr); - } + EVENTS_EXPORT void addParameter(double theParam); /// Add parameter for message string of integer type /// \param theParam the parameter - void addParameter(int theParam) - { - char aBuf[50]; - int n = sprintf(aBuf, "%d", theParam); - std::string aStr(aBuf); - myParameters.push_back(aStr); - } + EVENTS_EXPORT void addParameter(int theParam); /// Returns list of parameters std::list parameters() const { return myParameters; } @@ -96,10 +84,8 @@ public: /// \param theParam the parameter Events_InfoMessage& arg(double theParam) { addParameter(theParam); return *this; } - void send() { - std::shared_ptr aMsg(new Events_InfoMessage(*this)); - Events_Loop::loop()->send(aMsg); - } + /// Send the message + EVENTS_EXPORT void send(); private: