Nemiver  0.3
nmv-hex-document.h
Go to the documentation of this file.
1 //Author: Jonathon Jongsma
2 /*
3  *This file is part of the Nemiver project
4  *
5  *Nemiver is free software; you can redistribute
6  *it and/or modify it under the terms of
7  *the GNU General Public License as published by the
8  *Free Software Foundation; either version 2,
9  *or (at your option) any later version.
10  *
11  *Nemiver is distributed in the hope that it will
12  *be useful, but WITHOUT ANY WARRANTY;
13  *without even the implied warranty of
14  *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *See the GNU General Public License for more details.
16  *
17  *You should have received a copy of the
18  *GNU General Public License along with Nemiver;
19  *see the file COPYING.
20  *If not, write to the Free Software Foundation,
21  *Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22  *
23  *See COPYRIGHT file copyright information.
24  */
25 #ifndef __NMV_HEX_DOCUMENT_H__
26 #define __NMV_HEX_DOCUMENT_H__
27 
28 #include "common/nmv-object.h"
30 #include "common/nmv-ustring.h"
31 #include <hex-document.h>
32 #include <sigc++/signal.h>
33 
34 namespace Gtk {
35  class Widget;
36 }
42 
43 NEMIVER_BEGIN_NAMESPACE (nemiver)
44 NEMIVER_BEGIN_NAMESPACE (Hex)
45 
46 class Document;
48 
49 class Document : public Object {
50  class Priv;
51  SafePtr<Priv> m_priv;
52 
53 protected:
54  Document ();
55  Document (const std::string& filename);
56 
57 public:
58  virtual ~Document ();
59  static DocumentSafePtr create ();
60  static DocumentSafePtr create (const std::string& filename);
61  ::HexDocument* cobj();
62  void set_data (guint offset,
63  guint len,
64  guint rep_len,
65  const guchar *data,
66  bool undoable=false);
67  guchar *get_data (guint offset, guint len);
68  void delete_data (guint offset, guint len, bool undoable=false);
69  void clear (bool undoable=false);
70  sigc::signal<void, HexChangeData*>& signal_document_changed () const;
71 };//end class Spinner
72 
73 NEMIVER_END_NAMESPACE (Hex)
74 NEMIVER_END_NAMESPACE (nemiver)
75 #endif //__NMV_HEX_DOCUMENT_H__
76 
nmv-safe-ptr-utils.h
nemiver::common::Object
Definition: nmv-object.h:43
nemiver
Definition: nmv-address.h:31
nemiver::common::ObjectRef
Definition: nmv-safe-ptr-utils.h:45
nmv-ustring.h
nemiver::common::UString
Definition: nmv-ustring.h:45
Gtk
Definition: nmv-asm-utils.h:30
nemiver::common::ObjectUnref
Definition: nmv-safe-ptr-utils.h:55
nmv-object.h
nemiver::Hex::Document
Definition: nmv-hex-document.h:49
nemiver::common::SafePtr
Definition: nmv-safe-ptr.h:71