btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / debugger / model / TypeLookupConstraints.h
blobcfc42c1fab00d5bc6b5de5e8317826ac58efbf1a
1 /*
2 * Copyright 2011, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef TYPE_LOOKUP_CONSTRAINTS_H
6 #define TYPE_LOOKUP_CONSTRAINTS_H
9 #include <String.h>
11 #include "Type.h"
14 class TypeLookupConstraints {
15 public:
16 TypeLookupConstraints();
17 // no constraints
18 TypeLookupConstraints(type_kind typeKind);
19 // constrain on type only
20 TypeLookupConstraints(type_kind typeKind,
21 int32 subtypeKind);
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);
37 private:
38 type_kind fTypeKind;
39 int32 fSubtypeKind;
40 bool fTypeKindGiven;
41 bool fSubtypeKindGiven;
42 BString fBaseTypeName;
45 #endif // TYPE_LOOKUP_CONSTRAINTS_H