Version: 9.16.0
YACS::ENGINE::NbBranches Class Reference

#include <NbBranches.hxx>

Inheritance diagram for YACS::ENGINE::NbBranches:
Collaboration diagram for YACS::ENGINE::NbBranches:

Public Member Functions

 NbBranches (Node *node)
 
 NbBranches (const NbBranches &other, Node *node)
 
bool isMyName (const std::string &name) const override
 
std::unique_ptr< NbBranchesAbstractcopy (Node *node) const override
 
int getNumberOfBranches (int nbOfElems) const override
 
void exInit (bool start) override
 
InputPortgetPort () const override
 
bool isMultiplicitySpecified (unsigned &value) const override
 
void forceMultiplicity (unsigned value) override
 
int getIntValue () const override
 
virtual std::unique_ptr< NbBranchesAbstractcopy (Node *node) const =0
 
virtual int getNumberOfBranches (int nbOfElems) const =0
 
virtual bool isMyName (const std::string &name) const =0
 
virtual void exInit (bool start)=0
 
virtual InputPortgetPort () const =0
 
virtual bool isMultiplicitySpecified (unsigned &value) const =0
 
virtual void forceMultiplicity (unsigned value)=0
 
virtual int getIntValue () const =0
 

Private Attributes

AnyInputPort _nbOfBranches
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::ENGINE::NbBranchesAbstract
static bool IsBranchPortName (const std::string &name)
 
- Static Protected Attributes inherited from YACS::ENGINE::NbBranchesAbstract
static const char NAME_OF_NUMBER_OF_BRANCHES [] ="nbBranches"
 

Detailed Description

Definition at line 48 of file NbBranches.hxx.

Constructor & Destructor Documentation

◆ NbBranches() [1/2]

YACS::ENGINE::NbBranches::NbBranches ( Node node)
inline

Definition at line 51 of file NbBranches.hxx.

static const char NAME_OF_NUMBER_OF_BRANCHES[]
Definition: NbBranches.hxx:45
AnyInputPort _nbOfBranches
Definition: NbBranches.hxx:62
static YACS::ENGINE::TypeCode * _tc_int
Definition: Runtime.hxx:137

Referenced by copy().

◆ NbBranches() [2/2]

YACS::ENGINE::NbBranches::NbBranches ( const NbBranches other,
Node node 
)
inline

Definition at line 52 of file NbBranches.hxx.

52:_nbOfBranches(other._nbOfBranches,node) { }

Member Function Documentation

◆ copy()

std::unique_ptr< NbBranchesAbstract > NbBranches::copy ( Node node) const
overridevirtual

Implements YACS::ENGINE::NbBranchesAbstract.

Definition at line 31 of file NbBranches.cxx.

32{
33 return std::unique_ptr<NbBranchesAbstract>(new NbBranches(*this,node));
34}

References NbBranches().

◆ exInit()

void NbBranches::exInit ( bool  start)
overridevirtual

Implements YACS::ENGINE::NbBranchesAbstract.

Definition at line 46 of file NbBranches.cxx.

47{
48 _nbOfBranches.exInit(start);
49}
virtual void exInit(bool start)
Definition: InputPort.cxx:63

References _nbOfBranches, and YACS::ENGINE::InputPort::exInit().

◆ forceMultiplicity()

void NbBranches::forceMultiplicity ( unsigned  value)
overridevirtual

◆ getIntValue()

int YACS::ENGINE::NbBranches::getIntValue ( ) const
inlineoverridevirtual

Implements YACS::ENGINE::NbBranchesAbstract.

Definition at line 60 of file NbBranches.hxx.

60{ return _nbOfBranches.getIntValue(); }

Referenced by getNumberOfBranches().

◆ getNumberOfBranches()

int NbBranches::getNumberOfBranches ( int  nbOfElems) const
overridevirtual

Implements YACS::ENGINE::NbBranchesAbstract.

Definition at line 36 of file NbBranches.cxx.

37{
38 return this->getIntValue();
39}
int getIntValue() const override
Definition: NbBranches.hxx:60

References getIntValue().

◆ getPort()

InputPort * NbBranches::getPort ( ) const
overridevirtual

Implements YACS::ENGINE::NbBranchesAbstract.

Definition at line 51 of file NbBranches.cxx.

52{
53 return const_cast<AnyInputPort *>(&_nbOfBranches);
54}

References _nbOfBranches.

◆ isMultiplicitySpecified()

bool NbBranches::isMultiplicitySpecified ( unsigned &  value) const
overridevirtual

Implements YACS::ENGINE::NbBranchesAbstract.

Definition at line 56 of file NbBranches.cxx.

57{
60 {
62 return true;
63 }
64 return false;
65}
virtual int edGetNumberOfLinks() const
Returns number of physical backlinks NOT number of user backlinks.
Definition: InPort.cxx:45
virtual bool edIsManuallyInitialized() const
Specifies if this port has been manually set by the call of InputPort::edInit.
Definition: InputPort.cxx:76

References _nbOfBranches, YACS::ENGINE::InPort::edGetNumberOfLinks(), YACS::ENGINE::InputPort::edIsManuallyInitialized(), and YACS::ENGINE::AnyInputPort::getIntValue().

◆ isMyName()

bool NbBranches::isMyName ( const std::string &  name) const
overridevirtual

Implements YACS::ENGINE::NbBranchesAbstract.

Definition at line 41 of file NbBranches.cxx.

42{
44}
static bool IsBranchPortName(const std::string &name)
Definition: NbBranches.cxx:26

References YACS::ENGINE::NbBranchesAbstract::IsBranchPortName().

Member Data Documentation

◆ _nbOfBranches

AnyInputPort YACS::ENGINE::NbBranches::_nbOfBranches
private

Definition at line 62 of file NbBranches.hxx.

Referenced by exInit(), forceMultiplicity(), getPort(), and isMultiplicitySpecified().


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