Debian Codegraph @

gcc/testsuite/gnat.dg/predicate2-project-name_values.ads

raw
1
2 ----
3 with Predicate2.Containers;
4 with Predicate2.Project.Registry.Attribute;
5 with Predicate2.Source_Reference;
6
7 private with Ada.Strings.Unbounded;
8
9 package Predicate2.Project.Name_Values is
10
11 use type Containers.Count_Type;
12 use all type Registry.Attribute.Value_Kind;
13
14 type Object is new Source_Reference.Object with private;
15
16 Undefined : constant Object;
17
18 subtype Value_Kind is Registry.Attribute.Value_Kind;
19
20 function Kind (Self : Object'Class) return Registry.Attribute.Value_Kind
21 with Pre => Object (Self) /= Undefined;
22 -- Returns the Kind for the Name/Values pair object
23
24 private
25
26 use Ada.Strings.Unbounded;
27
28 type Object is new Source_Reference.Object with record
29 Kind : Registry.Attribute.Value_Kind := List;
30 Name : Unbounded_String;
31 Values : Containers.Value_List;
32 end record;
33
34 Undefined : constant Object :=
35 Object'(Source_Reference.Object with others => <>);
36
37 end Predicate2.Project.Name_Values;