IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
IntaRNA::OutputHandlerHub Class Reference

#include <OutputHandlerHub.h>

Inheritance diagram for IntaRNA::OutputHandlerHub:
Inheritance graph
[legend]
Collaboration diagram for IntaRNA::OutputHandlerHub:
Collaboration graph
[legend]

Public Member Functions

 OutputHandlerHub (const OutputConstraint &outConstraint, const bool deleteOutListOnDestruction=true)
 
 OutputHandlerHub (const OutputHandlerHub &toCopy)
 
virtual ~OutputHandlerHub ()
 
virtual void add (const Interaction &interaction)
 
virtual size_t reported () const
 
virtual void incrementZ (const Z_type subZ)
 
virtual Z_type getZ () const
 
virtual void addOutputHandler (OutputHandler *handler)
 
virtual void setDeleteOnDestruction (const bool deleteOnDestruction)
 
virtual bool isDeleteOnDestruction () const
 
OutputHandlerHub & operator= (const OutputHandlerHub &toCopy)
 
- Public Member Functions inherited from IntaRNA::OutputHandler
 OutputHandler (const OutputConstraint &outConstraint)
 
virtual ~OutputHandler ()
 
const OutputConstraint & getOutputConstraint () const
 

Protected Attributes

std::list< OutputHandler * > outList
 list of OutputHandler objects to forward to
 
bool deleteOutListOnDestruction
 
- Protected Attributes inherited from IntaRNA::OutputHandler
const OutputConstraint outConstraint
 the output constraints to be applied
 
size_t reportedInteractions
 number of reported interactions
 
Z_type Z
 overall partition function for the sequences provided in Z_energy
 

Additional Inherited Members

- Static Public Member Functions inherited from IntaRNA::OutputHandler
static std::string reverse (const std::string &str)
 

Detailed Description

Hub implementation of an OutputHandler that forwards each reported interaction to each of the registered OutputHandler instances.

Constructor & Destructor Documentation

◆ OutputHandlerHub() [1/2]

IntaRNA::OutputHandlerHub::OutputHandlerHub ( const OutputConstraint &  outConstraint,
const bool  deleteOutListOnDestruction = true 
)
inline

construction

Parameters
outConstraintthe output constraint applied to find the reported interaction
deleteOutListOnDestructionwhether or not the objects the hub is forwarding to are to be deleted on destruction

◆ OutputHandlerHub() [2/2]

IntaRNA::OutputHandlerHub::OutputHandlerHub ( const OutputHandlerHub &  toCopy)
inline

copy construction (will not delete the copied OutputHandler list!)

Parameters
toCopythe hub to copy

◆ ~OutputHandlerHub()

IntaRNA::OutputHandlerHub::~OutputHandlerHub ( )
inlinevirtual

destruction

Member Function Documentation

◆ add()

void IntaRNA::OutputHandlerHub::add ( const Interaction &  interaction)
inlinevirtual

Forwards a given RNA-RNA interaction to all registered OutputHandler instances.

Parameters
interactionthe interaction to add

Implements IntaRNA::OutputHandler.

◆ addOutputHandler()

void IntaRNA::OutputHandlerHub::addOutputHandler ( OutputHandler *  handler)
inlinevirtual

Adds a new OutputHandler to the forwarding list.

Parameters
handlerpointer to the handler to forward to

◆ getZ()

Z_type IntaRNA::OutputHandlerHub::getZ ( ) const
inlinevirtual

Access to the partition function (initialized with 0) aggregated via incrementZ().

Returns
the maximal aggregated partition function Z among all handlers

Reimplemented from IntaRNA::OutputHandler.

◆ incrementZ()

void IntaRNA::OutputHandlerHub::incrementZ ( const Z_type  subZ)
inlinevirtual

Increments the overall partition function with the given value.

Note, take care that multiple increments have to represent disjoint subsets of all interactions for the same pair of sequences, otherwise the aggregated overall partition function will be wrong!

Parameters
subZincrement to be added to the overall partition function

Reimplemented from IntaRNA::OutputHandler.

◆ isDeleteOnDestruction()

bool IntaRNA::OutputHandlerHub::isDeleteOnDestruction ( ) const
inlinevirtual

Returns whether or not the OutputHandler instances this hub forwards to are deleted when this hub is deleted.

Returns
true: forward objects are deleted; false: not

◆ operator=()

OutputHandlerHub & IntaRNA::OutputHandlerHub::operator= ( const OutputHandlerHub &  toCopy)
inline

Copies the outList of toCopy but wont delete it later.

NOTE: this (copy) hub will NOT delete the outList to avoid duplicated deletions. This should be done by the original hub (toCopy)

Parameters
toCopythe handler to make this a copy of
Returns
the altered range object (*this)

◆ reported()

size_t IntaRNA::OutputHandlerHub::reported ( ) const
inlinevirtual

Returns the maximal number of reported interactions among all handlers within forwarding list

Returns
the maximal number of reported interactions among all handlers

Reimplemented from IntaRNA::OutputHandler.

◆ setDeleteOnDestruction()

void IntaRNA::OutputHandlerHub::setDeleteOnDestruction ( const bool  deleteOnDestruction)
inlinevirtual

Defines whether or not the OutputHandler instances this hub forwards to are deleted when this hub is deleted.

Parameters
deleteOnDestructiontrue: forward objects are deleted; false: not

Member Data Documentation

◆ deleteOutListOnDestruction

bool IntaRNA::OutputHandlerHub::deleteOutListOnDestruction
protected

whether or not the elements in outList are to be deleted when this object is destroyed

◆ outList

std::list< OutputHandler * > IntaRNA::OutputHandlerHub::outList
protected

list of OutputHandler objects to forward to


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