From f428295a33322ff8275ad6079a9dfb56cad426d5 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Mon, 20 Aug 2007 03:22:56 +0200 Subject: [PATCH 1/4] plugin in C++ --- tests/plugin/Makefile.am | 7 +++- tests/plugin/example_plugin.cpp | 61 +++++++++++++++++++++++++++++++++ tests/plugin/plugin_main.c | 31 ++++++++--------- 3 files changed, 81 insertions(+), 18 deletions(-) create mode 100644 tests/plugin/example_plugin.cpp diff --git a/tests/plugin/Makefile.am b/tests/plugin/Makefile.am index 207e2b7e1..7beeacc75 100644 --- a/tests/plugin/Makefile.am +++ b/tests/plugin/Makefile.am @@ -25,8 +25,13 @@ test_plugin_SOURCES = $(examples_srcdir)/plugin_main.c noinst_HEADERS += $(examples_srcdir)/hello_interface.h -check_LTLIBRARIES += example_plugin.la +check_LTLIBRARIES += example_plugin.la example_plugin_cpp.la example_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -I$(top_srcdir)/src example_plugin_la_SOURCES = $(examples_srcdir)/example_plugin.c # the -rpath option is required, prolly a automake bug? example_plugin_la_LDFLAGS = -avoid-version -module -rpath $(shell pwd) + +example_plugin_cpp_la_CPPFLAGS = $(AM_CPPFLAGS) -Wall -Werror -I$(top_srcdir)/src +example_plugin_cpp_la_SOURCES = $(examples_srcdir)/example_plugin.cpp +# the -rpath option is required, prolly a automake bug? +example_plugin_cpp_la_LDFLAGS = -avoid-version -module -rpath $(shell pwd) diff --git a/tests/plugin/example_plugin.cpp b/tests/plugin/example_plugin.cpp new file mode 100644 index 000000000..b608887d8 --- /dev/null +++ b/tests/plugin/example_plugin.cpp @@ -0,0 +1,61 @@ +#include + +#include "hello_interface.h" + +class example_plugin +{ +public: + static int myopen(void) + { + std::cout << "opened" << std::endl; + return 0; + } + + static int myclose(void) + { + std::cout << "closed" << std::endl; + return 0; + } +}; + +class example_plugin_de + : public example_plugin +{ +public: + static void hello(void) + { + std::cout << "Hallo Welt!" << std::endl; + } + + static void bye(const char* m) + { + std::cout << "Tschuess " << m << std::endl; + } +}; + + +class example_plugin_en + : public example_plugin +{ +public: + static void hello(void) + { + std::cout << "Hello World!" << std::endl; + } + + static void bye(const char* m) + { + std::cout << "Bye " << m << std::endl; + } +}; + + +CINELERRA_INTERFACE_IMPLEMENT(hello, 1, german, example_plugin_de::myopen, example_plugin_de::myclose, + example_plugin_de::hello, + example_plugin_de::bye + ); + +CINELERRA_INTERFACE_IMPLEMENT(hello, 1, english, example_plugin_en::myopen, example_plugin_en::myclose, + example_plugin_en::hello, + example_plugin_en::bye + ); diff --git a/tests/plugin/plugin_main.c b/tests/plugin/plugin_main.c index e81c0724b..e691438b3 100644 --- a/tests/plugin/plugin_main.c +++ b/tests/plugin/plugin_main.c @@ -22,7 +22,6 @@ main(int argc, char** argv) if( !strcmp(argv[1],"C")) { - CINELERRA_INTERFACE_TYPE(hello, 1)* hello_de = (CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin", "german_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1))); @@ -45,27 +44,25 @@ main(int argc, char** argv) if( !strcmp(argv[1],"C++")) { -#if 0 - /* - same again for a plugin written in C++ - */ - hello_de = - cinelerra_interface_open ("hellocpp_1", "german_1", sizeof(struct hello_interface_1)); - if (!hello_de) CINELERRA_DIE; + /* same again for a plugin written in C++ */ + CINELERRA_INTERFACE_TYPE(hello, 1)* hello_de = + (CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin_cpp", "german_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1))); - hello_de->say_hello(); - hello_de->say_hello(); + if (!hello_de) CINELERRA_DIE; + hello_de->hello(); + hello_de->goodbye(argv[1]); - hello_en = - cinelerra_interface_open ("hellocpp_1", "english_1", sizeof(struct hello_interface_1)); - if (!hello_en) CINELERRA_DIE; + CINELERRA_INTERFACE_TYPE(hello, 1)* hello_en = + (CINELERRA_INTERFACE_TYPE(hello, 1)*) cinelerra_interface_open ("example_plugin_cpp", "english_1", sizeof(CINELERRA_INTERFACE_TYPE(hello, 1))); - hello_en->say_hello(); + if (!hello_en) CINELERRA_DIE; - cinelerra_interface_close (hello_en); - cinelerra_interface_close (hello_de); -#endif + hello_en->hello(); + hello_en->goodbye(argv[1]); + + cinelerra_interface_close (hello_en); + cinelerra_interface_close (hello_de); } return 0; From b615057a6ba919c9f32a7eebd7210b78715eb2b8 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Mon, 20 Aug 2007 03:25:35 +0200 Subject: [PATCH 2/4] git-clean does the same as this homebrewn script, just better --- admin/git-mrproper.sh | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 admin/git-mrproper.sh diff --git a/admin/git-mrproper.sh b/admin/git-mrproper.sh deleted file mode 100755 index 46184161a..000000000 --- a/admin/git-mrproper.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if test "$1" = "yes"; then - git ls-files -o | xargs rm -f -else - ( - echo "'git-mrproper.sh yes'" - echo "would delete following files:" - echo - git ls-files -o | while read file; do echo " $file"; done - ) | less -fi From 02f775a1906c6cb887723c8da33d256585c48990 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Mon, 20 Aug 2007 03:38:39 +0200 Subject: [PATCH 3/4] Doxyfile 1st try --- doc/devel/Doxyfile | 277 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 doc/devel/Doxyfile diff --git a/doc/devel/Doxyfile b/doc/devel/Doxyfile new file mode 100644 index 000000000..1ef80c67c --- /dev/null +++ b/doc/devel/Doxyfile @@ -0,0 +1,277 @@ +# Doxyfile 1.5.1 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = Cinelerra3 +PROJECT_NUMBER = 3.0+alpha +OUTPUT_DIRECTORY = +CREATE_SUBDIRS = YES +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = /home/ct/src/cinelerra3/doc/devel/ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = YES +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../../src/ +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py \ + *.C \ + *.CC \ + *.C++ \ + *.II \ + *.I++ \ + *.H \ + *.HH \ + *.H++ \ + *.CS \ + *.PHP \ + *.PHP3 \ + *.M \ + *.MM \ + *.PY +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = YES +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = YES +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = cinelerra:: \ + cinelerra_ \ + CINELERRA_ +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = YES +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = YES +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = YES +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO From a90732403e5a5d3538f6206c5b738afd0962d7b9 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Mon, 20 Aug 2007 03:56:08 +0200 Subject: [PATCH 4/4] just a little refinement to the doxyfile --- doc/devel/Doxyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devel/Doxyfile b/doc/devel/Doxyfile index 1ef80c67c..ebc2bbc4a 100644 --- a/doc/devel/Doxyfile +++ b/doc/devel/Doxyfile @@ -25,7 +25,7 @@ ABBREVIATE_BRIEF = "The $name class" \ ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /home/ct/src/cinelerra3/doc/devel/ +STRIP_FROM_PATH = ../../src/ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO