2 * Copyright 2011, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
7 #include "TypeLookupConstraints.h"
10 TypeLookupConstraints::TypeLookupConstraints()
12 fTypeKindGiven(false),
13 fSubtypeKindGiven(false)
18 TypeLookupConstraints::TypeLookupConstraints(type_kind typeKind
)
22 fSubtypeKindGiven(false)
27 TypeLookupConstraints::TypeLookupConstraints(type_kind typeKind
,
31 fSubtypeKind(subTypeKind
),
33 fSubtypeKindGiven(true),
40 TypeLookupConstraints::HasTypeKind() const
42 return fTypeKindGiven
;
47 TypeLookupConstraints::HasSubtypeKind() const
49 return fSubtypeKindGiven
;
54 TypeLookupConstraints::HasBaseTypeName() const
56 return fBaseTypeName
.Length() > 0;
61 TypeLookupConstraints::TypeKind() const
68 TypeLookupConstraints::SubtypeKind() const
75 TypeLookupConstraints::BaseTypeName() const
82 TypeLookupConstraints::SetTypeKind(type_kind typeKind
)
85 fTypeKindGiven
= true;
90 TypeLookupConstraints::SetSubtypeKind(int32 subtypeKind
)
92 fSubtypeKind
= subtypeKind
;
93 fSubtypeKindGiven
= true;
98 TypeLookupConstraints::SetBaseTypeName(const BString
& name
)
100 fBaseTypeName
= name
;