Registers a condition set with the manager.

        >>> condition_set = MyConditionSet() #doctest: +SKIP
        >>> operator.register(condition_set) #doctest: +SKIP
424336
def register(self, condition_set):
        

        if callable(condition_set):
            condition_set = condition_set()
        registry[condition_set.get_id()] = condition_set
        registry_by_namespace[condition_set.get_namespace()] = condition_set
741638
def iter_conditions(condition):
    """"""
    conditions = list()
    visited = set()
    # Has to be split out, since we don't want to visit the root (for cyclic conditions)
    # but we don't want to yield it (if it's non-cyclic) because this only yields inner conditions
    if condition.operation in {"and", "or"}:
        conditions.extend(reversed(condition.values))
    elif condition.operation == "not":
        conditions.append(condition.values[0])
    else:
        conditions.append(condition)
    while conditions:
        condition = conditions.pop()
        if condition in visited:
            continue
        visited.add(condition)
        yield condition
        if condition.operation in {"and", "or", "not"}:
            conditions.extend(reversed(condition.values))
122889
def register(self, name, fun, description=None):
        
        self.methods[name] = fun
        self.descriptions[name] = description
201248
def register_condition(self, *args, **kwds):
    
    if len(args) == 1 and len(kwds) == 0 and callable(args[0]):
      return self._add_condition(args[0])
    else:
      return partial(self._add_condition, *args, **kwds)
187530
def register_all(module, exclude=[], AdminClass=admin.ModelAdmin):
    
    member_names = dir(module)

    for member_name in member_names:
        obj = getattr(module, member_name, None)
        if isinstance(obj, ModelBase) \
            and obj not in exclude \
            and not obj._meta.abstract:
            try:
                if hasattr(obj, 'localized_fields'):
                    admin.site.register(obj, L10n(obj, AdminClass))
                else:
                    admin.site.register(obj, AdminClass)
            except AlreadyRegistered:
                pass
189698
public void addCondition(final Condition condition) {
        if (conditions_ == null) {
            conditions_ = new ArrayList<>();
        }
        conditions_.add(condition);
    }
1367853
private Set<IWatchedCondition> copyConditions() {
        Set<IWatchedCondition> copiedConditions = null;
        // Copy the current Conditions ...
        synchronized (conditions) {

            Set<IObjectReference<IWatchedCondition>> copiedObjref = new HashSet<IObjectReference<IWatchedCondition>>(this.conditions);
            copiedConditions = new HashSet<IWatchedCondition>(this.conditions.size());

            this.conditions.clear();
            IWatchedCondition cond = null;
            for (Iterator<IObjectReference<IWatchedCondition>> iterator = copiedObjref.iterator(); iterator.hasNext(); ) {
                IObjectReference<IWatchedCondition> objRef =  iterator.next();
                cond = objRef.get();
                if (!objRef.isStale() && cond != null && !cond.isUseless()) {
                    copiedConditions.add(cond);
                    this.conditions.add(objRef);
                }
            }

        }

        return copiedConditions;
    }
358040
def set_condition(self, conkey, val):
        

        if not any([conkey.startswith(c) for c in _COND_PREFIXES]):
            raise KeyError(conkey)

        if val in NONES:
            self.conditions[conkey] = None
        else:
            self.conditions[conkey] = str(val)
1072607
def register_action(self, action):
        
        assert action.value not in self.actions
        self.actions[action.value] = action
816082
def <<( reg )
      raise "not reg #{reg}" unless reg.is_a?(RegisterValue)
      reg_to_slot = Risc.reg_to_slot("#{reg.class_name} -> #{register.class_name}[#{index}]" , reg , register, index)
      builder.add_code(reg_to_slot) if builder
      reg_to_slot
    end
786898
def register_options(cls, register):
    
    super(RunJvmPrepCommandBase, cls).register_options(register)
    JvmPrepCommand.add_goal(cls.goal)
1044160
def condition(*args, **kwds):
  
  if len(args) == 1 and len(kwds) == 0 and callable(args[0]):
    # used as `@decorator`
    func = args[0]
    return wraps(func)(FontBakeryCondition(func))
  else:
    # used as `@decorator()` maybe with args
    def wrapper(func):
      return wraps(func)(FontBakeryCondition(func, *args, **kwds))
  return wrapper
648929
def register(cls, config={}):
        
        if cls.accessor is not None:
            if cls.instance is None:
                cls.instance = cls.accessor(config)
1003853
def register_action(*args, **kwarg):
    '''
    
    '''
    def decorator(fun):
        KeywordArgumentParser._action_dict[frozenset(args)] = fun
        return fun
    return decorator
1014662
def register_rules(self, rules):
    
    if not isinstance(rules, Iterable):
      raise TypeError('The rules must be an iterable, given {!r}'.format(rules))

    # "Index" the rules to normalize them and expand their dependencies.
    normalized_rules = RuleIndex.create(rules).normalized_rules()
    indexed_rules = normalized_rules.rules
    union_rules = normalized_rules.union_rules

    # Store the rules and record their dependency Optionables.
    self._rules.update(indexed_rules)
    self._union_rules.update(union_rules)
    dependency_optionables = {do
                              for rule in indexed_rules
                              for do in rule.dependency_optionables
                              if rule.dependency_optionables}
    self.register_optionables(dependency_optionables)
428843
def unregister(self, condition_set):
        
        if callable(condition_set):
            condition_set = condition_set()
        registry.pop(condition_set.get_id(), None)
        registry_by_namespace.pop(condition_set.get_namespace(), None)
640733
public function addCondition(ICondition $condition)
    {
        if (!isset($this->conditions)) {
            $this->conditions = [];
        }

        $this->conditions[] = $condition;
    }