Code

Connector tool: make connectors avoid the convex hull of shapes.
[inkscape.git] / src / dom / odf / odfdocument.h
1 #ifndef __ODF_DOCUMENT_H__
2 #define __ODF_DOCUMENT_H__
3 /**
4  *
5  * This class contains an ODF Document.
6  * Initially, we are just concerned with .odg content.xml + resources
7  *
8  * ---------------------------------------------------------------------
9  *
10  * Copyright (C) 2006 Bob Jamison
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software Foundation,
24  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25  *
26  * For more information, please write to rwjj@earthlink.net
27  *
28  *  RWJ :  080207: Changed to GPL2 by me
29  */
31 #include <vector>
32 #include <string>
34 #include "dom/dom.h"
36 namespace odf
37 {
40 //########################################################################
41 //# I M A G E    D A T A
42 //########################################################################
44 /**
45  *
46  */
47 class ImageData
48 {
49 public:
51     /**
52      *
53      */
54     ImageData(const std::string &fileName,
55               const std::vector<unsigned char> &buf);
57     /**
58      *
59      */
60     ImageData(const ImageData &other);
62     /**
63      *
64      */
65     virtual ~ImageData();
67     /**
68      *
69      */
70     virtual std::string getFileName();
72     /**
73      *
74      */
75     virtual void setFileName(const std::string &val);
77     /**
78      *
79      */
80     virtual std::vector<unsigned char> &getData();
82     /**
83      *
84      */
85     virtual void setData(const std::vector<unsigned char> &buf);
87 private:
89     std::string fileName;
91     std::vector<unsigned char> data;
93 };
99 //########################################################################
100 //# O D F    D O C U M E N T
101 //########################################################################
104 /**
105  *
106  */
107 class OdfDocument
109 public:
111     /**
112      *
113      */
114     OdfDocument();
116     /**
117      *  Copy constructor
118      */
119     OdfDocument(const OdfDocument &other);
121     /**
122      *
123      */
124     virtual ~OdfDocument();
126     /**
127      *
128      */
129     virtual bool readFile(const std::string &fileName);
131     /**
132      *
133      */
134     virtual bool writeFile(const std::string &fileName);
137 private:
139     org::w3c::dom::Document *content;
141     std::vector<ImageData> images;
143 };
145 } //namespace odf
149 #endif /*__ODF_DOCUMENT_H__*/
151 //########################################################################
152 //# E N D    O F    F I L E
153 //########################################################################