Mercurial > repo
view interps/rail/src/Binding.cpp @ 9200:6b5075d8f571
<boily> le/rn \xc3\xb6rjan/\xc3\x96rjan is the di\xc3\xa6resed twin. He will punctuate your v\xc3\xb6\xe1\xba\x85\xc3\xabls, and maybe a few other unsuspecting letters.
author | HackBot |
---|---|
date | Sun, 09 Oct 2016 00:31:17 +0000 |
parents | 859f9b4339e6 |
children |
line wrap: on
line source
// Binding.cpp #include "lib.h" #include "Var.h" #include "Binding.h" using namespace std; Binding::Binding() : data(NULL) { } Binding::Binding(Var * newData) { data = newData; if (!null()) { data->acquire(); } } Binding::~Binding() { if (!null()) { data->release(); } } Binding::Binding(Binding const & right) { data = right.data; if (!null()) { data->acquire(); } } Binding & Binding::operator=(Binding const & right) { Binding temp(right); swap(data, temp.data); return *this; } Var * Binding::operator->(void) { return data; } Var const * Binding::operator->(void) const { return data; } Var & Binding::operator*(void) { return *data; } Var const & Binding::operator*(void) const { return*data; } bool Binding::null(void) { return data == NULL; }