~ubuntu-branches/ubuntu/lucid/thuban/lucid

« back to all changes in this revision

Viewing changes to libraries/pyprojection/Projection.py

  • Committer: Bazaar Package Importer
  • Author(s): Silke Reimer
  • Date: 2004-01-28 12:47:34 UTC
  • Revision ID: james.westby@ubuntu.com-20040128124734-6xotwcqilok6ngut
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file was created automatically by SWIG.
 
2
import Projectionc
 
3
class Projection:
 
4
    def __init__(self,*args):
 
5
        self.this = apply(Projectionc.new_Projection,args)
 
6
        self.thisown = 1
 
7
 
 
8
    def __del__(self,Projectionc=Projectionc):
 
9
        if self.thisown == 1 :
 
10
            Projectionc.delete_Projection(self)
 
11
    def Forward(*args):
 
12
        val = apply(Projectionc.Projection_Forward,args)
 
13
        return val
 
14
    def Inverse(*args):
 
15
        val = apply(Projectionc.Projection_Inverse,args)
 
16
        return val
 
17
    def cobject(*args):
 
18
        val = apply(Projectionc.Projection_cobject,args)
 
19
        return val
 
20
    __setmethods__ = {
 
21
        "units" : Projectionc.Projection_units_set,
 
22
        "proj" : Projectionc.Projection_proj_set,
 
23
    }
 
24
    def __setattr__(self,name,value):
 
25
        if (name == "this") or (name == "thisown"): self.__dict__[name] = value; return
 
26
        method = Projection.__setmethods__.get(name,None)
 
27
        if method: return method(self,value)
 
28
        self.__dict__[name] = value
 
29
    __getmethods__ = {
 
30
        "units" : Projectionc.Projection_units_get,
 
31
        "proj" : Projectionc.Projection_proj_get,
 
32
    }
 
33
    def __getattr__(self,name):
 
34
        method = Projection.__getmethods__.get(name,None)
 
35
        if method: return method(self)
 
36
        raise AttributeError,name
 
37
    def __repr__(self):
 
38
        return "<C Projection instance at %s>" % (self.this,)
 
39
class ProjectionPtr(Projection):
 
40
    def __init__(self,this):
 
41
        self.this = this
 
42
        self.thisown = 0
 
43
        self.__class__ = Projection
 
44
 
 
45
 
 
46
 
 
47
 
 
48
 
 
49
#-------------- FUNCTION WRAPPERS ------------------
 
50
 
 
51
int_array = Projectionc.int_array
 
52
 
 
53
int_destroy = Projectionc.int_destroy
 
54
 
 
55
int_get = Projectionc.int_get
 
56
 
 
57
int_set = Projectionc.int_set
 
58
 
 
59
double_array = Projectionc.double_array
 
60
 
 
61
double_destroy = Projectionc.double_destroy
 
62
 
 
63
double_get = Projectionc.double_get
 
64
 
 
65
double_set = Projectionc.double_set
 
66
 
 
67
float_array = Projectionc.float_array
 
68
 
 
69
float_destroy = Projectionc.float_destroy
 
70
 
 
71
float_get = Projectionc.float_get
 
72
 
 
73
float_set = Projectionc.float_set
 
74
 
 
75
string_array = Projectionc.string_array
 
76
 
 
77
string_destroy = Projectionc.string_destroy
 
78
 
 
79
string_get = Projectionc.string_get
 
80
 
 
81
string_set = Projectionc.string_set
 
82
 
 
83
 
 
84
 
 
85
#-------------- VARIABLE WRAPPERS ------------------
 
86
 
 
87
DEGREES = Projectionc.DEGREES
 
88
RADIANS = Projectionc.RADIANS