Version: 8.3.0
Proc_i Class Reference
Inheritance diagram for Proc_i:
Collaboration diagram for Proc_i:

Public Member Functions

 Proc_i (YACS::ENGINE::Proc *p)
 
virtual ~Proc_i ()
 
virtual void RunW ()
 
CORBA::Long getState (CORBA::Long numid)
 
char * getXMLState (CORBA::Long numid)
 
void getIds (YACS_ORB::longArray_out numids, YACS_ORB::stringArray_out names)
 

Protected Attributes

YACS::ENGINE::Executor _executor
 
YACS::ENGINE::Proc_proc
 

Detailed Description

Definition at line 76 of file yacsSrv.cxx.

Constructor & Destructor Documentation

Proc_i::Proc_i ( YACS::ENGINE::Proc p)
inline

Definition at line 80 of file yacsSrv.cxx.

References p.

80 {_proc=p;};
virtual Proc_i::~Proc_i ( )
inlinevirtual

Definition at line 81 of file yacsSrv.cxx.

81 {};

Member Function Documentation

void Proc_i::getIds ( YACS_ORB::longArray_out  numids,
YACS_ORB::stringArray_out  names 
)

Definition at line 123 of file yacsSrv.cxx.

References CORBAEngineTest::i.

124 {
125  std::list<YACS::ENGINE::Node *> nodes=_proc->getAllRecursiveNodes();
126  int len=nodes.size();
127  names=new YACS_ORB::stringArray;
128  numids=new YACS_ORB::longArray;
129  names->length(len);
130  numids->length(len);
131  int i=0;
132  for(list<YACS::ENGINE::Node *>::const_iterator iter=nodes.begin();iter!=nodes.end();iter++,i++)
133  {
134  (*names)[i]=CORBA::string_dup((*iter)->getQualifiedName().c_str());
135  (*numids)[i]=(*iter)->getNumId();
136  }
137 }
CORBA::Long Proc_i::getState ( CORBA::Long  numid)

Definition at line 96 of file yacsSrv.cxx.

References YACS::ENGINE::Node::getEffectiveState(), YACS::ENGINE::Node::idMap, and CORBAEngineTest::state.

97 {
98  if(YACS::ENGINE::Node::idMap.count(numid) == 0)
99  {
100  std::cerr << "Unknown node id " << numid << std::endl;
101  return (CORBA::Long)-1;
102  }
104  CORBA::Long state=node->getEffectiveState();
105  return state;
106 }
char * Proc_i::getXMLState ( CORBA::Long  numid)

Definition at line 108 of file yacsSrv.cxx.

References YACS::ENGINE::Node::getEffectiveState(), YACS::ENGINE::Node::getQualifiedName(), and YACS::ENGINE::Node::idMap.

109 {
110  if(YACS::ENGINE::Node::idMap.count(numid) == 0)
111  {
112  std::cerr << "Unknown node id " << numid << std::endl;
113  return "<state>unknown</state>";
114  }
116  std::stringstream msg;
117  msg << "<state>" << node->getEffectiveState() << "</state>";
118  msg << "<name>" << node->getQualifiedName() << "</name>";
119  msg << "<id>" << numid << "</id>";
120  return CORBA::string_dup(msg.str().c_str());
121 }
void Proc_i::RunW ( )
virtual

Definition at line 91 of file yacsSrv.cxx.

Referenced by Yacs_i::Run().

92 {
93  _executor.RunW(_proc,0);
94 }

Member Data Documentation

YACS::ENGINE::Executor Proc_i::_executor
protected

Definition at line 87 of file yacsSrv.cxx.

YACS::ENGINE::Proc* Proc_i::_proc
protected

Definition at line 88 of file yacsSrv.cxx.


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