20 #ifndef __COMPOSEDNODE_HXX__ 
   21 #define __COMPOSEDNODE_HXX__ 
   49       static const char SEP_CHAR_BTW_LEVEL[];
 
   53       void performDuplicationOfPlacement(
const Node& other);
 
   54       void performShallowDuplicationOfPlacement(
const Node& other);
 
   58       void init(
bool start=
true);
 
   59       virtual void shutdown(
int level);
 
   60       virtual void resetState(
int level);
 
   61       std::string getName() 
const;
 
   62       std::string getTaskName(
Task *task) 
const;
 
   65       std::vector<Task *> getNextTasks(
bool& isMore);
 
   66       virtual bool isPlacementPredictableB4Run() 
const = 0;
 
   79       virtual std::list<Node *> edGetDirectDescendants() 
const =  0;
 
   80       virtual void removeRecursivelyRedundantCL();
 
   81       std::list<ElementaryNode *> getRecursiveConstituents() 
const;
 
   82       std::list<Node *> getAllRecursiveNodes();
 
   83       virtual std::list<Node *> getAllRecursiveConstituents(); 
 
   84       std::list<ProgressWeight> getProgressWeight() 
const;
 
   86       std::
string getOutPortName(const 
OutPort *) const throw (Exception);
 
   88       int getNumberOfInputPorts() const;
 
   89       int getNumberOfOutputPorts() const;
 
   90       std::list<
InputPort *> getSetOfInputPort() const;
 
   91       std::list<
OutputPort *> getSetOfOutputPort() const;
 
   92       std::list<
InputPort *> getLocalInputPorts() const;
 
   93       std::list<
OutputPort *> getLocalOutputPorts() const;
 
   94       std::set<
OutPort *> getAllOutPortsLeavingCurrentScope() const;
 
   95       std::set<
InPort *> getAllInPortsComingFromOutsideOfCurrentScope() const;
 
   98       OutPort *getOutPort(const std::
string& name) const throw(Exception);
 
   99       InputPort *getInputPort(const std::
string& name) const throw(Exception);
 
  100       OutputPort *getOutputPort(const std::
string& name) const throw(Exception);
 
  101       InputDataStreamPort *getInputDataStreamPort(const std::
string& name) const throw(Exception);
 
  103       std::vector< std::pair<
OutPort *, 
InPort *> > getSetOfInternalLinks() const;
 
  104       virtual std::vector< std::pair<OutPort *, 
InPort *> > getSetOfLinksLeavingCurrentScope() const;
 
  105       void checkConsistency(
LinkInfo& info) const throw(Exception);
 
  106       virtual std::vector< std::pair<
InPort *, OutPort *> > getSetOfLinksComingInCurrentScope() const;
 
  107       virtual std::
string typeName() {
return "YACS__ENGINE__ComposedNode";}
 
  108       virtual void edUpdateState();
 
  109       virtual void checkBasicConsistency() 
const throw(
Exception);
 
  110       virtual std::
string getErrorReport();
 
  113       bool isNodeAlreadyAggregated(const 
Node *node) const;
 
  114       virtual 
bool isNameAlreadyUsed(const std::
string& name) const;
 
  115       Node *isInMyDescendance(
Node *nodeToTest) const;
 
  116       std::
string getChildName(const 
Node* node) const throw(Exception);
 
  117       virtual std::
string getMyQualifiedName(const 
Node *directSon) const;
 
  118       Node *getChildByName(const std::
string& name) const throw(Exception);
 
  120       static std::
string getLowestCommonAncestorStr(const std::
string& node1, const std::
string& node2);
 
  124       virtual 
void cleanNodes();
 
  125       virtual std::
string getProgress()
 const { 
return "0"; }
 
  135       void edDisconnectAllLinksWithMe();
 
  136       static bool splitNamesBySep(
const std::string& globalName, 
const char separator[],
 
  137                                   std::string& firstPart, std::string& lastPart, 
bool priority) 
throw(
Exception);
 
  138       virtual Node *getChildByShortName(
const std::string& name) 
const throw(
Exception) = 0;
 
  143       virtual void checkLinkPossibility(
OutPort *start, 
const std::list<ComposedNode *>& pointsOfViewStart,
 
  144                                         InPort *end, 
const std::list<ComposedNode *>& pointsOfViewEnd) 
throw(
Exception);
 
  145       virtual void buildDelegateOf(
InPort * & port, 
OutPort *initialStart, 
const std::list<ComposedNode *>& pointsOfView);
 
  146       virtual void buildDelegateOf(std::pair<OutPort *, OutPort *>& port, 
InPort *finalTarget, 
const std::list<ComposedNode *>& pointsOfView);
 
  147       virtual void getDelegateOf(
InPort * & port, 
OutPort *initialStart, 
const std::list<ComposedNode *>& pointsOfView) 
throw(
Exception);
 
  148       virtual void getDelegateOf(std::pair<OutPort *, OutPort *>& port, 
InPort *finalTarget, 
const std::list<ComposedNode *>& pointsOfView) 
throw(
Exception);
 
  149       virtual void releaseDelegateOf(
InPort * & port, 
OutPort *initialStart, 
const std::list<ComposedNode *>& pointsOfView) 
throw(
Exception);
 
  150       virtual void releaseDelegateOf(
OutPort *portDwn, 
OutPort *portUp, 
InPort *finalTarget, 
const std::list<ComposedNode *>& pointsOfView) 
throw(
Exception);
 
  151       virtual void checkNoCyclePassingThrough(
Node *node) 
throw(
Exception) = 0;
 
  152       void checkInMyDescendance(
Node *nodeToTest) 
const throw(
Exception);
 
  153       template <
class PORT>
 
  154       std::string getPortName(
const PORT * port) 
const throw (
Exception);
 
  156       void checkNoCrossHierachyWith(
Node *node) 
const throw (
Exception);
 
  157       virtual void performCFComputations(
LinkInfo& info) 
const;
 
  158       virtual void destructCFComputations(
LinkInfo& info) 
const;
 
  159       Node *getLowestNodeDealingAll(
const std::list<OutPort *>& ports) 
const;
 
  160       void checkLinksCoherenceRegardingControl(
const std::vector<OutPort *>& starts,
 
  162       virtual void checkControlDependancy(
OutPort *start, 
InPort *end, 
bool cross,
 
  163                                           std::map < 
ComposedNode *,  std::list < OutPort * >, SortHierarc >& fw,
 
  164                                           std::vector<OutPort *>& fwCross,
 
  165                                           std::map< 
ComposedNode *, std::list < OutPort *>, SortHierarc >& bw,
 
  167       void solveObviousOrDelegateCFLinks(
const std::list<OutPort *>& starts, 
InputPort *end, 
unsigned char& alreadyFed, 
bool direction, 
LinkInfo& info) 
const;
 
  168       virtual void checkCFLinks(
const std::list<OutPort *>& starts, 
InputPort *end, 
unsigned char& alreadyFed, 
bool direction, 
LinkInfo& info) 
const;
 
  171       static const unsigned char FED_ST = 2;
 
  172       static const unsigned char FREE_ST = 0;
 
  173       static const unsigned char FED_DS_ST = 1;
 
  176     template <
class PORT>
 
  179       Node *node = port->getNode();
 
  180       std::string portName = port->
getName();  
 
  181       checkInMyDescendance(node);
 
  183       while (father != 
this)