sp-metadata.cpp revision e4d2208dce65ac8789d93608f9ad124a6a57b9d1
/*
* 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
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "sp-metadata.h"
#include "xml/node-iterators.h"
#include "document.h"
#include "sp-item-group.h"
#include "sp-root.h"
#define noDEBUG_METADATA
#ifdef DEBUG_METADATA
g_print(f, ## a); \
g_print("\n"); \
}
#else
# define debug(f, a...) /**/
#endif
/* Metadata base class */
static void sp_metadata_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
static Inkscape::XML::Node *sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
static SPObjectClass *metadata_parent_class;
sp_metadata_get_type (void)
{
static GType metadata_type = 0;
if (!metadata_type) {
sizeof (SPMetadataClass),
sizeof (SPMetadata),
16,
NULL, /* value_table */
};
metadata_type = g_type_register_static (SP_TYPE_OBJECT, "SPMetadata", &metadata_info, (GTypeFlags)0);
}
return metadata_type;
}
static void
{
//GObjectClass *gobject_class = (GObjectClass *)klass;
}
this->spmetadata = metadata;
}
}
static void
{
(void)metadata;
}
namespace {
}
}
}
}
/* clean up our mess from earlier versions; elements under rdf:RDF should not
* have id= attributes... */
}
}
}
/**
* Reads the Inkscape::XML::Node, and initializes SPMetadata variables.
*
* For this to get called, our name must be associated with
* a repr via "sp_object_type_register". Best done through
* sp-object-repr.cpp's repr_name_entries array.
*/
{
}
// handle ourself
}
/**
* Drops any allocated memory.
*/
{
}
//SP_METADATA(object); // ensures the object is of the proper type.
// see if any parents need this value
}
/**
* Sets a specific value in the SPMetadata.
*/
{
}
//SPMetadata *metadata = SP_METADATA(object);
/* do something? */
}
// CPPIFY: As CMetadata is derived directly from CObject, this doesn't make no sense.
// CObject::onUpdate is pure. What was the idea behind these lines?
// if (((SPObjectClass *) metadata_parent_class)->update)
// ((SPObjectClass *) metadata_parent_class)->update(object, ctx, flags);
// CObject::onUpdate(ctx, flags);
}
/**
* Receives update notifications.
*/
{
}
Inkscape::XML::Node* CMetadata::onWrite(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, guint flags) {
//SPMetadata *metadata = SP_METADATA(object);
if (repr) {
} else {
}
}
return repr;
}
/**
* Writes it's settings to an incoming repr object, if any.
*/
static Inkscape::XML::Node *sp_metadata_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags)
{
}
/**
* Retrieves the metadata object associated with a document.
*/
{
"metadata");
return (SPMetadata *)nv;
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :