1 /*
2 
3                           Firewall Builder
4 
5                  Copyright (C) 2011 NetCitadel, LLC
6 
7   Author:  Vadim Kurland     vadim@fwbuilder.org
8 
9   This program is free software which we release under the GNU General Public
10   License. You may redistribute and/or modify this program under the terms
11   of that license as published by the Free Software Foundation; either
12   version 2 of the License, or (at your option) any later version.
13 
14   This program 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
17   GNU General Public License for more details.
18 
19   To get a copy of the GNU General Public License, write to the Free Software
20   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 
22 */
23 
24 
25 #ifndef _ADDRESS_OBJECT_MAKER_H_
26 #define _ADDRESS_OBJECT_MAKER_H_
27 
28 #include "objectMaker.h"
29 
30 #include <QString>
31 
32 
33 class AddressObjectMaker : public ObjectMaker
34 {
35     bool inverted_netmasks;
36 
37 public:
38 
AddressObjectMaker(libfwbuilder::Library * l,ObjectMakerErrorTracker * et)39     AddressObjectMaker(libfwbuilder::Library *l,
40                        ObjectMakerErrorTracker *et) : ObjectMaker(l, et)
41     {
42         inverted_netmasks = false;
43     }
44     virtual ~AddressObjectMaker();
45 
setInvertedNetmasks(bool f)46     void setInvertedNetmasks(bool f) { inverted_netmasks = f; }
getInvertedNetmasks()47     bool getInvertedNetmasks() { return inverted_netmasks; }
48 
49     virtual libfwbuilder::FWObject* createObject(ObjectSignature &sig);
50 
51 protected:
52     virtual libfwbuilder::FWObject* createAddress(ObjectSignature &sig);
53     virtual libfwbuilder::FWObject* createAddressRange(ObjectSignature &sig);
54     virtual libfwbuilder::FWObject* createAddressTable(ObjectSignature &sig);
55     virtual libfwbuilder::FWObject* createDNSName(ObjectSignature &sig);
56 
57 };
58 
59 #endif
60