Version: 9.15.0
YACS::ENGINE::DeploymentTree Class Reference

#include <DeploymentTree.hxx>

Collaboration diagram for YACS::ENGINE::DeploymentTree:

Public Member Functions

 DeploymentTree ()
 
 ~DeploymentTree ()
 
 DeploymentTree (const DeploymentTree &other)
 
const DeploymentTreeoperator= (const DeploymentTree &other)
 
unsigned char appendTask (Task *task, Scheduler *cloner)
 
unsigned getNumberOfCTDefContainer () const
 
unsigned getNumberOfRTODefContainer () const
 
unsigned getNumberOfCTDefComponentInstances () const
 
unsigned getNumberOfRTODefComponentInstances () const
 
bool presenceOfDefaultContainer () const
 
std::vector< Container * > getAllContainers () const
 
std::vector< Container * > getAllCTDefContainers () const
 
std::vector< Container * > getAllRTODefContainers () const
 
std::vector< Task * > getTasksLinkedToComponent (ComponentInstance *comp) const
 
std::vector< Task * > getTasksLinkedToContainer (Container *cont) const
 
std::vector< ComponentInstance * > getComponentsLinkedToContainer (Container *cont) const
 
bool isNull () const
 
std::vector< Task * > getFreeDeployableTasks () const
 

Static Public Attributes

static const unsigned char NULL_TASK = 3
 
static const unsigned char APPEND_OK = 0
 
static const unsigned char NULL_TREE = 199
 
static const unsigned char ALREADY_IN_TREE = 1
 
static const unsigned char NOT_DEPLOYABLE_TASK = 2
 
static const unsigned char DEPLOYABLE_BUT_NOT_SPECIFIED = 5
 
static const unsigned char DUP_TASK_NOT_COMPATIBLE_WITH_EXISTING_TREE = 4
 

Private Attributes

DeploymentTreeOnHeap_treeHandle
 

Detailed Description

Definition at line 67 of file DeploymentTree.hxx.

Constructor & Destructor Documentation

◆ DeploymentTree() [1/2]

DeploymentTree::DeploymentTree ( )

Definition at line 399 of file DeploymentTree.cxx.

399  :_treeHandle(0)
400 {
401 }
DeploymentTreeOnHeap * _treeHandle

◆ ~DeploymentTree()

DeploymentTree::~DeploymentTree ( )

Definition at line 403 of file DeploymentTree.cxx.

404 {
405  if(_treeHandle)
406  _treeHandle->decrRef();
407 }

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::decrRef().

◆ DeploymentTree() [2/2]

DeploymentTree::DeploymentTree ( const DeploymentTree other)

Definition at line 409 of file DeploymentTree.cxx.

410 {
411  _treeHandle=other._treeHandle;
412  if(_treeHandle)
413  _treeHandle->incrRef();
414 }

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::incrRef().

Member Function Documentation

◆ appendTask()

unsigned char DeploymentTree::appendTask ( Task task,
Scheduler cloner 
)

Definition at line 426 of file DeploymentTree.cxx.

427 {
428  if(_treeHandle)
429  return _treeHandle->appendTask(task,cloner);
430  if(!task)
432  if(!task->isDeployable())//Task not needed to be placed.
435  return _treeHandle->appendTask(task,cloner);
436 }
unsigned char appendTask(Task *task, Scheduler *cloner)
static const unsigned char NOT_DEPLOYABLE_TASK
static const unsigned char NULL_TASK
virtual bool isDeployable() const =0

References _treeHandle, YACS::ENGINE::DeploymentTreeOnHeap::appendTask(), YACS::ENGINE::Task::isDeployable(), NOT_DEPLOYABLE_TASK, and NULL_TASK.

Referenced by YACS::ENGINE::ComposedNode::checkDeploymentTree(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), and YACS::ENGINE::ComposedNode::getDeploymentTree().

◆ getAllContainers()

std::vector< Container * > DeploymentTree::getAllContainers ( ) const

◆ getAllCTDefContainers()

std::vector< Container * > DeploymentTree::getAllCTDefContainers ( ) const

Returns containers predictably launchable without counting default container.

Definition at line 485 of file DeploymentTree.cxx.

486 {
487  if(_treeHandle)
489  return vector<Container *>();
490 }
std::vector< Container * > getAllCTDefContainers() const

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::getAllCTDefContainers().

◆ getAllRTODefContainers()

std::vector< Container * > DeploymentTree::getAllRTODefContainers ( ) const

Returns containers unpredictably launchable without counting default container.

Definition at line 495 of file DeploymentTree.cxx.

496 {
497  if(_treeHandle)
499  return vector<Container *>();
500 }
std::vector< Container * > getAllRTODefContainers() const

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::getAllRTODefContainers().

◆ getComponentsLinkedToContainer()

std::vector< ComponentInstance * > DeploymentTree::getComponentsLinkedToContainer ( Container cont) const

◆ getFreeDeployableTasks()

std::vector< Task * > DeploymentTree::getFreeDeployableTasks ( ) const

Definition at line 535 of file DeploymentTree.cxx.

536 {
537  if(_treeHandle)
539  return vector<Task *>();
540 }
std::vector< Task * > getFreeDeployableTasks() const

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::getFreeDeployableTasks().

◆ getNumberOfCTDefComponentInstances()

unsigned DeploymentTree::getNumberOfCTDefComponentInstances ( ) const

Definition at line 458 of file DeploymentTree.cxx.

459 {
460  if(_treeHandle)
462  return 0;
463 }
unsigned getNumberOfCTDefComponentInstances() const

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::getNumberOfCTDefComponentInstances().

◆ getNumberOfCTDefContainer()

unsigned DeploymentTree::getNumberOfCTDefContainer ( ) const

Returns number of containers predictably launchable without counting default container.

Definition at line 441 of file DeploymentTree.cxx.

442 {
443  if(_treeHandle)
445  return 0;
446 }

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::getNumberOfCTDefContainer().

◆ getNumberOfRTODefComponentInstances()

unsigned DeploymentTree::getNumberOfRTODefComponentInstances ( ) const

Definition at line 465 of file DeploymentTree.cxx.

466 {
467  if(_treeHandle)
469  return 0;
470 }
unsigned getNumberOfRTODefComponentInstances() const

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::getNumberOfRTODefComponentInstances().

◆ getNumberOfRTODefContainer()

unsigned DeploymentTree::getNumberOfRTODefContainer ( ) const

Returns number of containers unpredictably launchable without counting default container.

Definition at line 451 of file DeploymentTree.cxx.

452 {
453  if(_treeHandle)
455  return 0;
456 }

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::getNumberOfRTODefContainer().

◆ getTasksLinkedToComponent()

◆ getTasksLinkedToContainer()

std::vector< Task * > DeploymentTree::getTasksLinkedToContainer ( Container cont) const

◆ isNull()

bool DeploymentTree::isNull ( ) const

Definition at line 530 of file DeploymentTree.cxx.

531 {
532  return _treeHandle==0;
533 }

References _treeHandle.

◆ operator=()

const DeploymentTree & DeploymentTree::operator= ( const DeploymentTree other)

Definition at line 416 of file DeploymentTree.cxx.

417 {
418  if(_treeHandle)
419  _treeHandle->decrRef();
420  _treeHandle=other._treeHandle;
421  if(_treeHandle)
422  _treeHandle->incrRef();
423  return *this;
424 }

References _treeHandle, YACS::ENGINE::DeploymentTreeOnHeap::decrRef(), and YACS::ENGINE::DeploymentTreeOnHeap::incrRef().

◆ presenceOfDefaultContainer()

bool DeploymentTree::presenceOfDefaultContainer ( ) const

Definition at line 523 of file DeploymentTree.cxx.

524 {
525  if(_treeHandle)
527  return false;
528 }

References _treeHandle, and YACS::ENGINE::DeploymentTreeOnHeap::presenceOfDefaultContainer().

Member Data Documentation

◆ _treeHandle

◆ ALREADY_IN_TREE

const unsigned char YACS::ENGINE::DeploymentTree::ALREADY_IN_TREE = 1
static

Definition at line 96 of file DeploymentTree.hxx.

Referenced by YACS::ENGINE::DeploymentTreeOnHeap::appendTask().

◆ APPEND_OK

const unsigned char YACS::ENGINE::DeploymentTree::APPEND_OK = 0
static

Definition at line 94 of file DeploymentTree.hxx.

Referenced by YACS::ENGINE::DeploymentTreeOnHeap::appendTask().

◆ DEPLOYABLE_BUT_NOT_SPECIFIED

const unsigned char YACS::ENGINE::DeploymentTree::DEPLOYABLE_BUT_NOT_SPECIFIED = 5
static

◆ DUP_TASK_NOT_COMPATIBLE_WITH_EXISTING_TREE

const unsigned char YACS::ENGINE::DeploymentTree::DUP_TASK_NOT_COMPATIBLE_WITH_EXISTING_TREE = 4
static

Definition at line 99 of file DeploymentTree.hxx.

Referenced by YACS::ENGINE::ComposedNode::checkDeploymentTree().

◆ NOT_DEPLOYABLE_TASK

const unsigned char YACS::ENGINE::DeploymentTree::NOT_DEPLOYABLE_TASK = 2
static

◆ NULL_TASK

const unsigned char YACS::ENGINE::DeploymentTree::NULL_TASK = 3
static

◆ NULL_TREE

const unsigned char YACS::ENGINE::DeploymentTree::NULL_TREE = 199
static

Definition at line 95 of file DeploymentTree.hxx.


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