~ubuntu-branches/ubuntu/oneiric/swig1.3/oneiric

« back to all changes in this revision

Viewing changes to Examples/php4/class/example.h

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2009-11-15 14:00:28 UTC
  • mfrom: (1.2.9 upstream) (2.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091115140028-me7amr2rie8zz1xn
Tags: 1.3.40-2ubuntu1
* Merge from Debian testing (LP: #356529), remaining changes:
  - Drop libchicken-dev from the build-depends (it's in universe)
  - Remove Pike from package description and from configure flags
  - drop "--without-mzscheme", we don't have it in our build-depends
  - use php-config5
  - Clean Runtime/ as well.
  - debian/rules (clean): Remove Lib/ocaml/swigp4.ml.
* debian/rules: Remove hardcoded python version.
* Remove upper limit for python from Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* File : example.h */
2
 
 
3
 
class Shape {
4
 
public:
5
 
  Shape() {
6
 
    nshapes++;
7
 
  }
8
 
  virtual ~Shape() {
9
 
    nshapes--;
10
 
  }
11
 
  double  x, y;
12
 
  void    move(double dx, double dy);
13
 
  virtual double area(void) = 0;
14
 
  virtual double perimeter(void) = 0;
15
 
  static  int nshapes;
16
 
  static  int get_nshapes();
17
 
};
18
 
 
19
 
class Circle : public Shape {
20
 
private:
21
 
  double radius;
22
 
public:
23
 
  Circle(double r) : radius(r) { }
24
 
  ~Circle() { }
25
 
  void set_radius( double r );
26
 
  virtual double area(void);
27
 
  virtual double perimeter(void);
28
 
};
29
 
 
30
 
class Square : public Shape {
31
 
private:
32
 
  double width;
33
 
public:
34
 
  Square(double w) : width(w) { }
35
 
  ~Square() { }
36
 
  virtual double area(void);
37
 
  virtual double perimeter(void);
38
 
};