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 anna_diameter_codec_MessagesDeque_hpp
10 #define anna_diameter_codec_MessagesDeque_hpp
27 typedef std::deque<anna::diameter::codec::Message*> codec_messages_deque;
28 typedef std::deque<anna::diameter::codec::Message*>::iterator codec_messages_deque_iterator;
29 typedef std::deque<anna::diameter::codec::Message*>::const_iterator codec_messages_deque_const_iterator;
30 typedef std::map < int /* message code */, codec_messages_deque* > messages_container;
31 typedef std::map < int /* message code */, codec_messages_deque* >::iterator messages_iterator;
32 typedef std::map < int /* message code */, codec_messages_deque* >::const_iterator messages_const_iterator;
34 messages_container a_deques;
38 MessagesDeque() { a_rotate = false; }
39 ~MessagesDeque() { clear(); }
41 bool rotate() const throw() { return a_rotate; }
42 void rotate(bool r) throw() { a_rotate = r; }
44 void clear () throw();
45 void dump (const char *filenamePrefix = "programmed_message") throw();
46 void addMessage(int code, anna::diameter::codec::Message *message) throw();
47 anna::diameter::codec::Message* getMessage(int code) const throw();
48 void nextMessage(int code) throw();
49 std::string asString(const char *queueName) const throw();