ACT-CV - Machine Vision for Cognitive Modeling
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
FrameObsSupport Class Reference

support for FrameObs More...

#include <FrameObserver.h>

Inheritance diagram for FrameObsSupport:
Inheritance graph
Collaboration diagram for FrameObsSupport:
Collaboration graph

Public Member Functions

void AddObserver (const GCPointer< FrameObs > &obs)
 
void RemoveObserver (const GCPointer< FrameObs > &obs)
 remove obs from the list of observers More...
 
GCPointer< FrameObsFindObserver (const std::string &s) const
 

Protected Member Functions

void FireFrameNotification (IplImage *img, int frameNr) const
 
void FireRegionNotification (const std::vector< RegionInfo > &regions) const
 

Private Types

typedef std::map< std::string,
GCPointer< FrameObs >
>::const_iterator 
obs_iter
 

Private Attributes

std::map< std::string,
GCPointer< FrameObs > > 
observers
 

Detailed Description

support for FrameObs

Definition at line 86 of file FrameObserver.h.

Member Typedef Documentation

typedef std::map<std::string, GCPointer<FrameObs> >::const_iterator FrameObsSupport::obs_iter
private

Definition at line 88 of file FrameObserver.h.

Member Function Documentation

void FrameObsSupport::AddObserver ( const GCPointer< FrameObs > &  obs)

two observers with the same name are not allowed

Definition at line 102 of file FrameObserver.h.

References FrameObs::GetName(), and observers.

Referenced by main(), tests::FrameObsTestDifferent::Run(), and tests::FrameObsTestEqualNames::Run().

GCPointer<FrameObs> FrameObsSupport::FindObserver ( const std::string &  s) const

don't call this too often. String matching is expensive

Definition at line 121 of file FrameObserver.h.

References observers.

void FrameObsSupport::FireFrameNotification ( IplImage *  img,
int  frameNr 
) const
protected
void FrameObsSupport::FireRegionNotification ( const std::vector< RegionInfo > &  regions) const
protected

Definition at line 95 of file FrameObserver.h.

References observers.

Referenced by FrameLoopImpl::LoopUntilKeyPress(), and FrameLoopImpl::SingleFrame().

void FrameObsSupport::RemoveObserver ( const GCPointer< FrameObs > &  obs)

remove obs from the list of observers

Warning
uses the name of obs, no checks are done on the instance

Definition at line 112 of file FrameObserver.h.

References FrameObs::GetName(), and observers.

Referenced by tests::FrameObsTestDifferent::Run(), and tests::FrameObsTestEqualNames::Run().

Member Data Documentation

std::map<std::string, GCPointer<FrameObs> > FrameObsSupport::observers
private

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


ACT-CV - Machine Vision for Cognitive Modeling
© 2015 Marc Halbruegge (actcvlibrary@googlemail.com)