LiveSupport::Scheduler::PostgresqlPlayLog Class Reference

#include <PostgresqlPlayLog.h>

Inheritance diagram for LiveSupport::Scheduler::PostgresqlPlayLog:

[legend]
Collaboration diagram for LiveSupport::Scheduler::PostgresqlPlayLog:

[legend]
List of all members.

Detailed Description

An object containing a log of the clips played in a PostreSQL database.

This object has to be configured with a simple empty element, as the following:


      <postgresqlPlayLog/>
  

The DTD for the above element is:


  <!ELEMENT postgresqlPlayLog EMPTY >
  

Author:
Author
paul
Version:
Revision
2833

Definition at line 86 of file PostgresqlPlayLog.h.

Public Member Functions

 PostgresqlPlayLog (Ptr< Db::ConnectionManagerInterface >::Ref cm) throw ()
 Construct a PostgresqlPlayLog.
virtual ~PostgresqlPlayLog (void) throw ()
 A virtual destructor, as this class has virtual functions.
virtual void configure (const xmlpp::Element &element) throw (std::invalid_argument, std::logic_error)
 Configure the object based on the XML element supplied.
virtual Ptr< UniqueId >::Ref addPlayLogEntry (Ptr< const UniqueId >::Ref audioClipId, Ptr< const ptime >::Ref timeStamp) throw (std::invalid_argument)
 Add a new entry to the play log.
virtual Ptr< std::vector<
Ptr< PlayLogEntry >::Ref
> >::Ref 
getPlayLogEntries (Ptr< const ptime >::Ref fromTime, Ptr< const ptime >::Ref toTime) throw (std::invalid_argument)
 Return the list of play log entries for a specified time interval.

Static Public Member Functions

static const std::string getConfigElementName (void) throw ()
 Return the name of the XML element this object expects to be sent to a call to configure().


Constructor & Destructor Documentation

LiveSupport::Scheduler::PostgresqlPlayLog::PostgresqlPlayLog ( Ptr< Db::ConnectionManagerInterface >::Ref  cm  )  throw () [inline]

Construct a PostgresqlPlayLog.

Parameters:
cm the connection manager the PostgresqlPlayLog will use to connect to the database.

Definition at line 136 of file PostgresqlPlayLog.h.

virtual LiveSupport::Scheduler::PostgresqlPlayLog::~PostgresqlPlayLog ( void   )  throw () [inline, virtual]

A virtual destructor, as this class has virtual functions.

Definition at line 146 of file PostgresqlPlayLog.h.


Member Function Documentation

Ptr< UniqueId >::Ref PostgresqlPlayLog::addPlayLogEntry ( Ptr< const UniqueId >::Ref  audioClipId,
Ptr< const ptime >::Ref  timeStamp 
) throw (std::invalid_argument) [virtual]

Add a new entry to the play log.

Parameters:
audioClipId the audio clip played.
timeStamp the time the clip was played (started).
Returns:
the id of the newly created play log entry.

Implements LiveSupport::Scheduler::PlayLogInterface.

Definition at line 119 of file PostgresqlPlayLog.cxx.

void PostgresqlPlayLog::configure ( const xmlpp::Element &  element  )  throw (std::invalid_argument, std::logic_error) [virtual]

Configure the object based on the XML element supplied.

The supplied element is expected to be of the name returned by configElementName().

Parameters:
element the XML element to configure the object from.
Exceptions:
std::invalid_argument if the supplied XML element contains bad configuraiton information
std::logic_error if the object has already been configured, and can not be reconfigured.

Implements LiveSupport::Core::Configurable.

Definition at line 101 of file PostgresqlPlayLog.cxx.

static const std::string LiveSupport::Scheduler::PostgresqlPlayLog::getConfigElementName ( void   )  throw () [inline, static]

Return the name of the XML element this object expects to be sent to a call to configure().

Returns:
the name of the expected XML configuration element.

Definition at line 157 of file PostgresqlPlayLog.h.

Referenced by LiveSupport::Scheduler::PlayLogFactory::configure().

Ptr< std::vector< Ptr< PlayLogEntry >::Ref > >::Ref PostgresqlPlayLog::getPlayLogEntries ( Ptr< const ptime >::Ref  fromTime,
Ptr< const ptime >::Ref  toTime 
) throw (std::invalid_argument) [virtual]

Return the list of play log entries for a specified time interval.

Parameters:
fromTime the start of the time of the interval queried, inclusive
toTime to end of the time of the interval queried, non-inclusive
Returns:
a vector of the play log entries for the time region.

Implements LiveSupport::Scheduler::PlayLogInterface.

Definition at line 163 of file PostgresqlPlayLog.cxx.


The documentation for this class was generated from the following files:
Generated on Sat Sep 22 02:00:41 2007 for Campcaster by  1.4.7