Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | List of all members
markdown_it.ruler.Ruler Class Reference
Inheritance diagram for markdown_it.ruler.Ruler:
Inheritance graph
[legend]
Collaboration diagram for markdown_it.ruler.Ruler:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self)
 
int __find__ (self, str name)
 
None __compile__ (self)
 
None at (self, str ruleName, RuleFuncTv fn, RuleOptionsType|None options=None)
 
None before (self, str beforeName, str ruleName, RuleFuncTv fn, RuleOptionsType|None options=None)
 
None after (self, str afterName, str ruleName, RuleFuncTv fn, RuleOptionsType|None options=None)
 
None push (self, str ruleName, RuleFuncTv fn, RuleOptionsType|None options=None)
 
list[str] enable (self, str|Iterable[str] names, bool ignoreInvalid=False)
 
list[str] enableOnly (self, str|Iterable[str] names, bool ignoreInvalid=False)
 
list[str] disable (self, str|Iterable[str] names, bool ignoreInvalid=False)
 
list[RuleFuncTv] getRules (self, str chainName="")
 
list[str] get_all_rules (self)
 
list[str] get_active_rules (self)
 

Member Function Documentation

◆ __compile__()

None markdown_it.ruler.Ruler.__compile__ (   self)
Build rules lookup cache

◆ __find__()

int markdown_it.ruler.Ruler.__find__ (   self,
str  name 
)
Find rule index by name

◆ after()

None markdown_it.ruler.Ruler.after (   self,
str  afterName,
str  ruleName,
RuleFuncTv  fn,
RuleOptionsType | None   options = None 
)
Add new rule to chain after one with given name.

:param afterName: new rule will be added after this one.
:param ruleName: new rule will be added after this one.
:param fn: new rule function.
:param options: new rule options (not mandatory).
:raises: KeyError if name not found

◆ at()

None markdown_it.ruler.Ruler.at (   self,
str  ruleName,
RuleFuncTv  fn,
RuleOptionsType | None   options = None 
)
Replace rule by name with new function & options.

:param ruleName: rule name to replace.
:param fn: new rule function.
:param options: new rule options (not mandatory).
:raises: KeyError if name not found

◆ before()

None markdown_it.ruler.Ruler.before (   self,
str  beforeName,
str  ruleName,
RuleFuncTv  fn,
RuleOptionsType | None   options = None 
)
Add new rule to chain before one with given name.

:param beforeName: new rule will be added before this one.
:param ruleName: new rule will be added before this one.
:param fn: new rule function.
:param options: new rule options (not mandatory).
:raises: KeyError if name not found

◆ disable()

list[str] markdown_it.ruler.Ruler.disable (   self,
str | Iterable[str]  names,
bool   ignoreInvalid = False 
)
Disable rules with given names.

:param names: name or list of rule names to enable.
:param ignoreInvalid: ignore errors when rule not found
:raises: KeyError if name not found and not ignoreInvalid
:return: list of found rule names

◆ enable()

list[str] markdown_it.ruler.Ruler.enable (   self,
str | Iterable[str]  names,
bool   ignoreInvalid = False 
)
Enable rules with given names.

:param names: name or list of rule names to enable.
:param ignoreInvalid: ignore errors when rule not found
:raises: KeyError if name not found and not ignoreInvalid
:return: list of found rule names

◆ enableOnly()

list[str] markdown_it.ruler.Ruler.enableOnly (   self,
str | Iterable[str]  names,
bool   ignoreInvalid = False 
)
Enable rules with given names, and disable everything else.

:param names: name or list of rule names to enable.
:param ignoreInvalid: ignore errors when rule not found
:raises: KeyError if name not found and not ignoreInvalid
:return: list of found rule names

◆ get_active_rules()

list[str] markdown_it.ruler.Ruler.get_active_rules (   self)
Return the active rule names.

◆ get_all_rules()

list[str] markdown_it.ruler.Ruler.get_all_rules (   self)
Return all available rule names.

◆ getRules()

list[RuleFuncTv] markdown_it.ruler.Ruler.getRules (   self,
str   chainName = "" 
)
Return array of active functions (rules) for given chain name.
It analyzes rules configuration, compiles caches if not exists and returns result.

Default chain name is `''` (empty string). It can't be skipped.
That's done intentionally, to keep signature monomorphic for high speed.

◆ push()

None markdown_it.ruler.Ruler.push (   self,
str  ruleName,
RuleFuncTv  fn,
RuleOptionsType | None   options = None 
)
Push new rule to the end of chain.

:param ruleName: new rule will be added to the end of chain.
:param fn: new rule function.
:param options: new rule options (not mandatory).

The documentation for this class was generated from the following file: