code::IndexBase Class Reference

Inheritance diagram for code::IndexBase:

code::ActionSource code::Index code::InMemoryIndex code::SQLIndex code::FAMIndex code::WebIndex code::XMLIndex code::XMLLBIndex code::PostgreSQLIndex List of all members.

Detailed Description

Base class of Index.

Not directly used except by IndexFactory.


Public Member Functions

virtual ~IndexBase ()
 IndexBase (std::vector< SmartPtr< ActionListener > > listeners, double ratio, const TimeInterval &maximumHistory)
 IndexBase ()
const URLgetURL () const
 This will be set by IndexFactory if the Index is created using IndexFactory::createIndex.
void setURL (const URL &u)
 Pass in complete URL, i.e.
void copyListenersFrom (const ActionSource &other)
 copy all the listeners from the other source (replacing our own)
size_t getNumListeners () const
 returns the number of listeners linked to this source.
std::string getDir ()
 Returns a source-specific disk directory.
void addActionListener (SmartPtr< ActionListener > lstnr)
 Subscribe lstnr such that it receives all events from this ActionSource.
void addActionListener (const std::string &event_type, SmartPtr< ActionListener > lstnr)
 Subscribe lstnr such that it receives only this event type from this ActionSource.
void removeActionListener (SmartPtr< ActionListener > lstner)
 Unsubscribe lstnr such that it no longer receives events from this ActionSource.
void removeActionListener (const std::string &eventType, SmartPtr< ActionListener > lstner)
 Unsubscribe the listener so that it does not respond to the the event type noted.
void fireActionPerformed (const ActionEvent &e)
 Convenience function for subclasses to notify ActionListeners of events.
void fireActionPerformed (const ActionEvent *e)
 Convenience function for subclasses to notify ActionListeners of events.
void fireActionPerformed (const std::string &type)
 Convenience function for subclasses to notify ActionListeners of events.

Protected Attributes

double simulationRatio
TimeInterval ageoffInterval
URL url


Constructor & Destructor Documentation

virtual code::IndexBase::~IndexBase (  )  [virtual]

code::IndexBase::IndexBase ( std::vector< SmartPtr< ActionListener > >  listeners,
double  ratio,
const TimeInterval maximumHistory 
)

code::IndexBase::IndexBase (  ) 


Member Function Documentation

void code::ActionSource::addActionListener ( const std::string &  event_type,
SmartPtr< ActionListener lstnr 
) [inline, inherited]

Subscribe lstnr such that it receives only this event type from this ActionSource.

Parameters:
evt_type the event type we are subscribing to
lstnr the action listener to be subscribed.

void code::ActionSource::addActionListener ( SmartPtr< ActionListener lstnr  )  [inline, inherited]

Subscribe lstnr such that it receives all events from this ActionSource.

Parameters:
l the action listener to be subscribed.

void code::ActionSource::copyListenersFrom ( const ActionSource other  )  [inline, inherited]

copy all the listeners from the other source (replacing our own)

void code::ActionSource::fireActionPerformed ( const std::string &  type  )  [inline, inherited]

Convenience function for subclasses to notify ActionListeners of events.

Parameters:
type the type of the ActionEvent to be passed along to the action listeners.

void code::ActionSource::fireActionPerformed ( const ActionEvent e  )  [inline, inherited]

Convenience function for subclasses to notify ActionListeners of events.

Parameters:
actionEvent the event to be passed along to the action listeners.

void code::ActionSource::fireActionPerformed ( const ActionEvent e  )  [inline, inherited]

Convenience function for subclasses to notify ActionListeners of events.

Parameters:
actionEvent the event to be passed along to the action listeners.

std::string code::ActionSource::getDir (  )  [inline, inherited]

Returns a source-specific disk directory.

Default implementation does nothing --- this should be overridden.

Returns:
a source-specific type identifier to indicate what action occurred.

size_t code::ActionSource::getNumListeners (  )  const [inline, inherited]

returns the number of listeners linked to this source.

const URL& code::IndexBase::getURL (  )  const [inline]

This will be set by IndexFactory if the Index is created using IndexFactory::createIndex.

If you construct the Index directly, the URL will be unavailable unless you explicitly call setURL()

Returns:
Complete URL, e.g: "rssd://karnak/data/realtime/radar/multi/code_index.lb&protocol=xmllb"

void code::ActionSource::removeActionListener ( const std::string &  eventType,
SmartPtr< ActionListener lstner 
) [inline, inherited]

Unsubscribe the listener so that it does not respond to the the event type noted.

This works only if the listener was added via addActionListener( type, SmartPtr )

Parameters:
type The event type
lstnr The listener to remove

void code::ActionSource::removeActionListener ( SmartPtr< ActionListener lstner  )  [inline, inherited]

Unsubscribe lstnr such that it no longer receives events from this ActionSource.

Parameters:
lstnr the action listener to be unsubscribed.

void code::IndexBase::setURL ( const URL u  )  [inline]

Pass in complete URL, i.e.

"rssd://karnak/data/realtiem/radar/multi/code_index.lb&protocol=xmllb" This is called by IndexFactory::createIndex


Member Data Documentation

TimeInterval code::IndexBase::ageoffInterval [protected]

double code::IndexBase::simulationRatio [protected]

URL code::IndexBase::url [protected]


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7