NLdoc.Conversion.Reader.Docx.Files.Numberings.State (NLdoc.Conversion.Reader.Docx v1.1.2)
View SourceThis module defines a struct that captures the state of the converter during a Docx conversion.
Summary
Functions
Gets the given field from the state object.
Modifies a state object by setting the given field to the value that field had in the old state.
Prepends a list of values or a single value to the list field in the state object.
Sets the given field on the state object to the given value.
Types
@type t() :: %NLdoc.Conversion.Reader.Docx.Files.Numberings.State{ abstract_numbering_id: (String.t() | nil) | nil, abstract_numberings: [NLdoc.Conversion.Reader.Docx.AST.Numbering.t()] | nil, level: (integer() | nil) | nil, numbering_id: (String.t() | nil) | nil, numberings: [NLdoc.Conversion.Reader.Docx.AST.Numbering.t()] | nil }
Functions
@spec get(t(), :abstract_numberings) :: [ NLdoc.Conversion.Reader.Docx.AST.Numbering.t() ]
@spec get(t(), :numberings) :: [NLdoc.Conversion.Reader.Docx.AST.Numbering.t()]
@spec get(t(), :level) :: integer() | nil
@spec get(t(), :abstract_numbering_id) :: String.t() | nil
@spec get(t(), :numbering_id) :: String.t() | nil
Gets the given field from the state object.
This function only accepts fields of the state, which are :abstract_numberings, :numberings, :level, :abstract_numbering_id, :numbering_id. It will raise if the field is not valid.
@spec keep(t(), t(), :abstract_numberings) :: t()
@spec keep(t(), t(), :numberings) :: t()
@spec keep(t(), t(), :level) :: t()
@spec keep(t(), t(), :abstract_numbering_id) :: t()
@spec keep(t(), t(), :numbering_id) :: t()
Modifies a state object by setting the given field to the value that field had in the old state.
This function only accepts fields of the state, which are :abstract_numberings, :numberings, :level, :abstract_numbering_id, :numbering_id. It will raise if the field is not valid.
@spec prepend(t(), :abstract_numberings, [ NLdoc.Conversion.Reader.Docx.AST.Numbering.t() ]) :: t()
@spec prepend( t(), :abstract_numberings, NLdoc.Conversion.Reader.Docx.AST.Numbering.t() ) :: t()
@spec prepend(t(), :numberings, [NLdoc.Conversion.Reader.Docx.AST.Numbering.t()]) :: t()
@spec prepend(t(), :numberings, NLdoc.Conversion.Reader.Docx.AST.Numbering.t()) :: t()
Prepends a list of values or a single value to the list field in the state object.
This function only accepts fields of the state, which are :abstract_numberings, :numberings. It will raise if the field is not valid.
@spec set(t(), :abstract_numberings, [NLdoc.Conversion.Reader.Docx.AST.Numbering.t()]) :: t()
@spec set(t(), :numberings, [NLdoc.Conversion.Reader.Docx.AST.Numbering.t()]) :: t()
@spec set(t(), :level, integer() | nil) :: t()
@spec set(t(), :abstract_numbering_id, String.t() | nil) :: t()
@spec set(t(), :numbering_id, String.t() | nil) :: t()
Sets the given field on the state object to the given value.
This function only accepts fields of the state, which are :abstract_numberings, :numberings, :level, :abstract_numbering_id, :numbering_id. It will raise if the field is not valid.