X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FCppNode.hxx;h=6804860f16e6191a100b8dcf5b9509e61a9608e1;hb=c971f99371af3cdbe21daa611ebc89806d0e26c1;hp=56ec4c3aad66f97b51261c41eb56caba19f11250;hpb=24ab175e1695bf31f5b1f47b43ec8b45322dc6d3;p=modules%2Fyacs.git diff --git a/src/runtime/CppNode.hxx b/src/runtime/CppNode.hxx index 56ec4c3aa..6804860f1 100644 --- a/src/runtime/CppNode.hxx +++ b/src/runtime/CppNode.hxx @@ -1,25 +1,68 @@ +// Copyright (C) 2006-2015 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 +// #ifndef _CPPNODE_HXX_ #define _CPPNODE_HXX_ -#include "ElementaryNode.hxx" +#include "ServiceNode.hxx" +#include "YACSRuntimeSALOMEExport.hxx" namespace YACS { namespace ENGINE { + class Any; + // local C++ implementation - single process + + class CppComponent; + + typedef void (*MYRUN)(int nbin, int nbout, + YACS::ENGINE::Any **in, YACS::ENGINE::Any ** out); - typedef bool (*MYRUN)(int nbin, int nbout, void **in, void** out); - - class CppNode: public ENGINE::ElementaryNode +/*! \brief Class for C++ Nodes (in process component) + * + * local C++ implementation - single process + * + * \ingroup Nodes + * + */ + class YACSRUNTIMESALOME_EXPORT CppNode : public YACS::ENGINE::ServiceNode { + protected: + Node *simpleClone(ComposedNode *father, bool editionOnly) const; public: - CppNode(const std::string name); + CppNode(const CppNode &other, ComposedNode *father); + CppNode(const std::string &name); + virtual void load(); virtual void execute(); - void setfunc(MYRUN fonc) { _run = fonc;} - + virtual ServiceNode* createNode(const std::string& name); + CppNode* cloneNode(const std::string& name); + + void setCode(const std::string & componentName, const std::string & service); + void setFunc(MYRUN fonc); + + static const char IMPL_NAME[]; + static const char KIND[]; + std::string getKind() const { return CppNode::KIND; } protected: + std::string _componentName; MYRUN _run; };