CLAM::FlattenedNetwork Class Reference

#include <FlattenedNetwork.hxx>

Inheritance diagram for CLAM::FlattenedNetwork:

CLAM::BaseNetwork CLAM::Component CLAM::Network

List of all members.


Detailed Description

Definition at line 46 of file FlattenedNetwork.hxx.


Public Member Functions

 FlattenedNetwork ()
virtual ~FlattenedNetwork ()
const std::string & GetName () const
void SetName (const std::string &name)
virtual const char * GetClassName () const
 Return the class name.
bool IsStopped () const
void Start ()
void Stop ()
void Do ()
void AddFlowControl (FlowControl *)
 Gets the ownership of the FlowControl passed.
void Clear ()
void SetPlayer (NetworkPlayer *player)
 Set the object in charge of managing the processing thread.
unsigned BackendBufferSize ()
unsigned BackendSampleRate ()
virtual void StoreOn (Storage &storage) const
 serialization methods
virtual void LoadFrom (Storage &storage)
 Loads component's subitems from the given Storage.
bool UpdateSelections (const NamesList &processingsNamesList)
 methods related to copy&paste processings from canvas
void setPasteMode ()
bool SetProcessingsGeometries (const ProcessingsGeometriesMap &processingsGeometries)
 canvas related geometries
const ProcessingsGeometriesMap GetAndClearGeometries ()
bool ConnectPorts (const std::string &, const std::string &)
 methods related to connect/disconnect interface
bool ConnectControls (const std::string &, const std::string &)
bool DisconnectPorts (const std::string &, const std::string &)
bool DisconnectControls (const std::string &, const std::string &)
ProcessingGetProcessing (const std::string &name) const
 methods used to create processings and get them
void AddProcessing (const std::string &, Processing *)
 add method using a pointer to a new processing
void AddProcessing (const std::string &name, const std::string &key)
 add method using a key to get the new processing from factory
std::string AddProcessing (const std::string &key)
std::string GetUnusedName (const std::string &prefix) const
void RemoveProcessing (const std::string &)
bool HasProcessing (const std::string &name) const
 methods used to create processings and get them
bool ConfigureProcessing (const std::string &, const ProcessingConfig &)
 It configures the processing with the given processing id and config object and notifies this to the network.
void ReconfigureAllProcessings ()
 Calls Configure() for each processing with its current configuration.
bool RenameProcessing (const std::string &oldName, const std::string &newName)
const std::string & GetNetworkId (const Processing *proc) const
ProcessingsMap::iterator BeginProcessings ()
ProcessingsMap::iterator EndProcessings ()
ProcessingsMap::const_iterator BeginProcessings () const
ProcessingsMap::const_iterator EndProcessings () const
InPortBaseGetInPortByCompleteName (const std::string &) const
OutPortBaseGetOutPortByCompleteName (const std::string &) const
InControlGetInControlByCompleteName (const std::string &) const
OutControlGetOutControlByCompleteName (const std::string &) const
NamesList GetInPortsConnectedTo (const std::string &) const
NamesList GetInControlsConnectedTo (const std::string &) const
InPortsList GetInPortsConnectedTo (OutPortBase &) const
std::string GetConnectorIdentifier (const std::string &) const
std::string GetProcessingIdentifier (const std::string &) const
bool IsReady () const
 Tells whether the network is ready to rock.
bool IsEmpty () const
 Returns true when it has no processings.
bool HasMisconfiguredProcessings () const
 Returns true when some processing is misconfigured.
bool HasUnconnectedInPorts () const
 Returns true when a processing has an inport that is not connected.
bool HasSyncSource () const
 Tell whether the network contains any processing which limits the cpu usage such as file or device interfaces.
std::string GetConfigurationErrors () const
 Returns an string containing configuration errors.
std::string GetUnconnectedInPorts () const
 Returns an string the full name of the unconnected inports.

Constructor & Destructor Documentation

CLAM::FlattenedNetwork::FlattenedNetwork (  ) 

Definition at line 37 of file FlattenedNetwork.cxx.

CLAM::FlattenedNetwork::~FlattenedNetwork (  )  [virtual]

Definition at line 44 of file FlattenedNetwork.cxx.

References Clear().


Member Function Documentation

const std::string& CLAM::FlattenedNetwork::GetName ( void   )  const [inline, virtual]

Implements CLAM::BaseNetwork.

Definition at line 55 of file FlattenedNetwork.hxx.

void CLAM::FlattenedNetwork::SetName ( const std::string &  name  )  [inline, virtual]

Implements CLAM::BaseNetwork.

Definition at line 56 of file FlattenedNetwork.hxx.

virtual const char* CLAM::FlattenedNetwork::GetClassName (  )  const [inline, virtual]

Return the class name.

Implements CLAM::BaseNetwork.

Definition at line 57 of file FlattenedNetwork.hxx.

bool CLAM::FlattenedNetwork::IsStopped (  )  const

void CLAM::FlattenedNetwork::Start (  ) 

void CLAM::FlattenedNetwork::Stop (  ) 

void CLAM::FlattenedNetwork::Do ( void   ) 

void CLAM::FlattenedNetwork::AddFlowControl ( FlowControl flowControl  ) 

Gets the ownership of the FlowControl passed.

So it will be deleted by the destructor

Definition at line 300 of file FlattenedNetwork.cxx.

References CLAM::FlowControl::AttachToNetwork().

void CLAM::FlattenedNetwork::Clear (  )  [virtual]

Implements CLAM::BaseNetwork.

Definition at line 563 of file FlattenedNetwork.cxx.

References IsStopped(), RemoveProcessing(), and Stop().

Referenced by LoadFrom(), and ~FlattenedNetwork().

void CLAM::FlattenedNetwork::SetPlayer ( NetworkPlayer player  ) 

Set the object in charge of managing the processing thread.

Receives property of the player.

Definition at line 306 of file FlattenedNetwork.cxx.

References CLAM::NetworkPlayer::Init(), and CLAM::NetworkPlayer::SetNetworkBackLink().

unsigned CLAM::FlattenedNetwork::BackendBufferSize (  )  [virtual]

unsigned CLAM::FlattenedNetwork::BackendSampleRate (  )  [virtual]

Implements CLAM::BaseNetwork.

Definition at line 318 of file FlattenedNetwork.cxx.

References CLAM::NetworkPlayer::BackendSampleRate().

void CLAM::FlattenedNetwork::StoreOn ( Storage storage  )  const [virtual]

void CLAM::FlattenedNetwork::LoadFrom ( Storage storage  )  [virtual]

bool CLAM::FlattenedNetwork::UpdateSelections ( const NamesList processingsNamesList  ) 

methods related to copy&paste processings from canvas

Definition at line 233 of file FlattenedNetwork.cxx.

void CLAM::FlattenedNetwork::setPasteMode (  )  [inline, virtual]

Implements CLAM::BaseNetwork.

Definition at line 82 of file FlattenedNetwork.hxx.

bool CLAM::FlattenedNetwork::SetProcessingsGeometries ( const ProcessingsGeometriesMap processingsGeometries  ) 

canvas related geometries

Definition at line 254 of file FlattenedNetwork.cxx.

const FlattenedNetwork::ProcessingsGeometriesMap CLAM::FlattenedNetwork::GetAndClearGeometries (  )  [virtual]

Implements CLAM::BaseNetwork.

Definition at line 264 of file FlattenedNetwork.cxx.

bool CLAM::FlattenedNetwork::ConnectPorts ( const std::string &  producer,
const std::string &  consumer 
) [virtual]

bool CLAM::FlattenedNetwork::ConnectControls ( const std::string &  producer,
const std::string &  consumer 
) [virtual]

bool CLAM::FlattenedNetwork::DisconnectPorts ( const std::string &  producer,
const std::string &  consumer 
) [virtual]

bool CLAM::FlattenedNetwork::DisconnectControls ( const std::string &  producer,
const std::string &  consumer 
) [virtual]

Processing & CLAM::FlattenedNetwork::GetProcessing ( const std::string &  name  )  const [virtual]

methods used to create processings and get them

Implements CLAM::BaseNetwork.

Definition at line 325 of file FlattenedNetwork.cxx.

References CLAM_ASSERT, and HasProcessing().

Referenced by GetInControlByCompleteName(), GetInPortByCompleteName(), GetOutControlByCompleteName(), GetOutPortByCompleteName(), and LoadFrom().

void CLAM::FlattenedNetwork::AddProcessing ( const std::string &  name,
Processing proc 
) [virtual]

void CLAM::FlattenedNetwork::AddProcessing ( const std::string &  name,
const std::string &  key 
) [virtual]

add method using a key to get the new processing from factory

Implements CLAM::BaseNetwork.

Definition at line 346 of file FlattenedNetwork.cxx.

References AddProcessing(), CLAM::Factory< AbstractProductType >::CreateSafe(), and CLAM::ProcessingFactory::GetInstance().

std::string CLAM::FlattenedNetwork::AddProcessing ( const std::string &  key  )  [virtual]

Implements CLAM::BaseNetwork.

Definition at line 354 of file FlattenedNetwork.cxx.

References AddProcessing(), and GetUnusedName().

std::string CLAM::FlattenedNetwork::GetUnusedName ( const std::string &  prefix  )  const [virtual]

Implements CLAM::BaseNetwork.

Definition at line 361 of file FlattenedNetwork.cxx.

References CLAM_ASSERT, and HasProcessing().

Referenced by AddProcessing().

void CLAM::FlattenedNetwork::RemoveProcessing ( const std::string &  name  )  [virtual]

Implements CLAM::BaseNetwork.

Definition at line 376 of file FlattenedNetwork.cxx.

References CLAM_ASSERT, IsStopped(), CLAM::FlowControl::ProcessingRemovedFromNetwork(), and Stop().

Referenced by Clear().

bool CLAM::FlattenedNetwork::HasProcessing ( const std::string &  name  )  const [virtual]

methods used to create processings and get them

Implements CLAM::BaseNetwork.

Definition at line 396 of file FlattenedNetwork.cxx.

Referenced by GetProcessing(), and GetUnusedName().

bool CLAM::FlattenedNetwork::ConfigureProcessing ( const std::string &  name,
const ProcessingConfig newConfig 
) [virtual]

It configures the processing with the given processing id and config object and notifies this to the network.

So use this method instead of getting the processing with GetProcessing and calling Configure on it.

Implements CLAM::BaseNetwork.

Definition at line 402 of file FlattenedNetwork.cxx.

References CLAM_ASSERT, IsStopped(), CLAM::FlowControl::ProcessingConfigured(), and Stop().

void CLAM::FlattenedNetwork::ReconfigureAllProcessings (  )  [virtual]

Calls Configure() for each processing with its current configuration.

Implements CLAM::BaseNetwork.

Definition at line 413 of file FlattenedNetwork.cxx.

References CLAM::Processing::Configure(), and CLAM::Processing::GetConfig().

bool CLAM::FlattenedNetwork::RenameProcessing ( const std::string &  oldName,
const std::string &  newName 
) [virtual]

Implements CLAM::BaseNetwork.

Definition at line 650 of file FlattenedNetwork.cxx.

const std::string & CLAM::FlattenedNetwork::GetNetworkId ( const Processing proc  )  const [virtual]

FlattenedNetwork::ProcessingsMap::iterator CLAM::FlattenedNetwork::BeginProcessings (  )  [virtual]

FlattenedNetwork::ProcessingsMap::iterator CLAM::FlattenedNetwork::EndProcessings (  )  [virtual]

FlattenedNetwork::ProcessingsMap::const_iterator CLAM::FlattenedNetwork::BeginProcessings (  )  const [virtual]

Implements CLAM::BaseNetwork.

Definition at line 583 of file FlattenedNetwork.cxx.

FlattenedNetwork::ProcessingsMap::const_iterator CLAM::FlattenedNetwork::EndProcessings (  )  const [virtual]

Implements CLAM::BaseNetwork.

Definition at line 588 of file FlattenedNetwork.cxx.

InPortBase & CLAM::FlattenedNetwork::GetInPortByCompleteName ( const std::string &  name  )  const [virtual]

OutPortBase & CLAM::FlattenedNetwork::GetOutPortByCompleteName ( const std::string &  name  )  const [virtual]

InControl & CLAM::FlattenedNetwork::GetInControlByCompleteName ( const std::string &  name  )  const [virtual]

OutControl & CLAM::FlattenedNetwork::GetOutControlByCompleteName ( const std::string &  name  )  const [virtual]

FlattenedNetwork::NamesList CLAM::FlattenedNetwork::GetInPortsConnectedTo ( const std::string &  producer  )  const [virtual]

FlattenedNetwork::NamesList CLAM::FlattenedNetwork::GetInControlsConnectedTo ( const std::string &  producer  )  const [virtual]

FlattenedNetwork::InPortsList CLAM::FlattenedNetwork::GetInPortsConnectedTo ( OutPortBase producer  )  const [virtual]

std::string CLAM::FlattenedNetwork::GetConnectorIdentifier ( const std::string &  str  )  const [virtual]

std::string CLAM::FlattenedNetwork::GetProcessingIdentifier ( const std::string &  str  )  const [virtual]

bool CLAM::FlattenedNetwork::IsReady (  )  const [virtual]

Tells whether the network is ready to rock.

A network is ready when:

  • it contains any processing,
  • all processings are properly configured, and
  • all in ports are connected,

Implements CLAM::BaseNetwork.

Definition at line 662 of file FlattenedNetwork.cxx.

References HasMisconfiguredProcessings(), HasUnconnectedInPorts(), and IsEmpty().

bool CLAM::FlattenedNetwork::IsEmpty (  )  const [virtual]

Returns true when it has no processings.

Implements CLAM::BaseNetwork.

Definition at line 670 of file FlattenedNetwork.cxx.

Referenced by IsReady().

bool CLAM::FlattenedNetwork::HasMisconfiguredProcessings (  )  const [virtual]

Returns true when some processing is misconfigured.

Implements CLAM::BaseNetwork.

Definition at line 675 of file FlattenedNetwork.cxx.

References BeginProcessings(), and EndProcessings().

Referenced by IsReady().

bool CLAM::FlattenedNetwork::HasUnconnectedInPorts (  )  const [virtual]

Returns true when a processing has an inport that is not connected.

Implements CLAM::BaseNetwork.

Definition at line 684 of file FlattenedNetwork.cxx.

References CLAM::InPortRegistry::Begin(), BeginProcessings(), CLAM::InPortRegistry::End(), EndProcessings(), and CLAM::Processing::GetInPorts().

Referenced by IsReady().

bool CLAM::FlattenedNetwork::HasSyncSource (  )  const [virtual]

Tell whether the network contains any processing which limits the cpu usage such as file or device interfaces.

This is needed when executing a network in a real time process.

Implements CLAM::BaseNetwork.

Definition at line 720 of file FlattenedNetwork.cxx.

References BeginProcessings(), and EndProcessings().

std::string CLAM::FlattenedNetwork::GetConfigurationErrors (  )  const [virtual]

Returns an string containing configuration errors.

Don't rely on the format because is subject to change.

Implements CLAM::BaseNetwork.

Definition at line 730 of file FlattenedNetwork.cxx.

References BeginProcessings(), and EndProcessings().

std::string CLAM::FlattenedNetwork::GetUnconnectedInPorts (  )  const [virtual]

Returns an string the full name of the unconnected inports.

Don't rely on the format because is subject to change.

Implements CLAM::BaseNetwork.

Definition at line 701 of file FlattenedNetwork.cxx.

References CLAM::InPortRegistry::Begin(), BeginProcessings(), CLAM::InPortRegistry::End(), EndProcessings(), and CLAM::Processing::GetInPorts().


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

Generated on Tue Aug 12 22:33:47 2008 for CLAM by  doxygen 1.5.5