| 1 |
|
| MODULE = Geo::Geos PACKAGE = Geo::Geos::PrecisionModel |
| 2 |
|
| PROTOTYPES: DISABLE |
| 3 |
|
| |
| 4 |
|
| PrecisionModel* new(SV*, SV* arg1 = NULL, SV* arg2 = NULL, SV* arg3 = NULL) { |
| 5 |
28 |
| if (!arg1) RETVAL = new PrecisionModel(); |
| 6 |
28 |
▶ | else { |
Branch: 4 branches
| Branch | True | False | Total |
| else { |
15 |
13 |
28 |
| else { |
15 |
0 |
15 |
| else { |
15 |
0 |
15 |
| else { |
0 |
0 |
0 |
|
| 7 |
|
| if(SvIOK(arg1)) { |
| 8 |
13 |
▶ | PrecisionModel::Type model = static_cast<PrecisionModel::Type>(SvIV(arg1)); |
Branch: 1 branch
| Branch | True | False | Total |
| PrecisionModel::Type model = static_cast<PrecisionModel::Type>(SvIV(arg1)); |
10 |
3 |
13 |
|
| 9 |
10 |
▶ | RETVAL = new PrecisionModel(model); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new PrecisionModel(model); |
10 |
0 |
10 |
|
| 10 |
10 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
10 |
0 |
10 |
| } |
10 |
0 |
10 |
| } |
0 |
0 |
0 |
|
| 11 |
|
| else { |
| 12 |
|
| double scale = SvNV(arg1); |
| 13 |
3 |
▶ | if (arg2) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (arg2) { |
3 |
0 |
3 |
|
| 14 |
3 |
▶ | if(!arg3) throw("undef not allowed"); |
Branch: 1 branch
| Branch | True | False | Total |
| if(!arg3) throw("undef not allowed"); |
1 |
2 |
3 |
|
| 15 |
1 |
▶ | double offsetX = SvNV(arg2); |
Branch: 1 branch
| Branch | True | False | Total |
| double offsetX = SvNV(arg2); |
0 |
1 |
1 |
|
| 16 |
1 |
▶ | double offsetY = SvNV(arg3); |
Branch: 1 branch
| Branch | True | False | Total |
| double offsetY = SvNV(arg3); |
1 |
0 |
1 |
|
| 17 |
1 |
▶ | RETVAL = new PrecisionModel(scale, offsetX, offsetY); |
Branch: 1 branch
| Branch | True | False | Total |
| RETVAL = new PrecisionModel(scale, offsetX, offsetY); |
1 |
0 |
1 |
|
| 18 |
1 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
1 |
0 |
1 |
| } |
1 |
0 |
1 |
| } |
0 |
0 |
0 |
|
| 19 |
|
| else RETVAL = new PrecisionModel(scale); |
| 20 |
2 |
▶ | } |
Branch: 3 branches
| Branch | True | False | Total |
| } |
2 |
0 |
2 |
| } |
2 |
0 |
2 |
| } |
0 |
0 |
0 |
|
| 21 |
|
| } |
| 22 |
|
| } |
| 23 |
|
| |
| 24 |
2 |
▶ | double PrecisionModel::getScale() |
Branch: 1 branch
| Branch | True | False | Total |
| double PrecisionModel::getScale() |
0 |
2 |
2 |
|
| 25 |
|
| |
| 26 |
0 |
▶ | double PrecisionModel::getOffsetX() |
Branch: 1 branch
| Branch | True | False | Total |
| double PrecisionModel::getOffsetX() |
0 |
0 |
0 |
|
| 27 |
|
| |
| 28 |
0 |
▶ | double PrecisionModel::getOffsetY() |
Branch: 1 branch
| Branch | True | False | Total |
| double PrecisionModel::getOffsetY() |
0 |
0 |
0 |
|
| 29 |
|
| |
| 30 |
11 |
▶ | bool PrecisionModel::isFloating() |
Branch: 1 branch
| Branch | True | False | Total |
| bool PrecisionModel::isFloating() |
8 |
3 |
11 |
|
| 31 |
|
| |
| 32 |
1 |
▶ | int PrecisionModel::getMaximumSignificantDigits() |
Branch: 1 branch
| Branch | True | False | Total |
| int PrecisionModel::getMaximumSignificantDigits() |
0 |
1 |
1 |
|
| 33 |
|
| |
| 34 |
7 |
▶ | int PrecisionModel::getType() |
Branch: 1 branch
| Branch | True | False | Total |
| int PrecisionModel::getType() |
0 |
7 |
7 |
|
| 35 |
|
| |
| 36 |
1 |
▶ | double PrecisionModel::makePrecise(double val) |
Branch: 1 branch
| Branch | True | False | Total |
| double PrecisionModel::makePrecise(double val) |
0 |
1 |
1 |
|
| 37 |
|
| |
| 38 |
9 |
▶ | std::string PrecisionModel::toString(...) |
Branch: 1 branch
| Branch | True | False | Total |
| std::string PrecisionModel::toString(...) |
9 |
0 |
9 |
|
| 39 |
|
| |
| 40 |
3 |
▶ | int PrecisionModel::compareTo(PrecisionModel& other) { RETVAL = THIS->compareTo(&other); } |
Branch: 1 branch
| Branch | True | False | Total |
| int PrecisionModel::compareTo(PrecisionModel& other) { RETVAL = THIS->compareTo(&other); } |
0 |
3 |
3 |
|
| 41 |
|
| |
| 42 |
|
| BOOT { |
| 43 |
46 |
▶ | auto this_stash = Stash(__PACKAGE__); |
Branch: 1 branch
| Branch | True | False | Total |
| auto this_stash = Stash(__PACKAGE__); |
46 |
0 |
46 |
|
| 44 |
184 |
▶ | xs::exp::create_constants(this_stash, { |
Branch: 4 branches
| Branch | True | False | Total |
| xs::exp::create_constants(this_stash, { |
46 |
0 |
46 |
| xs::exp::create_constants(this_stash, { |
46 |
0 |
46 |
| xs::exp::create_constants(this_stash, { |
138 |
46 |
184 |
| xs::exp::create_constants(this_stash, { |
0 |
0 |
0 |
|
| 45 |
|
| {"TYPE_FIXED", PrecisionModel::Type::FIXED}, |
| 46 |
|
| {"TYPE_FLOATING", PrecisionModel::Type::FLOATING}, |
| 47 |
|
| {"TYPE_FLOATING_SINGLE", PrecisionModel::Type::FLOATING_SINGLE} |
| 48 |
|
| }); |
| 49 |
46 |
▶ | xs::exp::autoexport(this_stash); |
Branch: 2 branches
| Branch | True | False | Total |
| xs::exp::autoexport(this_stash); |
46 |
0 |
46 |
| xs::exp::autoexport(this_stash); |
46 |
0 |
46 |
|
| 50 |
46 |
| } |