Version: 9.15.0
SalomeEventLoop Class Reference

#include <salomevent.hxx>

Inheritance diagram for SalomeEventLoop:
Collaboration diagram for SalomeEventLoop:

Public Member Functions

 SalomeEventLoop (YACS::ENGINE::Pool *)
 
virtual void put (long, std::vector< double > &)
 
virtual std::vector< double > * get (long *)
 

Protected Attributes

YACS::ENGINE::Poolsuper
 

Additional Inherited Members

Detailed Description

Definition at line 27 of file salomevent.hxx.

Constructor & Destructor Documentation

◆ SalomeEventLoop()

SalomeEventLoop::SalomeEventLoop ( YACS::ENGINE::Pool sup)

Definition at line 26 of file salomevent.cxx.

27 {
28  super = sup;
29 }
YACS::ENGINE::Pool * super
Definition: salomevent.hxx:29

Member Function Documentation

◆ get()

std::vector< double > * SalomeEventLoop::get ( long *  id)
virtual

Implements Distrib.

Definition at line 37 of file salomevent.cxx.

38 {
39  SequenceAny *tmp;
40  std::vector<double> *ret;
41  unsigned int nb, i;
42 
43  *id = super->getCurrentId();
45  nb = tmp->size();
46  ret = new std::vector<double>(nb);
47  for (i=0; i<nb; i++)
48  (*ret)[i] = (*tmp)[i]->getDoubleValue();
49  tmp->decrRef();
50 
51  return ret;
52 }
Any * getCurrentOutSample() const
Definition: Pool.cxx:93
int getCurrentId() const
Definition: Pool.cxx:78
unsigned int size() const
Definition: Any.hxx:209

References YACS::ENGINE::RefCounter::decrRef(), yacsorb.CORBAEngineTest::i, and YACS::ENGINE::SequenceAny::size().

◆ put()

void SalomeEventLoop::put ( long  i,
std::vector< double > &  cal 
)
virtual

Implements Distrib.

Definition at line 31 of file salomevent.cxx.

32 {
33  SequenceAny *tmp = SequenceAny::New(cal);
34  super->pushInSample(i, (Any *)tmp);
35 }
: Interface for management of storage of data formated dynamically in its TypeCode....
Definition: Any.hxx:79
void pushInSample(int id, Any *inSample, unsigned char priority=0)
Push a sample. WARNING inSample ownership is released to current Pool instance (this) !
Definition: Pool.cxx:115

References yacsorb.CORBAEngineTest::i, and YACS::ENGINE::SequenceAny::New().

Member Data Documentation

◆ super

YACS::ENGINE::Pool* SalomeEventLoop::super
protected

Definition at line 29 of file salomevent.hxx.


The documentation for this class was generated from the following files: