Add a Base (or sub-class) to the BaseRef by name.

        Args:
            name (str): The name/iden of the Base
            base (Base): The Base instance

        Returns:
            (None)
328968
def put(self, name, base):
        '''
        
        '''
        async def fini():
            if self.base_by_name.get(name) is base:
                self.base_by_name.pop(name, None)

        # Remove myself from BaseRef when I fini
        base.onfini(fini)
        self.base_by_name[name] = base
1236164
def add_field(self, name, default=None, required=False, error=None):
        
        if name is None:
            return
        self.field_arguments.append(dict(
            name=name,
            default=default,
            required=required,
            error=error))
1021160
def add_ref(self, name, ref):
        
        if self._name is None:
            self._name = name
        elif name != self._name:
            raise RuntimeError('Contexts can only share between backends of '
                               'the same type')
        self._refs.append(weakref.ref(ref))
411448
def name(self, name):
        
        from_name = self.name
        assert isinstance(name, str)
        self._name = name
        if self.has_parent():
            self._parent_._name_changed(self, from_name)
625540
def create_main_target (self, name):
        
        assert isinstance(name, basestring)
        if not self.built_main_targets_:
            self.build_main_targets ()

        return self.main_targets_.get (name, None)
852002
def _add_source(self, source):
        

        try:

            self._add_child(source)

        except AttributeError:

            if isinstance(source, Source):

                raise DuplicatedNode("More than one source with the name '%s'. You cannot use the same name for multiple "
                                     "sources" % source.name)

            else:  # pragma: no cover

                raise

        # Now see if this is a point or extended source, and add them to the
        # appropriate dictionary

        if source.source_type == POINT_SOURCE:

            self._point_sources[source.name] = source

        elif source.source_type == EXTENDED_SOURCE:

            self._extended_sources[source.name] = source

        elif source.source_type == PARTICLE_SOURCE:

            self._particle_sources[source.name] = source

        else:  # pragma: no cover

            raise InvalidInput("Input sources must be either a point source or an extended source")
909593
def add_field(self, name, data):
        
        if name in self._fields:
            raise ValueError
        if not len(data) == self._num_fix:
            raise ValueError
        self._fields.append(name)
        self.__dict__[name] = data
1028945
def expand(self, name=None, target=None, **kwargs):
    
    if name is None:
      raise TargetDefinitionException('{}:?'.format(self._parse_context.rel_path, name),
                                      'The alias() must have a name!')
    if target is None:
      raise TargetDefinitionException('{}:{}'.format(self._parse_context.rel_path, name),
                                      'The alias() must have a "target" parameter.')
    self._parse_context.create_object(
      AliasTarget,
      type_alias='alias',
      name=name,
      dependencies=[target] if target else [],
      **kwargs
    )
412154
public void addParam(String name, String value) {
        getParams().add(new BasicNameValuePair(name, value));
    }
1290526
def addObject(self, object, name=None):
    
    if name is None:
      name = len(self.objects)

    self.objects[name] = object
384541
def add(name, options={}, &block)
      options = options[:_defaults].(name, options) if options[:_defaults] # FIXME: pipeline?
      base    = options[:_base]

      if options.delete(:inherit) and parent_property = get(name)
        base    = parent_property[:nested]
        options = parent_property.merge(options) # TODO: Definition#merge
      end

      if options[:_nested_builder]
        options[:nested] = build_nested(
          options.merge(
            _base: base,
            _name: name,
            _block: block,
          )
        )
      end

      # clean up, we don't want that stored in the Definition instance.
      [:_defaults, :_base, :_nested_builder, :_features].each { |key| options.delete(key) }

      self[name.to_s] = @definition_class.new(name, options)
    end
1024476
def addHost(self, name=None):
        '''
        
        '''
        if name is None:
            while True:
                name = 'h' + str(self.__hnum)
                self.__hnum += 1
                if name not in self.__nxgraph:
                    break
        self.__addNode(name, Host)
        return name
532667
def add_parameter(self, name, value=None):
		
		if name not in self.__query:
			self.__query[name] = [value]
		else:
			self.__query[name].append(value)
467055
def addBaseType(self, item):
        '''
        
        '''
        ctor = '.'.join([item.__class__.__module__, item.__class__.__qualname__])
        self._modeldef['ctors'].append(((item.name, ctor, dict(item.opts), dict(item.info))))
        self.types[item.name] = item
643782
def add_host(self, name: str, **kwargs) -> None:
        
        host = {
            name: deserializer.inventory.InventoryElement.deserialize_host(
                name=name, defaults=self.defaults, **kwargs
            )
        }
        self.hosts.update(host)
933231
def add(cls, name, value):
        """"""
        attr = cls(value)
        attr._name = name
        setattr(cls, name, attr)
966592
def add(self, name, value):
        # type: (str, str) -> None
        """"""
        self._last_key = name
        if name in self:
            self._dict[name] = value
            self._as_list[name].append(value)
        else:
            self[name] = value