6 VarLink::VarLink(Variable
* nvar
, const std::string
& nname
)
12 this->nextSibling
= 0;
13 this->prevSibling
= 0;
14 this->var
= nvar
->ref();
18 VarLink::VarLink(const VarLink
& link
)
24 this->name
= link
.name
;
25 this->nextSibling
= 0;
26 this->prevSibling
= 0;
27 this->var
= link
.var
->ref();
34 mark_deallocated(this);
39 void VarLink::replaceWith(Variable
* newVar
)
41 Variable
* oldVar
= var
;
46 void VarLink::replaceWith(VarLink
* newVar
)
50 replaceWith(newVar
->var
);
54 replaceWith(new Variable());
58 int VarLink::getIntName()
60 return atoi(name
.c_str());
63 void VarLink::setIntName(int n
)
66 sprintf_s(sIdx
, sizeof(sIdx
), "%d", n
);