Version: 9.16.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::Proc_i ( YACS::ENGINE::Proc p)
inline

Definition at line 80 of file yacsSrv.cxx.

80{_proc=p;};
YACS::ENGINE::Proc * _proc
Definition: yacsSrv.cxx:88
Proc * p
Definition: driver.cxx:216

References _proc, and p.

◆ ~Proc_i()

virtual Proc_i::~Proc_i ( )
inlinevirtual

Definition at line 81 of file yacsSrv.cxx.

81{};

Member Function Documentation

◆ getIds()

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

Definition at line 123 of file yacsSrv.cxx.

124{
125 std::list<YACS::ENGINE::Node *> nodes=_proc->getAllRecursiveNodes();
126 int len=nodes.size();
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}
std::list< Node * > getAllRecursiveNodes()
Get all children nodes elementary and composed including this node.
sequence< string > stringArray
Definition: yacsgui.idl:33
sequence< long > longArray
Definition: yacsgui.idl:34

References _proc, YACS::ENGINE::ComposedNode::getAllRecursiveNodes(), yacsorb.CORBAEngineTest::i, yacsorb.CORBAEngineTest::names, and yacsorb.CORBAEngineTest::numids.

◆ getState()

CORBA::Long Proc_i::getState ( CORBA::Long  numid)

Definition at line 96 of file yacsSrv.cxx.

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}
Base class for all nodes.
Definition: Node.hxx:70
static std::map< int, Node * > idMap
Definition: Node.hxx:188
virtual YACS::StatesForNode getEffectiveState() const
Return the node state in the context of its father.
Definition: Node.cxx:538

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

◆ getXMLState()

char * Proc_i::getXMLState ( CORBA::Long  numid)

Definition at line 108 of file yacsSrv.cxx.

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}
std::string getQualifiedName() const
same as Node::getName() in most cases, but differs for children of switch
Definition: Node.cxx:632

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

◆ RunW()

void Proc_i::RunW ( )
virtual

Definition at line 91 of file yacsSrv.cxx.

92{
94}
YACS::ENGINE::Executor _executor
Definition: yacsSrv.cxx:87
void RunW(Scheduler *graph, int debug=0, bool fromScratch=true)
Definition: Executor.cxx:1833

References _executor, _proc, and YACS::ENGINE::Executor::RunW().

Referenced by Yacs_i::Run().

Member Data Documentation

◆ _executor

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

Definition at line 87 of file yacsSrv.cxx.

Referenced by RunW().

◆ _proc

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

Definition at line 88 of file yacsSrv.cxx.

Referenced by getIds(), Proc_i(), and RunW().


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