Beispiel #1
0
CNumFmt& CNumFmt::operator = (const CNumFmt& rvalue)
{
rvalue.Link();
UnLink();
base::operator = ( rvalue );
m_numfmts = rvalue.m_numfmts;
return *this;
}
Beispiel #2
0
	void TimerManager::CleanRemove()
	{
		for(size_t i = 0; i <m_remove.size(); ++i)
		{
			UnLink(m_remove[i]);
			if(m_remove[i])
			{
				mem_free(m_remove[i]);
				m_remove[i] = NULL;
			}
		}
		m_remove.clear();
	}
Beispiel #3
0
void TimerManager::RemoveTimer(void* timer)
{
	if(timer == NULL)
		return;

	TimerNode* pNode = (TimerNode*)timer;

	UnLink(pNode);

	delete pNode;
	

}
Beispiel #4
0
//
//	Refill this link by the arguments
//
void KBoolLink::Reset(Node *begin, Node *end,int graphnr)
{
	// Remove all the previous references
	UnLink();
	Reset();
	// Set the references of the node and of this link correct
	begin->AddLink(this);
	end->AddLink(this);
	m_beginnode = begin;
	m_endnode = end;
	if (graphnr!=0)
		 m_graphnum = graphnr;
}
Beispiel #5
0
void C4AulScriptEngine::ReLink(C4DefList *rDefs)
{
	// unlink scripts
	UnLink();

	// unlink defs
	if (rDefs) rDefs->ResetIncludeDependencies();

	// re-link
	Link(rDefs);

	// display state
	LogF("C4AulScriptEngine linked - %d line%s, %d warning%s, %d error%s",
		lineCnt, (lineCnt != 1 ? "s" : ""), warnCnt, (warnCnt != 1 ? "s" : ""), errCnt, (errCnt != 1 ? "s" : ""));
}
Beispiel #6
0
void C4AulScriptEngine::ReLink(C4DefList *rDefs) {
  // unlink scripts
  UnLink();

  // unlink defs
  if (rDefs) rDefs->ResetIncludeDependencies();

  // clear string table
  Game.Script.UnLink();

  // re-link
  Link(rDefs);

  // update effect pointers
  Game.Objects.UpdateScriptPointers();

  // update material pointers
  Game.Material.UpdateScriptPointers();
}
Beispiel #7
0
	void TimerManager::Update()
	{
		
		CleanRemove();
		uint64 tick = m_pTime->Tick();

		TimerNode* pNode = m_head->next;


		std::vector<TimerNode*> l;

		while(pNode)
		{

			if((tick - pNode->start_tick) < pNode->interval)
			{
				break;
			}

			TimerNode* pTmp = pNode;

			pNode = pNode->next;


			pTmp->handler(pTmp, pTmp->interval);
			

			UnLink(pTmp);

			l.push_back(pTmp);

		}

		for(size_t i = 0; i <l.size(); ++i)
		{
			InsertNode(l[i]);
		}
		CleanRemove();
	}
Beispiel #8
0
void TimerManager::Update()
{
	int tick = GetTickCount();

	TimerNode* pNode = m_head->next;


	std::vector<TimerNode*> l;

	while(pNode)
	{

		if((tick - pNode->start_tick) < pNode->interval)
		{
			break;
		}

		TimerNode* pTmp = pNode;

		pNode = pNode->next;


		pTmp->handler(pTmp, pTmp->interval, pTmp->handler_context);
		

		UnLink(pTmp);

		l.push_back(pTmp);

	}

	for(size_t i = 0; i <l.size(); ++i)
	{
		InsertNode(l[i]);
	}

}
Beispiel #9
0
CNumFmt::~CNumFmt()
{
UnLink();
}
Beispiel #10
0
BaseInStream::~BaseInStream() {
	_canCallOutStreamDetached = false;
	while (_linkedStreams.size() > 0) {
		UnLink(MAP_VAL(_linkedStreams.begin()), true);
	}
}
Beispiel #11
0
//
// Destructor
//
KBoolLink::~KBoolLink()
{
	UnLink();
}
Beispiel #12
0
BaseOutStream::~BaseOutStream() {
	_canCallDetachedFromInStream = false;
	UnLink(true);
}
CLinkObject::~CLinkObject()
{
    UnLink();
}