[asterisk-scf-commits] asterisk-scf/integration/slice-plugins.git branch "metadata-plugin" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Mar 10 16:53:26 CST 2011


branch "metadata-plugin" has been updated
       via  42b9df7ba95cd13e9177615fdb1e058d8d0c8175 (commit)
      from  f1c1541a6d09f8daf40c290e3c08c79866c4c271 (commit)

Summary of changes:
 src/CMakeLists.txt           |    4 ++++
 src/SliceMetadataOverlay.cpp |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 src/SliceMetadataOverlay.cpp


- Log -----------------------------------------------------------------
commit 42b9df7ba95cd13e9177615fdb1e058d8d0c8175
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Mar 10 16:25:12 2011 -0600

    Add skeleton for MetadataOverlay plugin.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5c759c6..866e61f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,3 +5,7 @@ install(TARGETS SliceVisitorPattern LIBRARY DESTINATION "${SLICE_PLUGINS_DIR}" R
 add_library(SliceClassMemberDefault MODULE SliceClassMemberDefault.cpp)
 target_link_libraries(SliceClassMemberDefault ${ICE_ICEUTIL_LIBRARY} ${ICE_SLICE_LIBRARY})
 install(TARGETS SliceClassMemberDefault LIBRARY DESTINATION "${SLICE_PLUGINS_DIR}" RUNTIME DESTINATION "${SLICE_PLUGINS_DIR}")
+
+add_library(SliceMetadataOverlay MODULE SliceMetadataOverlay.cpp)
+target_link_libraries(SliceMetadataOverlay ${ICE_ICEUTIL_LIBRARY} ${ICE_SLICE_LIBRARY})
+install(TARGETS SliceMetadataOverlay LIBRARY DESTINATION "${SLICE_PLUGINS_DIR}" RUNTIME DESTINATION "${SLICE_PLUGINS_DIR}")
diff --git a/src/SliceMetadataOverlay.cpp b/src/SliceMetadataOverlay.cpp
new file mode 100644
index 0000000..5bbe104
--- /dev/null
+++ b/src/SliceMetadataOverlay.cpp
@@ -0,0 +1,40 @@
+/*
+ * SliceMetadataOverlay - a Slice translator plugin to inject
+ * metadata into the syntax tree for Slice definitions
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE.txt file
+ * at the top of the source tree.
+ */
+
+#include <Slice/Parser.h>
+#include <Slice/Util.h>
+#include <Slice/Plugin.h>
+#include <Slice/CPlusPlusUtil.h>
+#include <Slice/JavaUtil.h>
+#include <Slice/CsUtil.h>
+
+using namespace std;
+using namespace Slice;
+using namespace Slice::Plugin;
+
+extern "C"
+{
+	ICE_DECLSPEC_EXPORT VisitorList*
+	create(Language language, StringList* args)
+	{
+		VisitorList* result = new VisitorList();
+		switch(language)
+		{
+		default:
+			cerr << "SliceMetadataOverlay plugin does not support language " << language << "." << endl;
+			delete result;
+			result = 0;
+			break;
+		}
+
+		return result;
+	}
+}

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/slice-plugins.git



More information about the asterisk-scf-commits mailing list