X7ROOT File Manager
Current Path:
/usr/share/swig/2.0.10/tcl
usr
/
share
/
swig
/
2.0.10
/
tcl
/
📁
..
📄
attribute.i
(34 B)
📄
carrays.i
(35 B)
📄
cdata.i
(30 B)
📄
cmalloc.i
(32 B)
📄
cni.i
(42 B)
📄
cpointer.i
(33 B)
📄
cstring.i
(32 B)
📄
cwstring.i
(60 B)
📄
exception.i
(145 B)
📄
factory.i
(32 B)
📄
jstring.i
(1000 B)
📄
std_common.i
(467 B)
📄
std_deque.i
(28 B)
📄
std_except.i
(35 B)
📄
std_map.i
(2.17 KB)
📄
std_pair.i
(707 B)
📄
std_string.i
(36 B)
📄
std_vector.i
(15.25 KB)
📄
std_wstring.i
(63 B)
📄
stl.i
(357 B)
📄
tcl8.swg
(1.46 KB)
📄
tclapi.swg
(3.03 KB)
📄
tclerrors.swg
(1.66 KB)
📄
tclfragments.swg
(555 B)
📄
tclinit.swg
(3.97 KB)
📄
tclinterp.i
(617 B)
📄
tclkw.swg
(247 B)
📄
tclmacros.swg
(38 B)
📄
tclopers.swg
(1.48 KB)
📄
tclprimtypes.swg
(5.47 KB)
📄
tclresult.i
(684 B)
📄
tclrun.swg
(21.53 KB)
📄
tclruntime.swg
(484 B)
📄
tclsh.i
(1.83 KB)
📄
tclstrings.swg
(793 B)
📄
tcltypemaps.swg
(2.71 KB)
📄
tcluserdir.swg
(195 B)
📄
tclwstrings.swg
(1.79 KB)
📄
typemaps.i
(15.68 KB)
📄
wish.i
(3.36 KB)
Editing: std_map.i
// // SWIG typemaps for std::map // Luigi Ballabio // Jan. 2003 // // Common implementation %include <std_common.i> // ------------------------------------------------------------------------ // std::map // ------------------------------------------------------------------------ %{ #include <map> #include <algorithm> #include <stdexcept> %} // exported class namespace std { template<class K, class T> class map { // add typemaps here public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef K key_type; typedef T mapped_type; map(); map(const map<K,T> &); unsigned int size() const; bool empty() const; void clear(); %extend { const T& get(const K& key) throw (std::out_of_range) { std::map<K,T >::iterator i = self->find(key); if (i != self->end()) return i->second; else throw std::out_of_range("key not found"); } void set(const K& key, const T& x) { (*self)[key] = x; } void del(const K& key) throw (std::out_of_range) { std::map<K,T >::iterator i = self->find(key); if (i != self->end()) self->erase(i); else throw std::out_of_range("key not found"); } bool has_key(const K& key) { std::map<K,T >::iterator i = self->find(key); return i != self->end(); } } }; // Legacy macros (deprecated) %define specialize_std_map_on_key(K,CHECK,CONVERT_FROM,CONVERT_TO) #warning "specialize_std_map_on_key ignored - macro is deprecated and no longer necessary" %enddef %define specialize_std_map_on_value(T,CHECK,CONVERT_FROM,CONVERT_TO) #warning "specialize_std_map_on_value ignored - macro is deprecated and no longer necessary" %enddef %define specialize_std_map_on_both(K,CHECK_K,CONVERT_K_FROM,CONVERT_K_TO, T,CHECK_T,CONVERT_T_FROM,CONVERT_T_TO) #warning "specialize_std_map_on_both ignored - macro is deprecated and no longer necessary" %enddef }
Upload File
Create Folder