Horizon
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
pybis.DictParam Class Reference
Inheritance diagram for pybis.DictParam:
pybis.Param pybis.Parse

Public Member Functions

 __init__ (self, key, pyparser, **kwds)
 
 flatten (self, new)
 
 merge (self, orig, new)
 
- Public Member Functions inherited from pybis.Param
 can_parse (self, text)
 
 initial (self, text, comment)
 
- Public Member Functions inherited from pybis.Parse
 add (self, obj)
 
 __iadd__ (self, obj)
 
 get_globals (self)
 
 find_parser (self, text)
 
 parse (self, node, text, comment)
 
 pyparse (self, text)
 
 fin (self, node)
 
 pop (self, new, name)
 

Public Attributes

 key
 
- Public Attributes inherited from pybis.Param
 delim
 
- Public Attributes inherited from pybis.Parse
 key
 
 flat_key
 
 data_name
 
 default
 
 initvalue
 
 pyparser
 
 list_merge
 
 asList
 
 asDict
 
 children
 
 parent
 
 globals
 
 required
 

Detailed Description

Label indexing object as _key, such as 'Port_map'.

Constructor & Destructor Documentation

◆ __init__()

pybis.DictParam.__init__ (   self,
  key,
  pyparser,
**  default 
)
key:         Name of element.
   pyparser:    Parser to call with pyparse
   default:     Default value of object if not found
   initvalue:   Default value of object on first merge
   data_name:   Make the data of this node a child with name 'data_name'
   list_merge:  Merge multiple copies together as list
   asList:      Interpret pyparse results as a list
   asDict:      Interpret pyparse results as a dict
   required:    raise Exception if not found

Reimplemented from pybis.Param.

Member Function Documentation

◆ flatten()

pybis.DictParam.flatten (   self,
  new 
)
Reformat pyparse results as what we'd expect.

Reimplemented from pybis.Parse.

◆ merge()

pybis.DictParam.merge (   self,
  orig,
  new 
)
Merge two instances of the same parser under one parent.

Reimplemented from pybis.Parse.


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