From f6cae1251ee6a7a9ec582d7be043d1cda96467ff Mon Sep 17 00:00:00 2001 From: darco Date: Tue, 19 Apr 2005 21:58:44 +0000 Subject: [PATCH] bleh git-svn-id: http://svn.voria.com/code@19 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/examples/business_card.sif | 318 ++++++++++++++++++++++++-- synfig-core/trunk/src/sinfg/Makefile.am | 2 + synfig-core/trunk/src/sinfg/node.cpp | 1 + synfig-core/trunk/src/sinfg/node.h | 2 + synfig-core/trunk/src/sinfg/proto/nodebase.px | 34 +-- synfig-core/trunk/src/sinfg/proto/proto.m4 | 12 +- synfig-core/trunk/src/sinfg/protocol.h | 65 ++++++ synfig-core/trunk/src/tool/Makefile.am | 11 +- 8 files changed, 382 insertions(+), 63 deletions(-) create mode 100644 synfig-core/trunk/src/sinfg/protocol.h diff --git a/synfig-core/trunk/examples/business_card.sif b/synfig-core/trunk/examples/business_card.sif index c2137c3..a3c1b41 100644 --- a/synfig-core/trunk/examples/business_card.sif +++ b/synfig-core/trunk/examples/business_card.sif @@ -1,8 +1,14 @@ - + Untitled0 + + + + + + - + @@ -83,6 +89,9 @@ + + + @@ -135,7 +144,10 @@ - @@ -156,25 +168,25 @@ - 0.7500000000 + 1.7500000000 1.0000000000 - + 1.000000 1.000000 1.000000 1.000000 - + 0.000000 0.000000 0.000000 1.000000 - + 1.000000 1.000000 1.000000 @@ -267,6 +279,9 @@ + + + @@ -348,6 +363,9 @@ + + + @@ -417,7 +435,10 @@ - @@ -480,6 +501,9 @@ + + + @@ -541,6 +565,9 @@ + + + @@ -607,6 +634,9 @@ http://voria.com/ + + + @@ -642,12 +672,15 @@ http://voria.com/ 0.0000000000 - + - @@ -693,7 +726,10 @@ http://voria.com/ - @@ -759,6 +795,216 @@ http://voria.com/ + + + + + + + + -1.7500000000 + 4.2500000000 + + + + + + + + + + + + + + + + + -1.3750000000 + 1.0000000000 + + + + + -1.3750000000 + -1.0000000000 + + + + + + + 0.000000 + 0.000000 + 0.000000 + 0.000000 + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + -1.7500000000 + 1.0000000000 + + + + + -1.3750000000 + -9.5000000000 + + + + + + + + + + + + + + + + + + + + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + + + 1.7500000000 + 1.0000000000 + + + + + 2.1250000000 + -9.5000000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -3.5000000000 + 5.2500000000 + + + + + 0.0000000000 + 5.2500000000 + + + + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + 0.000000 + 0.000000 + 0.000000 + 1.000000 + + + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + @@ -775,7 +1021,10 @@ http://voria.com/ - @@ -799,7 +1048,10 @@ http://voria.com/ - @@ -823,7 +1075,10 @@ http://voria.com/ - @@ -847,7 +1102,10 @@ http://voria.com/ - @@ -871,7 +1129,10 @@ http://voria.com/ - @@ -895,7 +1156,10 @@ http://voria.com/ - @@ -919,7 +1183,10 @@ http://voria.com/ - @@ -943,7 +1210,10 @@ http://voria.com/ - @@ -967,7 +1237,10 @@ http://voria.com/ - @@ -991,7 +1264,10 @@ http://voria.com/ - diff --git a/synfig-core/trunk/src/sinfg/Makefile.am b/synfig-core/trunk/src/sinfg/Makefile.am index ff02128..f8f712f 100644 --- a/synfig-core/trunk/src/sinfg/Makefile.am +++ b/synfig-core/trunk/src/sinfg/Makefile.am @@ -1,5 +1,7 @@ # $Header: /opt/voria/cvs/sinfg/src/sinfg/Makefile.am,v 1.3 2005/01/21 19:29:10 darco Exp $ +# SUBDIRS=proto + MAINTAINERCLEANFILES=Makefile.in INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/libltdl diff --git a/synfig-core/trunk/src/sinfg/node.cpp b/synfig-core/trunk/src/sinfg/node.cpp index 1b8f5f4..fdd2bfe 100644 --- a/synfig-core/trunk/src/sinfg/node.cpp +++ b/synfig-core/trunk/src/sinfg/node.cpp @@ -31,6 +31,7 @@ #endif #include "node.h" +#include "proto/nodebase.h" #ifdef HASH_MAP_H #include HASH_MAP_H diff --git a/synfig-core/trunk/src/sinfg/node.h b/synfig-core/trunk/src/sinfg/node.h index 4612a7a..ac87725 100644 --- a/synfig-core/trunk/src/sinfg/node.h +++ b/synfig-core/trunk/src/sinfg/node.h @@ -234,6 +234,8 @@ guid_cast(const sinfg::GUID& guid) return etl::handle::cast_dynamic(sinfg::find_node(guid)); } +typedef etl::handle NodeHandle; + }; // END of namespace sinfg /* === E N D =============================================================== */ diff --git a/synfig-core/trunk/src/sinfg/proto/nodebase.px b/synfig-core/trunk/src/sinfg/proto/nodebase.px index 77559c8..19b4ea2 100644 --- a/synfig-core/trunk/src/sinfg/proto/nodebase.px +++ b/synfig-core/trunk/src/sinfg/proto/nodebase.px @@ -33,37 +33,6 @@ /* === M A C R O S ========================================================= */ -/* - -#define DEFINE_SIMPLE_FUNC(func_name, ret_type) \ - private: sigc::slot slot_##func_name; \ - public: ret_type func_name() { return slot_##func_name(); } - -#define DEFINE_SIMPLE_FUNC_CONST(func_name, ret_type) \ - private: sigc::slot slotconst_##func_name; \ - public: ret_type func_name()const { return slotconst_##func_name(); } - -#define DECLARE_FUNC(func_name, ret_type, ...) \ - private: sigc::slot slot_##func_name; -// public: ret_type func_name(__VA_ARGS__) - -#define DECLARE_FUNC_CONST(func_name, ret_type, ...) \ - private: sigc::slot slotconst_##func_name; - -// public: ret_type func_name(__VA_ARGS__)const - -#define DEFINE_FUNC(func_name, ret_type, arg_list, ...) \ - public: ret_type func_name(__VA_ARGS__) { return slot_##func_name arg_list; } - -#define DEFINE_FUNC_CONST(func_name, ret_type, arg_list, ...) \ - public: ret_type func_name(__VA_ARGS__)const { return slotconst_##func_name arg_list; } - -#define DEFINE_DATA(data_name, data_type) \ - DEFINE_SIMPLE_FUNC_CONST(get_ ## data_name, data_type); \ - DECLARE_FUNC(set_ ## data_name, void, data_type); \ - DEFINE_FUNC(set_ ## data_name, void, (x), data_type x) -*/ - /* === T Y P E D E F S ===================================================== */ /* === C L A S S E S & S T R U C T S ======================================= */ @@ -71,6 +40,9 @@ namespace sinfg { namespace Proto { +typedef int Query; +typedef int NodeList; + class NodeBase : public Protocol { public: diff --git a/synfig-core/trunk/src/sinfg/proto/proto.m4 b/synfig-core/trunk/src/sinfg/proto/proto.m4 index 70c5299..91800eb 100644 --- a/synfig-core/trunk/src/sinfg/proto/proto.m4 +++ b/synfig-core/trunk/src/sinfg/proto/proto.m4 @@ -16,17 +16,17 @@ ifelse($#,1,,`v$1`'ifelse($#,2,,`, _PRINT_ARGS2(incr($1), shift(shift($@)))')')d dnl PX_DEFINE_FUNC(func_name, ret_type, args...) define(`PX_DEFINE_FUNC',` - private: sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > slot_$1; - public: $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))')) { - return slot_$1(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))')); + sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > _slot_$1; + $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))')) { + return _slot_$1(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))')); } ')dnl dnl PX_DEFINE_FUNC_CONST(func_name, ret_type, args...) define(`PX_DEFINE_FUNC_CONST',` - private: sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > slotconst_$1; - public: $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))'))const { - return slotconst_$1(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))')); + sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > _slot_$1_const; + $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))'))const { + return _slot_$1_const(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))')); } ')dnl diff --git a/synfig-core/trunk/src/sinfg/protocol.h b/synfig-core/trunk/src/sinfg/protocol.h new file mode 100644 index 0000000..33ec3f1 --- /dev/null +++ b/synfig-core/trunk/src/sinfg/protocol.h @@ -0,0 +1,65 @@ +/* === S I N F G =========================================================== */ +/*! \file protocol.h +** \brief Template Header +** +** $Id: template.h,v 1.1.1.1 2005/01/04 01:23:09 darco Exp $ +** +** \legal +** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** +** This software and associated documentation +** are CONFIDENTIAL and PROPRIETARY property of +** the above-mentioned copyright holder. +** +** You may not copy, print, publish, or in any +** other way distribute this software without +** a prior written agreement with +** the copyright holder. +** \endlegal +*/ +/* ========================================================================= */ + +/* === S T A R T =========================================================== */ + +#ifndef __SINFG_PROTOCOL_H +#define __SINFG_PROTOCOL_H + +/* === H E A D E R S ======================================================= */ + +#include + +/* === M A C R O S ========================================================= */ + +/* === T Y P E D E F S ===================================================== */ + +/* === C L A S S E S & S T R U C T S ======================================= */ + +namespace sinfg { + +class Object +{ +public: + + sigc::signal_ + bool find_protocol(Protocol& proto) + { + + } +}; + +class Protocol +{ +public: + class Type; + +}; // END of class Protocol + +class Protocol::Type +{ +}; // END of class Protocol::Type + +}; // END of namespace sinfg + +/* === E N D =============================================================== */ + +#endif diff --git a/synfig-core/trunk/src/tool/Makefile.am b/synfig-core/trunk/src/tool/Makefile.am index 78e5c18..3d55d51 100644 --- a/synfig-core/trunk/src/tool/Makefile.am +++ b/synfig-core/trunk/src/tool/Makefile.am @@ -4,10 +4,11 @@ MAINTAINERCLEANFILES=Makefile.in INCLUDES=-I$(top_srcdir)/src -bin_PROGRAMS = sinfg -sinfg_SOURCES = main.cpp -sinfg_LDADD = -L../sinfg -lsinfg @SINFG_LIBS@ -sinfg_CXXFLAGS = -lsinfg @SINFG_CFLAGS@ -#sinfg_LDFLAGS=-export-dynamic -dlopen self +bin_PROGRAMS = synfig + +synfig_SOURCES = main.cpp +synfig_LDADD = -L../sinfg -lsinfg @SINFG_LIBS@ +synfig_CXXFLAGS = -lsinfg @SINFG_CFLAGS@ +#synfig_LDFLAGS=-export-dynamic -dlopen self #-dlopen ../modules/example/libexample.la -- 2.7.4