parameters: (self, cpp_obj, param_name, types)
docstring: Attach type parameter to a C++ object with per type data.
  
          Args:
              cpp_obj: A pybind11 wrapped C++ object to set and get the type
                  parameters from.
              param_name (str): A snake case parameter name (handled automatically
                  by ``TypeParameter``) that when changed to camel case prefixed
                  by get or set is the str name for the pybind11 exported getter
                  and setter.
              types (list[str]): The str names of the available types for the type
                  parameter.
docstring_summary: Attach type parameter to a C++ object with per type data.
docstring_tokens: Attach type parameter to a C ++ object with per type data .
function: def _attach(self, cpp_obj, param_name, types):
          """Attach type parameter to a C++ object with per type data.
  
          Args:
              cpp_obj: A pybind11 wrapped C++ object to set and get the type
                  parameters from.
              param_name (str): A snake case parameter name (handled automatically
                  by ``TypeParameter``) that when changed to camel case prefixed
                  by get or set is the str name for the pybind11 exported getter
                  and setter.
              types (list[str]): The str names of the available types for the type
                  parameter.
          """
          # store info to communicate with c++
          self._setter = "set" + _to_camel_case(param_name)
          self._getter = "get" + _to_camel_case(param_name)
          self._type_keys = self._compute_type_keys(types)
          # add all types to c++
          parameters = {
              key: _to_base(self._dict.get(key, self.default))
              for key in self._type_keys
          }
          self._cpp_obj = cpp_obj
          for key in self:
              try:
                  _raise_if_required_arg(parameters[key])
              except IncompleteSpecificationError as err:
                  self._cpp_obj = None
                  raise IncompleteSpecificationError(f"for key {key} {str(err)}")
              self._single_setitem(key, parameters[key])
function_tokens: def _attach ( self , cpp_obj , param_name , types ) : # store info to communicate with c++ self . _setter = "set" + _to_camel_case ( param_name ) self . _getter = "get" + _to_camel_case ( param_name ) self . _type_keys = self . _compute_type_keys ( types ) # add all types to c++ parameters = { key : _to_base ( self . _dict . get ( key , self . default ) ) for key in self . _type_keys } self . _cpp_obj = cpp_obj for key in self : try : _raise_if_required_arg ( parameters [ key ] ) except IncompleteSpecificationError as err : self . _cpp_obj = None raise IncompleteSpecificationError ( f"for key {key} {str(err)}" ) self . _single_setitem ( key , parameters [ key ] )