1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #ifndef example_diameter_launcher_TestTimer_hpp
10 #define example_diameter_launcher_TestTimer_hpp
12 #include <anna/core/RuntimeException.hpp>
13 #include <anna/core/Allocator.hpp>
14 #include <anna/timex/Transaction.hpp>
21 class TestTimer : public anna::timex::Transaction {
25 struct Type { enum _v { TimeLeft, Delay }; };
26 static const char* asText(const Type::_v type) throw();
29 TestStep* getTestCaseStep() throw() { return reinterpret_cast <TestStep*>(getContext()); }
30 const TestStep* getTestCaseStep() const throw() { return reinterpret_cast <const TestStep*>(getContext()); }
32 void setType(const Type::_v type) throw() { a_type = type; }
33 const Type::_v &getType(const Type::_v type) const throw() { return a_type; }
35 std::string asString() const throw();
42 void expire(anna::timex::Engine*) throw(anna::RuntimeException);
44 friend class anna::Allocator<TestTimer>;