From d47f192f9edfc2332fa73e6ed6c4c1cdedefb96c Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 21 Jun 2013 00:33:31 -0700 Subject: gras: adding pythonic interface to time tag --- python/gras/CMakeLists.txt | 2 ++ python/gras/GRAS_TimeTag.i | 14 ++++++++++++++ python/gras/__init__.py | 1 + 3 files changed, 17 insertions(+) create mode 100644 python/gras/GRAS_TimeTag.i (limited to 'python/gras') diff --git a/python/gras/CMakeLists.txt b/python/gras/CMakeLists.txt index 8171e7f..a7fc8f3 100644 --- a/python/gras/CMakeLists.txt +++ b/python/gras/CMakeLists.txt @@ -19,6 +19,7 @@ set(GR_SWIG_LIBRARIES gras) file(GLOB GR_SWIG_SOURCE_DEPS "${GRAS_SOURCE_DIR}/include/gras/*.i") GR_SWIG_MAKE(GRAS_Tags GRAS_Tags.i) +GR_SWIG_MAKE(GRAS_TimeTag GRAS_TimeTag.i) GR_SWIG_MAKE(GRAS_Block GRAS_Block.i) GR_SWIG_MAKE(GRAS_HierBlock GRAS_HierBlock.i) GR_SWIG_MAKE(GRAS_ThreadPool GRAS_ThreadPool.i) @@ -26,6 +27,7 @@ GR_SWIG_MAKE(GRAS_SBuffer GRAS_SBuffer.i) GR_SWIG_INSTALL( TARGETS GRAS_Tags + GRAS_TimeTag GRAS_Block GRAS_HierBlock GRAS_ThreadPool diff --git a/python/gras/GRAS_TimeTag.i b/python/gras/GRAS_TimeTag.i new file mode 100644 index 0000000..3b77dfb --- /dev/null +++ b/python/gras/GRAS_TimeTag.i @@ -0,0 +1,14 @@ +// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information. + + +%include + +%include + +DECL_PMC_SWIG_TYPE(gras::TimeTag, swig_time_tag) + +%pythoncode %{ +from GRAS_TimeTag import TimeTag +%} + +REG_PMC_SWIG_TYPE(swig_time_tag, TimeTag) diff --git a/python/gras/__init__.py b/python/gras/__init__.py index 33d2b00..cf2c7f5 100644 --- a/python/gras/__init__.py +++ b/python/gras/__init__.py @@ -3,6 +3,7 @@ from PMC import * from GRAS_SBuffer import SBufferConfig, SBuffer from GRAS_Tags import Tag, StreamTag, PacketMsg +from GRAS_TimeTag import TimeTag from GRAS_Block import Block from GRAS_HierBlock import HierBlock, TopBlock from GRAS_ThreadPool import ThreadPoolConfig, ThreadPool -- cgit