Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
df50b468
Commit
df50b468
authored
13 years ago
by
Paweł Kędzia
Browse files
Options
Downloads
Patches
Plain Diff
(swig) Added wrapper for Wccl::WcclFileOpSections
parent
ef241c44
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swig/Makefile
+18
-5
18 additions, 5 deletions
swig/Makefile
swig/libcclwcclfileopsections.i
+88
-0
88 additions, 0 deletions
swig/libcclwcclfileopsections.i
with
106 additions
and
5 deletions
swig/Makefile
+
18
−
5
View file @
df50b468
...
...
@@ -38,6 +38,7 @@ CBIN=libcclvalue.o \
libccltagrulesequence.o
\
libcclmatchrule.o
\
libcclfunctionalopsequence.o
\
libcclwcclfileopsections.o
\
wccl.o
CBINOUT
=
_libcclvalue.so
\
...
...
@@ -62,8 +63,9 @@ CBINOUT=_libcclvalue.so \
_libccltagrule.so
\
_libccltagrulesequence.so
\
_libcclmatchrule.so
\
_wccl.so
\
_libcclfunctionalopsequence.so
\
_libcclwcclfileopsections.so
\
_wccl.so
\
_boost_shared_ptr.so
CWRAP
=
libcclvalue_wrap.cxx
\
...
...
@@ -88,8 +90,9 @@ CWRAP=libcclvalue_wrap.cxx \
libccltagrule_wrap.cxx
\
libccltagrulesequence_wrap.cxx
\
libcclmatchrule_wrap.cxx
\
wccl_wrap.cxx
\
libcclfunctionalopsequence_wrap.cxx
\
libcclwcclfileopsections_wrap.cxx
\
wccl_wrap.cxx
\
boost_shared_ptr_wrap.cxx
CWRAPBIN
=
libcclvalue_wrap.o
\
...
...
@@ -114,8 +117,9 @@ CWRAPBIN=libcclvalue_wrap.o \
libccltagrule_wrap.o
\
libccltagrulesequence_wrap.o
\
libcclmatchrule_wrap.o
\
wccl_wrap.o
\
libcclfunctionalopsequence_wrap.o
\
libcclwcclfileopsections_wrap.o
\
wccl_wrap.o
\
boost_shared_ptr_wrap.o
PYMODULES
=
libcclvalue.py
\
...
...
@@ -140,8 +144,9 @@ PYMODULES=libcclvalue.py \
libccltagrule.py
\
libccltagrulesequence.py
\
libcclmatchrule.py
\
wccl.py
\
libcclfunctionalopsequence.py
\
libcclwcclfileopsections.py
\
wccl.py
\
boost_shared_ptr.py
PYCBIN
=
libcclvalue.pyc
\
...
...
@@ -166,8 +171,9 @@ PYCBIN=libcclvalue.pyc \
libccltagrule.pyc
\
libccltagrulesequence.pyc
\
libcclmatchrule.pyc
\
wccl.pyc
\
libcclfunctionalopsequence.pyc
\
libcclwcclfileopsections.pyc
\
wccl.pyc
\
boost_shared_ptr.pyc
all
:
boost_shared_ptr.o $(CBIN)
...
...
@@ -354,6 +360,13 @@ libcclfunctionalopsequence.o:
$(
CPP
)
-shared
libcclfunctionalopsequence_wrap.o
\
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libcclfunctionalopsequence.so
# WcclFileOpSections
libcclwcclfileopsections.o
:
$(
SWIG
)
$(
SWIGOPTS_LANG
)
libcclwcclfileopsections.i
$(
CPP
)
-c
libcclwcclfileopsections_wrap.cxx
-I
$(
PYTHONDIR
)
-I
$(
WCCLDIR
)
$(
CPPFLAGS
)
$(
CPP
)
-shared
libcclwcclfileopsections_wrap.o
\
$(
CCLBIN
)
$(
ANTLRLIB
)
-o
_libcclwcclfileopsections.so
# -----------------------------------------------------------------------------
# Wccl Library
wccl.o
:
...
...
This diff is collapsed.
Click to expand it.
swig/libcclwcclfileopsections.i
0 → 100644
+
88
−
0
View file @
df50b468
#
ifndef
SWIG_LIBWCCL_WCCLFILEOPSECTIONS_I
#
define
SWIG_LIBWCCL_WCCLFILEOPSECTIONS_I
%
module
libcclwcclfileopsections
%
{
#include <libwccl/wcclfileopsections.h>
%}
%
include
"
libcclbool.i
"
%
include
"
libcclmatch.i
"
%
include
"
libcclposition.i
"
%
include
"
libcclstrset.i
"
%
include
"
libccltset.i
"
%
include
"
libcclvalue.i
"
%
include
"
libcclfunctionalopsequence.i
"
%
include
"
std_string.i
"
%
include
"
std_vector.i
"
%
include
"
boost_shared_ptr.i
"
namespace
Wccl
{
template<class T> class WcclFileOpSections {
public:
typedef typename T::op_t op_t;
typedef typename boost::shared_ptr<op_t> op_ptr_t;
typedef typename boost::shared_ptr<const op_t> op_ptr_c_t;
typedef typename boost::shared_ptr<T> ptr_t;
typedef typename boost::shared_ptr<const T> ptr_c_t;
typedef typename std::vector<ptr_t> ptr_v_t;
typedef typename boost::unordered_map<std::string, ptr_t> map_t;
typedef typename T::name_op_v_t name_op_v_t;
typedef typename T::name_op_v_c_t name_op_v_c_t;
/* --------------------------------------------------------------------- */
protected:
bool has_section(const std::string& name) const;
const ptr_v_t& sections();
/* --------------------------------------------------------------------- */
size_t size() const;
bool empty() const;
/* --------------------------------------------------------------------- */
std::vector<std::string> section_names() const;
/* --------------------------------------------------------------------- */
T& get_section(const std::string& name);
const T& get_section(const std::string& name) const;
/* --------------------------------------------------------------------- */
ptr_t get_section_ptr(const std::string& name);
ptr_c_t get_section_ptr(const std::string& name) const;
/* --------------------------------------------------------------------- */
op_t& get_op(const std::string& name, size_t idx = 0);
const op_t& get_op(const std::string& name, size_t idx = 0) const;
/* --------------------------------------------------------------------- */
op_ptr_t get_op_ptr(const std::string& name, size_t idx = 0);
op_ptr_c_t get_op_ptr(const std::string& name, size_t idx = 0) const;
/* --------------------------------------------------------------------- */
name_op_v_t& add_name_op_pairs(name_op_v_t& pairs);
name_op_v_c_t& add_name_op_pairs(name_op_v_c_t& pairs) const;
/* --------------------------------------------------------------------- */
name_op_v_t gen_name_op_pairs();
name_op_v_c_t gen_name_op_pairs() const;
/* --------------------------------------------------------------------- */
WcclFileOpSections();
void append(const ptr_t& section);
/* --------------------------------------------------------------------- */
};
%template(UntypedOpSequenceWcclFileOpSections) WcclFileOpSections<UntypedOpSequence>;
%template(StrSetOpSequence) WcclFileOpSections<OpSequence<StrSet> >;
%template(TSetOpSequence) WcclFileOpSections<OpSequence<TSet> >;
%template(BoolOpSequence) WcclFileOpSections<OpSequence<Bool> >;
%template(PositionOpSequence) WcclFileOpSections<OpSequence<Position> >;
%template(MatchOpSequence) WcclFileOpSections<OpSequence<Match> >;
}
using
namespace
std
;
using
namespace
Wccl
;
#
endif
/* SWIG_LIBWCCL_WCCLFILEOPSECTIONS_I */
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment