Pointwise Plugin SDK
Public Member Functions | Protected Member Functions | List of all members

The structured block to block connection group class. More...

#include <CaeStrConnectionGroup.h>

+ Inheritance diagram for CaeStrConnectionGroup:

Public Member Functions

PWP_UINT32 connectionCount () const
 Get the number of connections in the group. More...
 
PWGM_HCNXN enumConnections (PWP_UINT32 ndx) const
 Get an connection in the group. More...
 
PWGM_HCNXN firstConnection () const
 Get the first connection in the group. More...
 
virtual ~CaeStrConnectionGroup ()
 Destructor. More...
 

Protected Member Functions

virtual PWP_UINT32 connectionCountImpl () const =0
 Get the number of connections in the group. More...
 
virtual PWGM_HCNXN enumConnectionsImpl (PWP_UINT32 ndx) const =0
 Get a connection in the group. More...
 

Detailed Description

The structured block to block connection group class.

The CaeStrConnectionGroup class defines the required interface for a collection of PWGM_HCNXN handles. This interface presents the connection collection as a sequential array. The connections are addressed using an index from 0 to connectionCount() - 1.

The public interface provides three methods; connectionCount(), enumConnections(), and firstConnection(). These methods use two protected virtual methods to implement the behavior.

A connection group subclass must inherit CaeStrConnectionGroup and implement its two pure virtual methods; connectionCountImpl() and enumConnectionsImpl(). This abstraction lets connection group subclasses store the PWGM_HCNXN handles any way it needs as long as they can be addressed sequentially.

Sample Usage:

The following snippet is extracted from CaeStrBlock.

virtual PWP_UINT32 connectionCountImpl() const {
return PwBlkConnectionCount(block_);
}
return PwBlkEnumConnections(block_, ndx);
}
See also
CaeStrBlock, CaeStrGridModel.

Definition at line 45 of file CaeStrConnectionGroup.h.

Constructor & Destructor Documentation

◆ ~CaeStrConnectionGroup()

virtual CaeStrConnectionGroup::~CaeStrConnectionGroup ( )
inlinevirtual

Destructor.

Definition at line 49 of file CaeStrConnectionGroup.h.

Member Function Documentation

◆ connectionCount()

PWP_UINT32 CaeStrConnectionGroup::connectionCount ( ) const
inline

Get the number of connections in the group.

Returns
The total number of connections in the group.

Definition at line 57 of file CaeStrConnectionGroup.h.

References connectionCountImpl().

◆ connectionCountImpl()

virtual PWP_UINT32 CaeStrConnectionGroup::connectionCountImpl ( ) const
protectedpure virtual

Get the number of connections in the group.

Connection group subclasses must implement this pure virtual method.

Returns
The total number of connections in the group.

Referenced by connectionCount().

◆ enumConnections()

PWGM_HCNXN CaeStrConnectionGroup::enumConnections ( PWP_UINT32  ndx) const
inline

Get an connection in the group.

Parameters
ndxThe connection's sequential index.
Returns
The connection's PWGM_HCNXN. If ndx is invalid, the returned handle is invalid.
See also
PWGM_HCNXN, PWGM_HCNXN_ISVALID()

Definition at line 68 of file CaeStrConnectionGroup.h.

References enumConnectionsImpl().

Referenced by CaeStrConnection::moveFirst(), and CaeStrConnection::moveTo().

◆ enumConnectionsImpl()

virtual PWGM_HCNXN CaeStrConnectionGroup::enumConnectionsImpl ( PWP_UINT32  ndx) const
protectedpure virtual

Get a connection in the group.

Connection group subclasses must implement this pure virtual method.

Parameters
ndxThe connection's sequential index.
Returns
The connection's PWGM_HCNXN. If ndx is invalid, the returned handle is invalid.
See also
PWGM_HCNXN, PWGM_HCNXN_ISVALID()

Referenced by enumConnections(), and firstConnection().

◆ firstConnection()

PWGM_HCNXN CaeStrConnectionGroup::firstConnection ( ) const
inline

Get the first connection in the group.

Returns
The connection's PWGM_HCNXN. If the group is empty, the returned handle is invalid.
Note
Equivalent to enumConnections(0)
See also
PWGM_HCNXN, PWGM_HCNXN_ISVALID()

Definition at line 79 of file CaeStrConnectionGroup.h.

References enumConnectionsImpl().


The documentation for this class was generated from the following file:
PWP_UINT32
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
CaeStrConnectionGroup::enumConnectionsImpl
virtual PWGM_HCNXN enumConnectionsImpl(PWP_UINT32 ndx) const =0
Get a connection in the group.
CaeStrConnectionGroup::connectionCountImpl
virtual PWP_UINT32 connectionCountImpl() const =0
Get the number of connections in the group.
PWGM_HCNXN
An opaque handle to a structured, inter-block connection.
Definition: apiGridModel.h:482
PwBlkEnumConnections
PWGM_HCNXN PwBlkEnumConnections(PWGM_HBLOCK block, PWP_UINT32 ndx)
Sequentially enumerate the block's connections.
Definition: apiGridModel.cxx:587
PwBlkConnectionCount
PWP_UINT32 PwBlkConnectionCount(PWGM_HBLOCK block)
Get the number of connections in the block.
Definition: apiGridModel.cxx:579