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

Public Member Functions

Any __getattr__ (self, str name)
None __setattr__ (self, str name, Any value)
None __init__ (self, *args, **kwargs)
AttrDict clone (self)

Private Attributes

 __dict__ = self

Detailed Description

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

Definition at line 12 of file ShipGeoConfig.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 26 of file ShipGeoConfig.py.

26 def __init__(self, *args, **kwargs) -> None:
27 super().__init__(*args, **kwargs)
28 self.__dict__ = self
29

Member Function Documentation

◆ __getattr__()

Any ShipGeoConfig.AttrDict.__getattr__ ( self,
str name )

Definition at line 23 of file ShipGeoConfig.py.

23 def __getattr__(self, name: str) -> Any: ...

◆ __setattr__()

None ShipGeoConfig.AttrDict.__setattr__ ( self,
str name,
Any value )

Definition at line 24 of file ShipGeoConfig.py.

24 def __setattr__(self, name: str, value: Any) -> None: ...
25

◆ clone()

AttrDict ShipGeoConfig.AttrDict.clone ( self)

Reimplemented in ShipGeoConfig.Config.

Definition at line 30 of file ShipGeoConfig.py.

30 def clone(self) -> AttrDict:
31 result = AttrDict()
32 for k, v in self.items():
33 if isinstance(v, AttrDict):
34 result[k] = v.clone()
35 else:
36 result[k] = v
37 return result
38
39

Member Data Documentation

◆ __dict__

ShipGeoConfig.AttrDict.__dict__ = self
private

Definition at line 28 of file ShipGeoConfig.py.


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