Anope IRC Services  Version 2.0
cs_entrymsg.h
Go to the documentation of this file.
1 /*
2  * (C) 2003-2014 Anope Team
3  * Contact us at team@anope.org
4  *
5  * Please read COPYING and README for further details.
6  *
7  */
8 
9 struct EntryMsg
10 {
14  time_t when;
15 
16  virtual ~EntryMsg() { }
17  protected:
18  EntryMsg() { }
19 };
20 
21 struct EntryMessageList : Serialize::Checker<std::vector<EntryMsg *> >
22 {
23  protected:
24  EntryMessageList() : Serialize::Checker<std::vector<EntryMsg *> >("EntryMsg") { }
25 
26  public:
28  {
29  for (unsigned i = (*this)->size(); i > 0; --i)
30  delete (*this)->at(i - 1);
31  }
32 
33  virtual EntryMsg* Create() = 0;
34 };
35 
Anope::string message
Definition: cs_entrymsg.h:13
EntryMessageList()
Definition: cs_entrymsg.h:24
virtual EntryMsg * Create()=0
virtual ~EntryMsg()
Definition: cs_entrymsg.h:16
Definition: cs_entrymsg.h:21
Checker(const Anope::string &n)
Definition: serialize.h:202
virtual ~EntryMessageList()
Definition: cs_entrymsg.h:27
Definition: cs_entrymsg.h:9
Anope::string creator
Definition: cs_entrymsg.h:12
EntryMsg()
Definition: cs_entrymsg.h:18
Anope::string chan
Definition: cs_entrymsg.h:11
time_t when
Definition: cs_entrymsg.h:14