5 * Created by Alyssa Milburn on Wed 10 Nov 2004.
6 * Copyright (c) 2004-2006 Alyssa Milburn. All rights reserved.
7 * Copyright (c) 2005 Bryan Donlan. All rights reserved.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
21 #ifndef _SCRIPTORIUM_H
22 #define _SCRIPTORIUM_H
25 #include <boost/shared_ptr.hpp>
26 using boost::shared_ptr
;
33 FRIEND_SERIALIZE(Scriptorium
);
34 // unsigned int = combined family/genus/species
35 // unsigned short = event id
36 std::map
<unsigned int, std::map
<unsigned short, shared_ptr
<script
> > > scripts
;
38 std::map
<unsigned short, shared_ptr
<script
> > &getScripts(unsigned int value
) { return scripts
[value
]; }
39 unsigned int calculateValue(unsigned char family
, unsigned char genus
, unsigned short species
);
42 void addScript(unsigned char family
, unsigned char genus
, unsigned short species
, unsigned short event
, shared_ptr
<script
> s
);
43 void delScript(unsigned char family
, unsigned char genus
, unsigned short species
, unsigned short event
);
44 shared_ptr
<script
> getScript(unsigned char family
, unsigned char genus
, unsigned short species
, unsigned short event
);