t/cookbook/recipe03.xsi

filter: Statementstmt 0.0% 0 / 2 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 2 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« t/cookbook/recipe01.xsi ↑ Summary t/cookbook/recipe04.xsi »
1 MODE: INLINE
2  
3 struct TimezoneRecipe03 {
4 const char* get_name() const { return name; }
5 static const TimezoneRecipe03& get_instance() {
6 static TimezoneRecipe03* instance = new TimezoneRecipe03();
7 return *instance;
8 }
9 private:
10 TimezoneRecipe03() { name = "Europe/Minsk"; }
11 const char* name;
12 };
13  
14 namespace xs {
15 template <>
16 struct Typemap<const TimezoneRecipe03*> : TypemapObject<const TimezoneRecipe03*, const TimezoneRecipe03*, ObjectTypeForeignPtr, ObjectStorageIV, StaticCast> {
17 static std::string package () { return "MyTest::Cookbook::TimezoneRecipe03"; }
18 };
19 }
20  
21 MODULE = MyTest::Cookbook PACKAGE = MyTest::Cookbook::TimezoneRecipe03
22 PROTOTYPES: DISABLE
23  
24 0 const char* TimezoneRecipe03::get_name() : const;
25  
26 0 const TimezoneRecipe03* get_instance() { RETVAL = &TimezoneRecipe03::get_instance(); }
« t/cookbook/recipe01.xsi ↑ Summary t/cookbook/recipe04.xsi »