Arbint class implemented
[ipdf/code.git] / src / document.h
1 #ifndef _DOCUMENT_H
2 #define _DOCUMENT_H
3
4 #include "ipdf.h"
5
6 namespace IPDF
7 {
8         class Document
9         {
10                 public:
11                         Document(const std::string & filename = "") : m_objects(), m_count(0) {Load(filename);}
12                         virtual ~Document() {}
13
14                         void Load(const std::string & filename = "");
15                         void Save(const std::string & filename);
16                         void DebugDumpObjects();
17
18                         unsigned ObjectCount() const {return m_count;}
19                         inline const Objects & GetObjects() const {return m_objects;}
20
21                         bool operator==(const Document & equ) const;
22                         bool operator!=(const Document & equ) const {return !(this->operator==(equ));}
23
24                         void Add(ObjectType type, const Rect & bounds, unsigned data_index = 0);
25                         unsigned AddBezierData(const Bezier & bezier);
26
27                 private:
28                         friend class View;
29                         Objects m_objects;
30                         unsigned m_count;
31                         
32
33         };
34 }
35
36 #endif //_DOCUMENT_H

UCC git Repository :: git.ucc.asn.au