FairShip
Loading...
Searching...
No Matches
ShipGeoConfig.AttrDict Class Reference
Inheritance diagram for ShipGeoConfig.AttrDict:
Collaboration diagram for ShipGeoConfig.AttrDict:

Public Member Functions

None __init__ (self, *args, **kwargs)
 
AttrDict clone (self)
 

Private Attributes

 __dict__
 

Detailed Description

dict class that can address its keys as fields, e.g.
d['key'] = 1
assert d.key == 1

Definition at line 11 of file ShipGeoConfig.py.

Constructor & Destructor Documentation

◆ __init__()

None ShipGeoConfig.AttrDict.__init__ (   self,
args,
**  kwargs 
)

Reimplemented in ShipGeoConfig.Config.

Definition at line 18 of file ShipGeoConfig.py.

18 def __init__(self, *args, **kwargs) -> None:
19 super().__init__(*args, **kwargs)
20 self.__dict__ = self
21

Member Function Documentation

◆ clone()

AttrDict ShipGeoConfig.AttrDict.clone (   self)

Reimplemented in ShipGeoConfig.Config.

Definition at line 22 of file ShipGeoConfig.py.

22 def clone(self) -> AttrDict:
23 result = AttrDict()
24 for k, v in self.items():
25 if isinstance(v, AttrDict):
26 result[k] = v.clone()
27 else:
28 result[k] = v
29 return result
30
31

Member Data Documentation

◆ __dict__

ShipGeoConfig.AttrDict.__dict__
private

Definition at line 20 of file ShipGeoConfig.py.


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