header

package
v0.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.7.0

type Config struct {
	// Includes specifies the header file include paths to be processed.
	// These are the paths used in #include directives, such as:
	// - "zlib.h"
	// - "openssl/ssl.h"
	Includes []string
	// PlatDiff specifies header file include paths that differ between platforms,these are include paths in Includes.
	PlatDiff []string
	Args     []string
	Mix      bool
}

type PkgHfilesInfo

type PkgHfilesInfo struct {
	Inters []string // From types.Config.Include
	Impls  []string // From same root of types.Config.Include
	Thirds []string // Not Current Pkg's Files
	Plats  []string // Platform Difference Files
}

func PkgHfileInfo

func PkgHfileInfo(conf *Config) *PkgHfilesInfo

PkgHfileInfo analyzes header files dependencies and categorizes them into three groups: 1. Inters: Direct includes from types.Config.Include 2. Impls: Header files from the same root directory as Inters 3. Thirds: Header files from external sources

The function works by: 1. Creating a temporary header file that includes all headers from conf.Include 2. Using clang to parse the translation unit and analyze includes 3. Categorizing includes based on their inclusion level and path relationship

func (*PkgHfilesInfo) CurPkgFiles

func (p *PkgHfilesInfo) CurPkgFiles() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL