#include <LogCodec.hpp>
Inherits pion::platform::Codec.
Definition at line 49 of file LogCodec.hpp.
Public Member Functions | |
| LogCodec (void) | |
| constructs a new LogCodec object | |
| virtual | ~LogCodec () |
| virtual destructor: this class is meant to be extended | |
| virtual const std::string & | getContentType (void) const |
| returns an HTTP content type that is used by this Codec | |
| virtual pion::platform::CodecPtr | clone (void) const |
| virtual void | write (std::ostream &out, const pion::platform::Event &e) |
| virtual void | finish (std::ostream &out) |
| virtual bool | read (std::istream &in, pion::platform::Event &e) |
| virtual void | setConfig (const pion::platform::Vocabulary &v, const xmlNodePtr config_ptr) |
| virtual void | updateVocabulary (const pion::platform::Vocabulary &v) |
| void | reset (void) |
| resets the configuration for this Codec | |
Classes | |
| class | BadFormatException |
| exception thrown if the Codec is unable to parse a format More... | |
| class | EmptyFieldException |
| exception thrown if the Codec configuration includes an empty field name More... | |
| class | EmptyTermException |
| exception thrown if the Codec configuration does not define a term in a field mapping More... | |
| struct | LogField |
| data type used to configure how the log format describes Vocabulary Terms | |
| class | UnknownTermException |
| exception thrown if the Codec configuration uses an unknown term in a field mapping More... | |
| CodecPtr pion::plugins::LogCodec::clone | ( | void | ) | const [virtual] |
clones the codec, returning a pointer to the cloned copy
Implements pion::platform::Codec.
Definition at line 69 of file LogCodec.cpp.
References LogCodec().
| virtual void pion::plugins::LogCodec::finish | ( | std::ostream & | out | ) | [inline, virtual] |
writes any needed footers (currently none for LogCodec) to an output stream
| out | the output stream to which the footers will be written |
Implements pion::platform::Codec.
Definition at line 119 of file LogCodec.hpp.
| bool pion::plugins::LogCodec::read | ( | std::istream & | in, | |
| pion::platform::Event & | e | |||
| ) | [virtual] |
reads an Event from an input stream
| in | the input stream to read the Event from | |
| e | the Event read, if any; null if error |
Implements pion::platform::Codec.
Definition at line 129 of file LogCodec.cpp.
References pion::platform::BasicEvent< CharType, AllocType >::clear(), pion::platform::Codec::getEventType(), and pion::platform::BasicEvent< CharType, AllocType >::getType().
| void pion::plugins::LogCodec::setConfig | ( | const pion::platform::Vocabulary & | v, | |
| const xmlNodePtr | config_ptr | |||
| ) | [virtual] |
sets configuration parameters for this Codec
| v | the Vocabulary that this Codec will use to describe Terms | |
| config_ptr | pointer to a list of XML nodes containing Codec configuration parameters |
Reimplemented from pion::platform::Codec.
Definition at line 224 of file LogCodec.cpp.
References pion::platform::Vocabulary::findTerm(), pion::platform::PlatformPlugin::getId(), and reset().
| void pion::plugins::LogCodec::updateVocabulary | ( | const pion::platform::Vocabulary & | v | ) | [virtual] |
this updates the Vocabulary information used by this Codec; it should be called whenever the global Vocabulary is updated
| v | the Vocabulary that this Codec will use to describe Terms |
copy Term data over from the updated Vocabulary
Reimplemented from pion::platform::Codec.
Definition at line 427 of file LogCodec.cpp.
References pion::platform::Vocabulary::refreshTerm(), pion::platform::Vocabulary::TYPE_DATE, pion::platform::Vocabulary::TYPE_DATE_TIME, and pion::platform::Vocabulary::TYPE_TIME.
| void pion::plugins::LogCodec::write | ( | std::ostream & | out, | |
| const pion::platform::Event & | e | |||
| ) | [virtual] |
writes an Event to an output stream
| out | the output stream to which the Event will be written | |
| e | the Event to write to the output stream |
Implements pion::platform::Codec.
Definition at line 92 of file LogCodec.cpp.
References pion::platform::BasicEvent< CharType, AllocType >::getPointer().
1.4.7