X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FMyCounterRecorder.hpp;h=d28312527141247dbb76b6c3103080afff7b7644;hb=7512d6f74897d5f85240f7987ddcdc4e64e220e7;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=68a8fe342d8337ec1a86b57920bc7dcf7faf2413;p=anna.git diff --git a/example/diameter/launcher/MyCounterRecorder.hpp b/example/diameter/launcher/MyCounterRecorder.hpp index e69de29..d283125 100644 --- a/example/diameter/launcher/MyCounterRecorder.hpp +++ b/example/diameter/launcher/MyCounterRecorder.hpp @@ -0,0 +1,40 @@ +// ANNA - Anna is Not Nothingness Anymore // +// // +// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo // +// // +// See project site at http://redmine.teslayout.com/projects/anna-suite // +// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE // + + +#ifndef example_diameter_launcher_MyCounterRecorder_hpp +#define example_diameter_launcher_MyCounterRecorder_hpp + +// Standard +#include // chmod +#include // open / write +#include + +// Process +#include "MyCounterRecorderClock.hpp" + + +class MyCounterRecorder : public anna::oam::CounterRecorder { + + // attributes + int a_stream; + std::string a_fileNamePrefix; + std::string a_fileName; + time_t a_previousTime; + std::string a_fixedLine; + + // pure virtual definitions: + void open() throw(anna::RuntimeException); + void apply(const anna::oam::Counter& counter) throw(anna::RuntimeException); + void close() throw(); + std::string asString() const throw(); + +public: + MyCounterRecorder(const std::string &fnp); +}; + +#endif