lib/Bio/PhyloXS/Mediators/TaxaMediator.xs

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 24 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« lib/Bio/PhyloXS/Matrices/TypeSafeData.xs ↑ Summary lib/Bio/PhyloXS/NeXML/Writable.xs »
1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4  
5 #include "src/TaxaMediator.h"
6 # include "src/types.h"
7  
8 0 TaxaMediator* create(const char* classname) {
9 static TaxaMediator* singleton = NULL;
10 0 ▶ if ( singleton == NULL ) {
Branch: 1 branch
BranchTrueFalseTotal
if ( singleton == NULL ) { 0 0 0
11 0 Newx(singleton,1,TaxaMediator);
12 0 initialize_taxamediator(singleton);
13 }
14 0 return singleton;
15 }
16  
17 0 void initialize_taxamediator(TaxaMediator* self) {
18 0 self->object = newHV();
19 0 self->id_by_type = newHV();
20 0 self->one_to_one = newHV();
21 0 self->one_to_many = newHV();
22 0 ((Identifiable*)self)->_type = _NONE_;
23 0 ((Identifiable*)self)->_container = _NONE_;
24 0 ((Identifiable*)self)->_index = _TAXAMEDIATOR_IDX_;
25 0 }
26  
27 //TaxaMediator* register_object( TaxaMediator* self, Identifiable* object );
28 //TaxaMediator* unregister_object( TaxaMediator* self, Identifiable* object );
29 //TaxaMediator* set_link( TaxaMediator* self, ... );
30 //TaxaMediator* get_link( TaxaMediator* self, ... );
31 //TaxaMediator* remove_link( TaxaMediator* self, ... );
32  
33 MODULE = Bio::PhyloXS::Mediators::TaxaMediator PACKAGE = Bio::PhyloXS::Mediators::TaxaMediator
34  
35 PROTOTYPES: DISABLE
36  
37  
38 TaxaMediator *
39 create (classname)
40 const char * classname
41  
42 void
43 initialize_taxamediator (self)
44 TaxaMediator * self
45 PREINIT:
46 I32* temp;
47 PPCODE:
48 0 temp = PL_markstack_ptr++;
49 0 initialize_taxamediator(self);
50 0 ▶ if (PL_markstack_ptr != temp) {
Branch: 1 branch
BranchTrueFalseTotal
if (PL_markstack_ptr != temp) { 0 0 0
51 /* truly void, because dXSARGS not invoked */
52 0 PL_markstack_ptr = temp;
53 0 XSRETURN_EMPTY; /* return empty stack */
54 }
55 /* must have used dXSARGS; list context implied */
56 0 return; /* assume stack size is correct */
57  
« lib/Bio/PhyloXS/Matrices/TypeSafeData.xs ↑ Summary lib/Bio/PhyloXS/NeXML/Writable.xs »