headers/bsd: Add sys/queue.h.
[haiku.git] / src / kits / debugger / model / Variable.cpp
blob08653abcc66a3e2f8bb5524283b0dcbfde3b0bc6
1 /*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "Variable.h"
9 #include "CpuState.h"
10 #include "ObjectID.h"
11 #include "Type.h"
12 #include "ValueLocation.h"
15 Variable::Variable(ObjectID* id, const BString& name, Type* type,
16 ValueLocation* location, CpuState* state)
18 fID(id),
19 fName(name),
20 fType(type),
21 fLocation(location),
22 fCpuState(state)
24 fID->AcquireReference();
25 fType->AcquireReference();
26 fLocation->AcquireReference();
27 if (fCpuState != NULL)
28 fCpuState->AcquireReference();
32 Variable::~Variable()
34 fID->ReleaseReference();
35 fType->ReleaseReference();
36 fLocation->ReleaseReference();
37 if (fCpuState != NULL)
38 fCpuState->ReleaseReference();