summaryrefslogtreecommitdiffstats
path: root/src/sp-metadata.h
blob: 36da719f0ffb9184cdb60c00c6772aade18d4b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef __SP_METADATA_H__
#define __SP_METADATA_H__

/*
 * SVG <metadata> implementation
 *
 * Authors:
 *   Kees Cook <kees@outflux.net>
 *
 * Copyright (C) 2004 Kees Cook
 *
 * Released under GNU GPL, read the file 'COPYING' for more information
 */

#include "sp-object.h"


/* Metadata base class */

#define SP_TYPE_METADATA (sp_metadata_get_type ())
#define SP_METADATA(obj) ((SPMetadata*)obj)
#define SP_IS_METADATA(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPMetadata)))

class CMetadata;

class SPMetadata : public SPObject {
public:
	CMetadata* cmetadata;
};

struct SPMetadataClass {
	SPObjectClass parent_class;
};


class CMetadata : public CObject {
public:
	CMetadata(SPMetadata* metadata);
	virtual ~CMetadata();

	virtual void build(SPDocument* doc, Inkscape::XML::Node* repr);
	virtual void release();

	virtual void set(unsigned int key, const gchar* value);
	virtual void update(SPCtx* ctx, unsigned int flags);
	virtual Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags);

protected:
	SPMetadata* spmetadata;
};


GType sp_metadata_get_type (void);

SPMetadata * sp_document_metadata (SPDocument *document);

#endif
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :