PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/contract/simple_cxx/example.i

#
Swig | 28 lines | 22 code | 5 blank | 1 comment | 0 complexity | 65b24802aa5a4e58f3e92edeb0f42826 MD5 | raw file
 1%module example
 2
 3%contract Circle::Circle(double radius) {
 4require:
 5    radius > 0;
 6}
 7
 8%contract Circle::area(void) {
 9ensure:
10    area > 0;
11}
12
13%contract Shape::move(double dx, double dy) {
14require:
15    dx > 0;
16}
17
18/* should be no effect, since there is no move() for class Circle */
19%contract Circle::move(double dx, double dy) {
20require:
21    dy > 1;
22}
23
24# include must be after contracts
25%{
26#include "example.h"
27%}
28%include "example.h"