menu: added new Keywords tag to .desktop files
[barry.git] / src / a_codsection.h
blobe324e7cc81123b7d2aaf74289f6adfb2e0792faf
1 ///
2 /// \file a_codsection.h
3 /// COD structure for the ALX file parser
4 ///
6 /*
7 Copyright (C) 2010, Nicolas VIVIEN
8 Copyright (C) 2005-2013, Net Direct Inc. (http://www.netdirect.ca/)
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 See the GNU General Public License in the COPYING file at the
20 root directory of this project for more details.
23 #ifndef __BARRY_A_CODSECTION_H__
24 #define __BARRY_A_CODSECTION_H__
26 #include <vector>
28 #include "dll.h"
29 #include "a_common.h"
32 namespace Barry {
34 namespace ALX {
37 class BXEXPORT CODSection
39 protected:
40 std::string id;
41 std::string name;
42 std::string description;
43 std::string version;
44 std::string vendor;
45 std::string copyright;
46 std::string directory;
48 bool isRequired;
49 std::vector<std::string> codfiles;
51 public:
52 CODSection(void);
53 CODSection(const xmlpp::SaxParser::AttributeList& attrs);
54 virtual ~CODSection(void);
56 virtual void Dump(std::ostream &os) const = 0;
58 virtual void SetID(const std::string& id);
59 virtual void SetName(const std::string& name);
60 virtual void SetDescription(const std::string& description);
61 virtual void SetVersion(const std::string& version);
62 virtual void SetVendor(const std::string& vendor);
63 virtual void SetCopyright(const std::string& copyright);
64 virtual void SetDirectory(const std::string& directory);
65 virtual void SetRequired(const std::string& required);
66 virtual void AddFiles(const std::string& files);
67 virtual void AddFile(const std::string& files);
71 inline std::ostream& operator<<(std::ostream& os, const CODSection& cod)
73 cod.Dump(os);
74 return os;
78 } // namespace ALX
80 } // namespace Barry
82 #endif