Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
attr._make._ClassBuilder Class Reference

Public Member Functions

 __init__ (self, type cls, these, bool auto_attribs, ClassProps props, bool has_custom_setattr)
 
 __repr__ (self)
 
 build_class (self)
 
 add_repr (self, ns)
 
 add_str (self)
 
 make_unhashable (self)
 
 add_hash (self)
 
 add_init (self)
 
 add_replace (self)
 
 add_match_args (self)
 
 add_attrs_init (self)
 
 add_eq (self)
 
 add_order (self)
 
 add_setattr (self)
 

Protected Member Functions

None _eval_snippets (self)
 
 _patch_original_class (self)
 
 _create_slots_class (self)
 
 _make_getstate_setstate (self)
 
Callable _add_method_dunders_unsafe (self, Callable method)
 
Callable _add_method_dunders_safe (self, Callable method)
 

Protected Attributes

 _cls
 
 _cls_dict
 
 _attrs
 
 _base_names
 
 _base_attr_map
 
 _attr_names
 
 _slots
 
 _frozen
 
 _weakref_slot
 
 _cache_hash
 
 _has_pre_init
 
 _pre_init_has_args
 
 _has_post_init
 
 _delete_attribs
 
 _is_exc
 
 _on_setattr
 
 _has_custom_setattr
 
 _wrote_own_setattr
 
 _repr_added
 
 _add_method_dunders
 

Detailed Description

Iteratively build *one* class.

Member Function Documentation

◆ _add_method_dunders_safe()

Callable attr._make._ClassBuilder._add_method_dunders_safe (   self,
Callable  method 
)
protected
Add __module__ and __qualname__ to a *method* if possible.

◆ _add_method_dunders_unsafe()

Callable attr._make._ClassBuilder._add_method_dunders_unsafe (   self,
Callable  method 
)
protected
Add __module__ and __qualname__ to a *method*.

◆ _create_slots_class()

attr._make._ClassBuilder._create_slots_class (   self)
protected
Build and return a new class with a `__slots__` attribute.

◆ _eval_snippets()

None attr._make._ClassBuilder._eval_snippets (   self)
protected
Evaluate any registered snippets in one go.

◆ _make_getstate_setstate()

attr._make._ClassBuilder._make_getstate_setstate (   self)
protected
Create custom __setstate__ and __getstate__ methods.

◆ _patch_original_class()

attr._make._ClassBuilder._patch_original_class (   self)
protected
Apply accumulated methods and return the class.

◆ build_class()

attr._make._ClassBuilder.build_class (   self)
Finalize class based on the accumulated configuration.

Builder cannot be used after calling this method.

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