LCOV - code coverage report
Current view: top level - flamenco/types - fd_types_yaml.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 7 7 100.0 %
Date: 2025-07-01 05:00:49 Functions: 2 94 2.1 %

          Line data    Source code
       1             : #ifndef HEADER_fd_src_flamenco_types_fd_types_yaml_h
       2             : #define HEADER_fd_src_flamenco_types_fd_types_yaml_h
       3             : 
       4             : #include "../fd_flamenco_base.h"
       5             : 
       6             : /* fd_flamenco_yaml_t implements the fd_flamenco_walk_fn_t virtual class
       7             :    interface. */
       8             : 
       9             : struct fd_flamenco_yaml;
      10             : typedef struct fd_flamenco_yaml fd_flamenco_yaml_t;
      11             : 
      12        5283 : #define FD_FLAMENCO_YAML_MAX_INDENT (64UL)
      13             : #define FD_FLAMENCO_YAML_INDENT_BUFSZ (2UL*FD_FLAMENCO_YAML_MAX_INDENT+1UL)
      14             : 
      15             : struct fd_flamenco_yaml {
      16             :   void * file;   /* (FILE *) or platform equivalent */
      17             : 
      18             :   int  stack [ FD_FLAMENCO_YAML_MAX_INDENT   ];
      19             :   char indent[ FD_FLAMENCO_YAML_INDENT_BUFSZ ];
      20             : };
      21             : 
      22             : FD_PROTOTYPES_BEGIN
      23             : 
      24             : FD_FN_PURE static inline ulong
      25          24 : fd_flamenco_yaml_align( void ) {
      26          24 :   return alignof(fd_flamenco_yaml_t);
      27          24 : }
      28             : 
      29             : FD_FN_PURE static inline ulong
      30          24 : fd_flamenco_yaml_footprint( void ) {
      31          24 :   return sizeof(fd_flamenco_yaml_t);
      32          24 : }
      33             : 
      34             : fd_flamenco_yaml_t *
      35             : fd_flamenco_yaml_new( void * mem );
      36             : 
      37             : void *
      38             : fd_flamenco_yaml_delete( fd_flamenco_yaml_t * yaml );
      39             : 
      40             : /* fd_flamenco_yaml_init initializes a fd_flamenco_yaml_t object.
      41             :    file is a (FILE *) handle or platform-specific equivalent. */
      42             : 
      43             : fd_flamenco_yaml_t *
      44             : fd_flamenco_yaml_init( fd_flamenco_yaml_t * yaml,
      45             :                        void *               file );
      46             : 
      47             : void *
      48             : fd_flamenco_yaml_file( fd_flamenco_yaml_t * yaml );
      49             : 
      50             : /* fd_flamenco_yaml_walk implements fd_flamenco_walk_fn_t. */
      51             : 
      52             : void
      53             : fd_flamenco_yaml_walk( void *       self,
      54             :                        void const * arg,
      55             :                        char const * name,
      56             :                        int          type,
      57             :                        char const * type_name,
      58             :                        uint         level );
      59             : 
      60             : fd_flamenco_yaml_t *
      61             : fd_get_types_yaml(void);
      62             : 
      63             : FD_PROTOTYPES_END
      64             : 
      65             : #endif /* HEADER_fd_src_flamenco_types_fd_types_yaml_h */

Generated by: LCOV version 1.14