-// SuperVisionTest DataStreamComponent : example
+// Copyright (C) 2007-2013 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 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 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// 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.
//
+// 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
+//
+
+// SuperVisionTest DataStreamComponent : example
// File : DataStreamComponent_Impl.cxx
// Author : Jean Rahuel
// Module : SuperVisionTest
-
-using namespace std;
+//
#include <stdio.h>
#include <unistd.h>
#include <fstream>
#include <sstream>
#include <string>
+#include "COMPONENT_version.h"
#include "DataStreamComponent_Impl.hxx"
+using namespace std;
+
DataStreamFactory_Impl::DataStreamFactory_Impl( CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId * contId,
DataStreamFactory_Impl::~DataStreamFactory_Impl() {
}
-void DataStreamFactory_Impl::Setxy( const long x , const long y ) {
+char* DataStreamFactory_Impl::getVersion()
+{
+#if COMPONENT_DEVELOPMENT
+ return CORBA::string_dup(COMPONENT_VERSION_STR"dev");
+#else
+ return CORBA::string_dup(COMPONENT_VERSION_STR);
+#endif
+}
+
+void DataStreamFactory_Impl::Setxy( CORBA::Long x , CORBA::Long y ) {
_x = x ;
_y = y ;
}
-void DataStreamFactory_Impl::Getxy( long & x , long & y ) {
+void DataStreamFactory_Impl::Getxy( CORBA::Long & x , CORBA::Long & y ) {
x = _x ;
y = _y ;
}
-void DataStreamFactory_Impl::Add( const long x , const long y , long & z ) {
+void DataStreamFactory_Impl::Add( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x+y ;
}
-void DataStreamFactory_Impl::Sub( const long x , const long y , long & z ) {
+void DataStreamFactory_Impl::Sub( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x-y ;
}
-void DataStreamFactory_Impl::Mul( const long x , const long y , long & z ) {
+void DataStreamFactory_Impl::Mul( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x*y ;
}
-void DataStreamFactory_Impl::Div( const long x , const long y , long & z ) {
+void DataStreamFactory_Impl::Div( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x/y ;
}
endService( "DataStream_Impl::~DataStream_Impl" );
}
-void DataStream_Impl::StreamSetxy( const long x , const long y ) {
+char* DataStream_Impl::getVersion()
+{
+#if COMPONENT_DEVELOPMENT
+ return CORBA::string_dup(COMPONENT_VERSION_STR"dev");
+#else
+ return CORBA::string_dup(COMPONENT_VERSION_STR);
+#endif
+}
+
+void DataStream_Impl::StreamSetxy( CORBA::Long x , CORBA::Long y ) {
_x = x ;
_y = y ;
}
-void DataStream_Impl::StreamGetxy( long & x , long & y ) {
+void DataStream_Impl::StreamGetxy( CORBA::Long & x , CORBA::Long & y ) {
x = _x ;
y = _y ;
}
-void DataStream_Impl::StreamAdd( const long x , const long y , long & z ) {
+void DataStream_Impl::StreamAdd( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x+y ;
}
-void DataStream_Impl::StreamSub( const long x , const long y , long & z ) {
+void DataStream_Impl::StreamSub( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x-y ;
}
-void DataStream_Impl::StreamMul( const long x , const long y , long & z ) {
+void DataStream_Impl::StreamMul( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x*y ;
}
-void DataStream_Impl::StreamDiv( const long x , const long y , long & z ) {
+void DataStream_Impl::StreamDiv( CORBA::Long x , CORBA::Long y , CORBA::Long & z ) {
z = x/y ;
}