2 * Copyright 2011, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
5 #ifndef TYPE_LOOKUP_CONSTRAINTS_H
6 #define TYPE_LOOKUP_CONSTRAINTS_H
14 class TypeLookupConstraints
{
16 TypeLookupConstraints();
18 TypeLookupConstraints(type_kind typeKind
);
19 // constrain on type only
20 TypeLookupConstraints(type_kind typeKind
,
23 bool HasTypeKind() const;
24 bool HasSubtypeKind() const;
25 bool HasBaseTypeName() const;
26 type_kind
TypeKind() const;
27 int32
SubtypeKind() const;
29 // TODO: This should be further generalized to being able to
30 // pass a full set of constraints for the base type, not just the name
31 const BString
& BaseTypeName() const;
33 void SetTypeKind(type_kind typeKind
);
34 void SetSubtypeKind(int32 subtypeKind
);
35 void SetBaseTypeName(const BString
& name
);
41 bool fSubtypeKindGiven
;
42 BString fBaseTypeName
;
45 #endif // TYPE_LOOKUP_CONSTRAINTS_H