Salome HOME
Methods to check of instances of components
authorrahuel <rahuel@opencascade.com>
Wed, 19 Oct 2005 09:45:49 +0000 (09:45 +0000)
committerrahuel <rahuel@opencascade.com>
Wed, 19 Oct 2005 09:45:49 +0000 (09:45 +0000)
src/SyrComponent/SyrComponent_Impl.cxx
src/SyrComponent/SyrComponent_Impl.hxx

index 085cfd9c696cfa6eef1652a29f3e1a36ffed00c2..c4bd484285b4f0a363f52509db6eabf4ec586e1f 100755 (executable)
@@ -141,6 +141,31 @@ long SyrComponent_Impl::C_INCR( const long aCount ) {
   return ( aCount + 1 ) ;
 }
 
+void SyrComponent_Impl::CPP_SETLONG( const long aCount ) {
+  beginService( " SyrComponent_Impl::CPP_SETLONG" );
+  sendMessage(NOTIF_STEP, "SyrComponent_Impl::CPP_SETLONG is Computing");
+//  int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
+  int S = 1 ;
+  while ( S ) {
+    S = sleep(S);
+  }
+  _Count = aCount ;
+  endService( " SyrComponent_Impl::CPP_SETLONG"  );
+  return ;
+}
+
+long SyrComponent_Impl::CPP_ADDTOLONG( const long anIncr ) {
+  beginService( " SyrComponent_Impl::CPP_ADDTOLONG" );
+  sendMessage(NOTIF_STEP, "SyrComponent_Impl::CPP_ADDTOLONG is Computing");
+//  int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0));
+  int S = 1 ;
+  while ( S ) {
+    S = sleep(S);
+  }
+  endService( " SyrComponent_Impl::CPP_ADDTOLONG"  );
+  return ( _Count + anIncr ) ;
+}
+
 long SyrComponent_Impl::C_MIN( const long aMinVal , const long anInteger ) {
   beginService( " SyrComponent_Impl::C_MIN" );
   sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_MIN is Computing");
index e4291df98b3316b15ba708f2f5259d54d10e34d5..80921e666760bfb411edcd7f45270844c084c535 100755 (executable)
@@ -60,6 +60,10 @@ public:
 
   virtual long C_INCR( const long aCount ) ;
 
+  virtual void CPP_SETLONG( const long aLong ) ;
+
+  virtual long CPP_ADDTOLONG( const long anIncr ) ;
+
   virtual long C_MIN( const long aMinVal , const long anInteger ) ;
 
   virtual long C_MAX( const long aMaxVal , const long anInteger ) ;
@@ -76,6 +80,7 @@ public:
 
 private:
 
+  long _Count ;
 };
 
 class ListOfSyr_Impl :  public POA_SuperVisionTest::ListOfSyr ,