Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ChannelFacetMap Class Reference

#include <Channels/ChannelFacet.H>

Inheritance diagram for ChannelFacetMap:

Inheritance graph
[legend]
Collaboration diagram for ChannelFacetMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

Mix-in class designed to be inherited to provide facets to the subclass.

This map can hold various ChannelFacet elements and provides a basic interface to add/retrieve ChannelFacet elements. SingleChannel and ComplexChannel both inherit from ChannelFacetMap.

Definition at line 79 of file ChannelFacet.H.

Public Member Functions

 ChannelFacetMap ()
 Default constructor.
virtual ~ChannelFacetMap ()
 Virtual destructor.
void writeFacetsTo (ParamMap &pmap) const
 Write our facets out to a ParamMap.
void readFacetsFrom (const ParamMap &pmap)
 Read our facets back in from a ParamMap.
template<class T>
bool hasFacet () const
 Query if we have a facet of type T.
template<class T>
rutz::shared_ptr< T > getFacet () const
 Get the facet of type T.
template<class T>
void setFacet (rutz::shared_ptr< T > f)
 Install a facet of type T.
unsigned int numFacets () const
 Number of installed facets.

Classes

struct  Impl


Constructor & Destructor Documentation

ChannelFacetMap::ChannelFacetMap  ) 
 

Default constructor.

Definition at line 63 of file ChannelFacet.C.

ChannelFacetMap::~ChannelFacetMap  )  [virtual]
 

Virtual destructor.

Definition at line 69 of file ChannelFacet.C.


Member Function Documentation

template<class T>
rutz::shared_ptr< T > ChannelFacetMap::getFacet  )  const [inline]
 

Get the facet of type T.

Will throw an exception if there is no such facet (check hasFacet() first).

Definition at line 137 of file ChannelFacet.H.

References ASSERT, rutz::demangled_name(), rutz::shared_ptr< T >::get(), and LFATAL.

Referenced by OptimalGainsFinder::visitComplexChannel(), GuidedSearchBiaser::visitComplexChannel(), OptimalGainsFinder::visitSingleChannel(), and GuidedSearchBiaser::visitSingleChannel().

template<class T>
bool ChannelFacetMap::hasFacet  )  const [inline]
 

Query if we have a facet of type T.

Definition at line 130 of file ChannelFacet.H.

Referenced by OptimalGainsFinder::visitComplexChannel(), GuidedSearchBiaser::visitComplexChannel(), ChannelVisitorInstallFacet< CFS, CFC >::visitComplexChannel(), OptimalGainsFinder::visitSingleChannel(), GuidedSearchBiaser::visitSingleChannel(), and ChannelVisitorInstallFacet< CFS, CFC >::visitSingleChannel().

unsigned int ChannelFacetMap::numFacets  )  const
 

Number of installed facets.

Definition at line 104 of file ChannelFacet.C.

References ChannelFacetMap::Impl::facets.

void ChannelFacetMap::readFacetsFrom const ParamMap pmap  ) 
 

Read our facets back in from a ParamMap.

Definition at line 88 of file ChannelFacet.C.

References ChannelFacetMap::Impl::facets, ParamMap::getSubpmap(), ParamMap::hasParam(), LFATAL, name, and lobot::stop().

Referenced by SingleChannel::readFrom(), IntegerSimpleChannel::readFrom(), IntegerComplexChannel::readFrom(), and ComplexChannel::readFrom().

template<class T>
void ChannelFacetMap::setFacet rutz::shared_ptr< T >  f  )  [inline]
 

Install a facet of type T.

This will replace any previous such facet.

Definition at line 157 of file ChannelFacet.H.

void ChannelFacetMap::writeFacetsTo ParamMap pmap  )  const
 

Write our facets out to a ParamMap.

Definition at line 75 of file ChannelFacet.C.

References ChannelFacetMap::Impl::facets, ParamMap::putSubpmap(), and lobot::stop().

Referenced by SingleChannel::writeTo(), IntegerSimpleChannel::writeTo(), IntegerComplexChannel::writeTo(), and ComplexChannel::writeTo().


The documentation for this class was generated from the following files:
Generated on Sun Nov 22 13:45:32 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4