-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathSequence.i
More file actions
45 lines (33 loc) · 1.27 KB
/
Sequence.i
File metadata and controls
45 lines (33 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
%include "common.i"
%{
#include "sequenceParser/common.hpp"
#include "sequenceParser/Sequence.hpp"
%}
namespace std {
// Allow vector of object with no default constructor
%ignore vector< sequenceParser::FrameRange >::vector(size_type);
%ignore vector< sequenceParser::FrameRange >::resize;
// Ignore the default constructor
%ignore pair::pair();
// Create instantiations of a template classes
%template(FrameRangeVector) vector< sequenceParser::FrameRange >;
%template(TimePair) pair< sequenceParser::Time, sequenceParser::Time >;
// Custom typemaps: apply a special type handling rule to a type
%apply sequenceParser::Time& OUTPUT { sequenceParser::Time & timeOut };
%apply string& OUTPUT { string & timeStrOut };
}
#ifdef SWIGJAVA
%rename (toString) sequenceParser::Sequence::string;
%rename (equals) sequenceParser::Sequence::operator==;
%ignore sequenceParser::Sequence::operator!=;
%ignore sequenceParser::Sequence::operator<;
#elif SWIGPYTHON
%rename(__str__) sequenceParser::Sequence::string;
%rename(__eq__) sequenceParser::Sequence::operator==;
%rename(__ne__) sequenceParser::Sequence::operator!=;
%rename(__lt__) sequenceParser::Sequence::operator<;
#endif
%include "Sequence.hpp"
// Remove all typemaps
%clear sequenceParser::Time & timeOut;
%clear std::string & timeStrOut;