when declared in a State, the state will add itself and the declared name for this CArray as properties to the CEntity object.
558608
function CEntity(indexes, properties, states) {
  CArray.call(this, indexes, properties);
  this.states = {} || states;
  this.uid = 0;
}
279417
def _initilize(self, state: State) -> State:
        """"""

        targets = {}
        for pc, instr in enumerate(self):
            if isinstance(instr, Label):
                targets[instr.target] = pc

        state = state.update({PC: 0,
                              TARGETS: targets,
                              NAMEDGATES: STDGATES.copy()})
        return state
434809
def add_state(self, state, storage_load=False):
        
        state_id = super(BarrierConcurrencyState, self).add_state(state)
        if not storage_load and not self.__init_running and not state.state_id == UNIQUE_DECIDER_STATE_ID:
            # the transitions must only be created for the initial add_state call and not during each load procedure
            for o_id, o in list(state.outcomes.items()):
                if not o_id == -1 and not o_id == -2:
                    self.add_transition(state.state_id, o_id, self.states[UNIQUE_DECIDER_STATE_ID].state_id, None)
        return state_id
1289294
function(name) {
        if (!this._states.hasOwnProperty(name))
          throw new Error('unknown state "'+name+'"')

        var extraArgs = _.toArray(arguments).slice(1)
        this.currentState = name
        this._callCallbacks(this._states[name].enter, extraArgs)
      }
1012810
def add_object(self, obj):
        ''''''
        state = self.state
        if not obj.layer in state.layers:
            # its a new layer
            state.layers[obj.layer] = {}
        state.layers[obj.layer][obj.key] = obj
        state.need_redraw = True
59933
public AcceptableUsagePolicyStatus addProperty(final String name, final Object value) {
        this.properties.put(name, value);
        return this;
    }
219287
void appendProperty( @Nonnull String name, @Nonnull Expression value ) {
        if( output == null ) {
            throw new LessException( "Properties must be inside selector blocks, they cannot be in the root." );
        }
        insets();
        name = SelectorUtils.replacePlaceHolder( this, name, value );
        output.append( name ).append( ':' );
        space();
        value.appendTo( this );
        if( state.importantCount > 0 || value.isImportant() ) {
            output.append( " !important" );
        }
        semicolon();
        newline();
    }
259658
private void addPropertyStateExtractMethod() {
        MethodInfo mi = mClassFile.addMethod(Modifiers.PRIVATE, PROPERTY_STATE_EXTRACT_METHOD_NAME,
                                             TypeDesc.INT, new TypeDesc[] {TypeDesc.STRING});

        addPropertySwitch(new CodeBuilder(mi), SWITCH_FOR_STATE);
    }
365106
public void markInitialState() {

        if (!attachedObjects.isEmpty()) {
            for (T t : attachedObjects) {
                if (t instanceof PartialStateHolder) {
                    ((PartialStateHolder) t).markInitialState();
                }
            }
        }
        initialState = true;

    }
1292130
def addSenderKeyState(self, id, iteration, chainKey, signatureKey):
        
        self.senderKeyStates.append(SenderKeyState(id, iteration, chainKey, signatureKey))
1212406
function init ( cb ) {
    if (my.args.length > 0) {
      console.log('ignoring extra arguments')
    }
    stats(process.cwd(), 'isDirectory', function (err, currentbin) {
      if (err) return cb(err)
      var newbin = currentbin.name
      if (my.state.bins.hasOwnProperty(newbin)) {
        return cb( erf( 'A bin with name ' + path.basename(newbin)
                        + ' has already been initialized') )
      }
      my.state.bins = setActiveBin(my.state.bins, newbin)
      cb(null, my.state)

    })
  }
633422
protected function addCountryState()
    {
        $this->controlAccess('state_add');

        if ($this->state->add($this->getSubmitted())) {
            $url = "admin/settings/states/{$this->data_country['code']}";
            $this->redirect($url, $this->text('Country state has been added'), 'success');
        }

        $this->redirect('', $this->text('Country state has not been added'), 'warning');
    }
251617
public void addState(CmsPublishItemStatus.State state) {

        switch (state) {
            case normal:
                m_normalCount += 1;
                break;
            case publish:
                m_publishCount += 1;
                break;
            case remove:
            default:
                m_removeCount += 1;
                break;
        }
    }
911655
function(state) {
            if (state == this.state) return;

            this.state = state;
            logging.log("state ", this.state);
            this.trigger("state", this.state);
        }
77820
def PushState(self, **unused_kwargs):
    """"""
    logging.debug('Storing state {0:s}'.format(repr(self.state)))
    self.state_stack.append(self.state)
23589
def add_states(new_states)
      new_states.map do |new_state|
        # Check for other states that use a different class type for their name.
        # This typically prevents string / symbol misuse.
        if new_state && conflict = states.detect { |state| state.name && state.name.class != new_state.class }
          raise ArgumentError, "#{new_state.inspect} state defined as #{new_state.class}, #{conflict.name.inspect} defined as #{conflict.name.class}; all states must be consistent"
        end

        unless state = states[new_state]
          states << state = State.new(self, new_state)

          # Copy states over to sibling machines
          sibling_machines.each { |machine| machine.states << state }
        end

        state
      end
    end
1045598
public void addState() {
        DiffHistoryDataState nextState = new DiffHistoryDataState(stateEngine, typeDiffInstructions);

        if(currentDataState != null)
            newHistoricalState(currentDataState, nextState);

        currentDataState = nextState;
    }