nr-object.cpp revision 771d4fbadc18626dafe534bb58b7c29d8d7c6ef2
#define __NR_OBJECT_C__
/*
* RGBA display list system for inkscape
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* MenTaLguY <mental@rydia.net>
*
* This code is in public domain
*/
#include <string.h>
#include <stdio.h>
#include <typeinfo>
#include <libnr/nr-macros.h>
#include "nr-object.h"
#include "debug/event-tracker.h"
#include "debug/simple-event.h"
unsigned int nr_emit_fail_warning(const gchar *file, unsigned int line, const gchar *method, const gchar *expr)
{
return 1;
}
/* NRObject */
static unsigned int classes_len = 0;
static unsigned int classes_size = 0;
{
while (c) {
return TRUE;
}
c = c->parent;
}
return FALSE;
}
{
return ip;
}
{
return FALSE;
}
}
unsigned int csize,
unsigned int isize,
void (* cinit) (NRObjectClass *),
{
if (classes_len >= classes_size) {
classes_size += 32;
if (classes_len == 0) {
classes_len = 1;
}
}
classes_len += 1;
/* FIXME: is this necessary? */
}
c->cinit(c);
return type;
}
{
if (!type) {
type = nr_object_register_type (0,
"NRObject",
sizeof (NRObjectClass),
sizeof (NRObject),
(void (*) (NRObjectClass *)) nr_object_class_init,
(void (*) (NRObject *)) nr_object_init);
}
return type;
}
static void nr_object_class_init(NRObjectClass *c)
{
c->finalize = nr_object_finalize;
}
{
}
{
}
/* Dynamic lifecycle */
{
if (c->parent) {
}
}
namespace {
class FinalizerEvent : public BaseFinalizerEvent {
public:
{
}
};
void finalize_object(void *base, void *)
{
}
}
{
g_error("Cannot instantiate NRObject class %s which has not registered a C++ constructor\n", c->name);
}
);
return object;
}
/* NRActiveObject */
static void nr_active_object_class_init(NRActiveObjectClass *c);
static NRObjectClass *parent_class;
{
if (!type) {
"NRActiveObject",
sizeof (NRActiveObjectClass),
sizeof (NRActiveObject),
(void (*) (NRObjectClass *)) nr_active_object_class_init,
(void (*) (NRObject *)) nr_active_object_init);
}
return type;
}
static void nr_active_object_class_init(NRActiveObjectClass *c)
{
}
{
}
{
}
}
}
}
const NRObjectEventVector *vector,
unsigned int size,
void *data)
{
}
realloc(object->callbacks, sizeof(NRObjectCallbackBlock) + (newsize - 1) * sizeof (NRObjectListener));
}
}
{
return;
}
}
return;
}
}
}
/*
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 :