headers/bsd: Add sys/queue.h.
[haiku.git] / src / kits / debugger / model / SyntheticPrimitiveType.cpp
blob52c6c78c979eb061566db3d752dbff83d61b3123
1 /*
2 * Copyright 2014, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "SyntheticPrimitiveType.h"
9 #include <Variant.h>
11 #include "UiUtils.h"
14 SyntheticPrimitiveType::SyntheticPrimitiveType(uint32 typeConstant)
16 PrimitiveType(),
17 fTypeConstant(typeConstant),
18 fID(),
19 fName()
21 _Init();
25 SyntheticPrimitiveType::~SyntheticPrimitiveType()
30 uint32
31 SyntheticPrimitiveType::TypeConstant() const
33 return fTypeConstant;
37 image_id
38 SyntheticPrimitiveType::ImageID() const
40 return -1;
44 const BString&
45 SyntheticPrimitiveType::ID() const
47 return fID;
51 const BString&
52 SyntheticPrimitiveType::Name() const
54 return fName;
58 type_kind
59 SyntheticPrimitiveType::Kind() const
61 return TYPE_PRIMITIVE;
65 target_size_t
66 SyntheticPrimitiveType::ByteSize() const
68 return BVariant::SizeOfType(fTypeConstant);
72 status_t
73 SyntheticPrimitiveType::ResolveObjectDataLocation(
74 const ValueLocation& objectLocation, ValueLocation*& _location)
76 _location = NULL;
77 return B_NOT_SUPPORTED;
81 status_t
82 SyntheticPrimitiveType::ResolveObjectDataLocation(target_addr_t objectAddress,
83 ValueLocation*& _location)
85 _location = NULL;
86 return B_NOT_SUPPORTED;
90 void
91 SyntheticPrimitiveType::_Init()
93 fID.SetToFormat("%p", this);
94 fName.SetTo(UiUtils::TypeCodeToString(fTypeConstant));