/[ascend]/trunk/pygtk/set.cpp
ViewVC logotype

Contents of /trunk/pygtk/set.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download) (as text)
Mon Apr 24 02:23:08 2006 UTC (13 years, 11 months ago) by johnpye
File MIME type: text/x-c++src
File size: 791 byte(s)
Removed 'interface' directory in trunk/pygtk/interface (moved everything up a level)
Made corresponding changes to SCons* and spec files.
1 #include <iostream>
2 #include <stdexcept>
3 using namespace std;
4
5 #include "set.h"
6
7 template<>
8 const bool
9 ASCXX_Set<long>::isCorrectType() const{
10 return (SetKind(s)==integer_set);
11 }
12
13 template<>
14 const bool
15 ASCXX_Set<SymChar>::isCorrectType() const{
16 return (SetKind(s)==string_set);
17 }
18
19
20 template<>
21 const bool
22 ASCXX_Set<Empty>::isCorrectType() const{
23 return (SetKind(s)==string_set);
24 }
25
26
27 template<>
28 const long
29 ASCXX_Set<long>::operator[](const unsigned long &i) const{
30 return FetchIntMember(s,i);
31 }
32
33 template<>
34 const SymChar
35 ASCXX_Set<SymChar>::operator[](const unsigned long &i) const{
36 return SymChar(SCP(FetchStrMember(s,i)));
37 }
38
39 template<>
40 const Empty
41 ASCXX_Set<Empty>::operator[](const unsigned long &i) const{
42 throw runtime_error("Invalid attempt to retreive item from empty set");
43 }
44
45

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22