OpenStudio:model
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Pages

#include "PortList.hpp"

Inheritance diagram for openstudio::model::PortList:

Public Member Functions

boost::optional< ModelObjectairLoopHVACModelObject () const
std::vector< ModelObjectairLoopHVACModelObjects () const
unsigned airLoopHVACPort () const
unsigned airLoopHVACPortIndex () const
std::vector< unsigned > airLoopHVACPortIndexes () const
std::vector< unsigned > airLoopHVACPorts () const
boost::optional< ModelObjectlastModelObject ()
boost::optional< ModelObjectmodelObject (unsigned portIndex) const
std::vector< ModelObjectmodelObjects () const
unsigned nextPort () const
unsigned nextPortIndex () const
unsigned port (unsigned portIndex) const
unsigned portIndex (unsigned port) const
unsigned portIndexForModelObject (ModelObject &modelObject) const
 PortList (const HVACComponent &comp)
ThermalZone thermalZone () const
virtual ~PortList ()

Static Public Member Functions

static IddObjectType iddObjectType ()

Related Functions

typedef boost::optional< PortListOptionalPortList
typedef std::vector< PortListPortListVector

Detailed Description

PortList is a ModelObject that wraps the OpenStudio IDD object 'OS:PortList'.

Constructor & Destructor Documentation

openstudio::model::PortList::PortList ( const HVACComponent comp)
explicit
virtual openstudio::model::PortList::~PortList ( )
inlinevirtual

Member Function Documentation

boost::optional<ModelObject> openstudio::model::PortList::airLoopHVACModelObject ( ) const

Returns the object connected to an AirLoopHVAC object.

std::vector<ModelObject> openstudio::model::PortList::airLoopHVACModelObjects ( ) const
unsigned openstudio::model::PortList::airLoopHVACPort ( ) const

Returns the port connected to an AirLoopHVAC object.

If there is no AirLoopHVAC object, then the next available port is returned

unsigned openstudio::model::PortList::airLoopHVACPortIndex ( ) const

Returns the port Index connected to an AirLoopHVAC object.

If there is no AirLoopHVAC object, then the next available portIndex is returned

std::vector<unsigned> openstudio::model::PortList::airLoopHVACPortIndexes ( ) const
std::vector<unsigned> openstudio::model::PortList::airLoopHVACPorts ( ) const
static IddObjectType openstudio::model::PortList::iddObjectType ( )
static
boost::optional<ModelObject> openstudio::model::PortList::lastModelObject ( )

Returns the optional ModelObject connected to the last port of the PortList.

If there are no connections to the list's outlet ports, then the optional will be false.

boost::optional<ModelObject> openstudio::model::PortList::modelObject ( unsigned  portIndex) const

Returns the optional ModelObject connected to the port designated by portIndex.

If there is no connected object then the optional will be false.

std::vector<ModelObject> openstudio::model::PortList::modelObjects ( ) const

Returns a vector of all objects connected to the PortList's ports.

If no objects are connected to the PortList then an empty vector will be returned.

unsigned openstudio::model::PortList::nextPort ( ) const

Returns the next available port.

This will be the first port with no connected objects

unsigned openstudio::model::PortList::nextPortIndex ( ) const

Returns the index of the next available port.

unsigned openstudio::model::PortList::port ( unsigned  portIndex) const

Returns the port for portIndex.

Ports are consequtively indexed starting from 0.

unsigned openstudio::model::PortList::portIndex ( unsigned  port) const

Given a port, return the port index.

Consider that a "port" is simply an unsigned, so port and port index share the same type, but they do not share the same value.

unsigned openstudio::model::PortList::portIndexForModelObject ( ModelObject modelObject) const

Returns the port index for the ModelObject specified by modelObject.

ThermalZone openstudio::model::PortList::thermalZone ( ) const

Friends And Related Function Documentation

typedef boost::optional<PortList> OptionalPortList
related
typedef std::vector<PortList> PortListVector
related