Example #1
0
void* HashTable::Get(char *key) const {
	HashTable::Obj *o = Get0(key);
	if (o != NULL) {
		return o->val;
	}
	return NULL;
}
Example #2
0
void DockCont::TabSelected()
{
	int ix = tabbar.GetCursor();
	if (ix >= 0) {
		DockableCtrl *dc = Get0(ix);
		if (!dc) return;
		Ctrl *ctrl = GetCtrl(ix);
		Ctrl *first = &handle;

		for (Ctrl *c = first->GetNext(); c; c = c->GetNext())
			if (c != ctrl) c->Hide();
		ctrl->Show();
		Icon(dc->GetIcon()).Title(dc->GetTitle());

		handle.dc = dc;
		SyncButtons(*dc);

		if (IsTabbed()) {
			DockCont *c = static_cast<DockCont *>(GetParent());
			c->tabbar.SyncRepos();
			c->TabSelected();
			c->RefreshFrame();
		}
		else
			RefreshLayout();
	}
}
Example #3
0
 void Evaluate()
 {
     GetValueInternal() =
         (float)(
               ((DWORD)Get0()->GetValue())
             ^ ((DWORD)Get1()->GetValue())
         );
 }
Example #4
0
            void ThreadLocal::OnThreadDetach()
            {
                if (winTlsIdx != TLS_OUT_OF_INDEXES)
                {
                    void* mapPtr = Get0();

                    Clear0(mapPtr);
                }
            }
Example #5
0
void HashTable::Set(char *key, void *val) {
	HashTable::Obj *o = Get0(key);
	if (o == NULL) {
		// new entry
		int k = coco_string_hash(key) % size;
		o = new Obj();
		o->key = key;
		o->val = val;
		o->next = data[k];
		data[k] = o;		
	} else {
		// exist entry - overwrite
		o->val = val;
	}
}
Example #6
0
 void Evaluate()
 {
     GetValueInternal() = !(Get0()->GetValue());
 }
Example #7
0
 void Evaluate()
 {
     GetValueInternal() =
            Get0()->GetValue()
         || Get1()->GetValue();
 }
Example #8
0
 void Evaluate()
 {
     GetValueInternal() = max(Get0()->GetValue(), Get1()->GetValue());
 }