Skip to content

STRUCT

Headers

Contents

  • Properties
    • umbrellaHeader
    • moduleMap
    • public
    • private
    • project
    • mappingsDir
    • exclusionRule
    • compilationCondition
  • Methods
    • init(public:umbrellaHeader:moduleMap:private:project:mappingsDir:exclusionRule:compilationCondition:)
    • headers(public:private:project:mappingsDir:exclusionRule:compilationCondition:)
    • allHeaders(from:umbrella:private:mappingsDir:compilationCondition:)
    • onlyHeaders(from:umbrella:private:mappingsDir:compilationCondition:)
swift
public struct Headers: Codable, Equatable

A group of public, private and project headers.

Properties

umbrellaHeader

swift
public var umbrellaHeader: FilePath?

Path to an umbrella header, which will be used to get list of public headers.

moduleMap

swift
public var moduleMap: ModuleMap?

Whether to use modulemap file, generate one, or not use modulemap at all

public

swift
public var `public`: HeaderFileList?

Relative glob pattern that points to the public headers.

private

swift
public var `private`: HeaderFileList?

Relative glob pattern that points to the private headers.

project

swift
public var project: HeaderFileList?

Relative glob pattern that points to the project headers.

mappingsDir

swift
public var mappingsDir: FilePath?

A directory from where to preserve the folder structure for the headers files. If not provided the headers files are flattened.

exclusionRule

swift
public var exclusionRule: AutomaticExclusionRule

Rule, which determines how to resolve found duplicates in public/private/project scopes

compilationCondition

swift
public var compilationCondition: PlatformCondition?

Headers condition for platform filters

Methods

init(public:umbrellaHeader:moduleMap:private:project:mappingsDir:exclusionRule:compilationCondition:)

swift
public init(
    public publicHeaders: HeaderFileList? = nil,
    umbrellaHeader: FilePath? = nil,
    moduleMap: ModuleMap? = nil,
    private privateHeaders: HeaderFileList? = nil,
    project: HeaderFileList? = nil,
    mappingsDir: FilePath? = nil,
    exclusionRule: AutomaticExclusionRule = .projectExcludesPrivateAndPublic,
    compilationCondition: PlatformCondition? = nil
)

headers(public:private:project:mappingsDir:exclusionRule:compilationCondition:)

swift
public static func headers(
    public: HeaderFileList? = nil,
    private: HeaderFileList? = nil,
    project: HeaderFileList? = nil,
    mappingsDir: FilePath? = nil,
    exclusionRule: AutomaticExclusionRule = .projectExcludesPrivateAndPublic,
    compilationCondition: PlatformCondition? = nil
) -> Headers

allHeaders(from:umbrella:private:mappingsDir:compilationCondition:)

swift
public static func allHeaders(
    from list: HeaderFileList,
    umbrella: FilePath,
    private privateHeaders: HeaderFileList? = nil,
    mappingsDir: FilePath? = nil,
    compilationCondition: PlatformCondition? = nil
) -> Headers

Headers from the file list are included as:

  • public, if the header is present in the umbrella header
  • private, if the header is present in the private list
  • project, otherwise
  • Parameters:
    • from: File list, which contains public and project headers
    • umbrella: File path to the umbrella header
    • private: File list, which contains private headers

Parameters

NameDescription
fromFile list, which contains public and project headers
umbrellaFile path to the umbrella header
privateFile list, which contains private headers

onlyHeaders(from:umbrella:private:mappingsDir:compilationCondition:)

swift
public static func onlyHeaders(
    from list: HeaderFileList,
    umbrella: FilePath,
    private privateHeaders: HeaderFileList? = nil,
    mappingsDir: FilePath? = nil,
    compilationCondition: PlatformCondition? = nil
) -> Headers

Headers from the file list are included as:

  • public, if the header is present in the umbrella header
  • private, if the header is present in the private list
  • not included, otherwise
  • Parameters:
    • from: File list, which contains public and project headers
    • umbrella: File path to the umbrella header
    • private: File list, which contains private headers

Parameters

NameDescription
fromFile list, which contains public and project headers
umbrellaFile path to the umbrella header
privateFile list, which contains private headers