adayaml_0.3.0_ab19e387/dropin/src/yaml-destination-c_string.ads

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--  part of AdaYaml, (c) 2017 Felix Krause
--  released under the terms of the MIT license, see the file "copying.txt"

with Interfaces.C;
with System;

package Yaml.Destination.C_String is
   type Instance is new Destination.Instance with private;

   function As_Destination (Raw : System.Address;
                            Size : Interfaces.C.size_t;
                            Size_Written : access Interfaces.C.size_t)
                            return Pointer;

   overriding procedure Write_Data (D : in out Instance;
                                    Buffer : String);
private
   type Instance is new Destination.Instance with record
      Raw : System.Address;
      Size : Integer;
      Size_Written : access Interfaces.C.size_t;
   end record;
end Yaml.Destination.C_String;