Esempio n. 1
0
void AVLIndex::OnDynamicUpdate() 
{
    if(m_index)
    {
            FillInfo();
            m_index->Add(this);
    }
}
Esempio n. 2
0
GUI_GenericWidget:: ~GUI_GenericWidget()
{
	if ( FreeProc ) {
		widget_info info;

		FillInfo(&info);
		FreeProc(&info);
	}
}
Esempio n. 3
0
void AVLIndex::Process(const Message* message, Observable* from, const Message* additionalInfo)
{
    switch(message->GetType())
    {
        case M_NW2_INDEX_DETAILS:
        FillInfo();
        break;
    }
}
Esempio n. 4
0
void
GUI_GenericWidget:: Display(void)
{
	if ( DrawProc ) {
		widget_info info;

		FillInfo(&info);
		DrawProc(&info);
	}
}
Esempio n. 5
0
void CProjectile::Snap(int SnappingClient)
{
	float Ct = (Server()->Tick()-m_StartTick)/(float)Server()->TickSpeed();
	
	if(NetworkClipped(SnappingClient, GetPos(Ct)))
		return;

	CNetObj_Projectile *pProj = static_cast<CNetObj_Projectile *>(Server()->SnapNewItem(NETOBJTYPE_PROJECTILE, m_Id, sizeof(CNetObj_Projectile)));
	FillInfo(pProj);
}
IRCInfo IRCArgumentParser::GetInfo()
{
    // parse info once and cache it
    if (!_is_parsed)
    {
        FillInfo();
        _is_parsed = true;
    }

    return _info;
}
GlobalWorkbookInfo::GlobalWorkbookInfo(const unsigned short code_page, XlsConverter * xls_converter_)
:	CodePage(code_page)
{
	fill_x_ids[FillInfo(0, 0, 0)]		= 0;
	fill_x_ids[FillInfo(17, 64, 65)]	= 1;
	
	last_AXES_id			= initial_AXES_id;

	Version					= 0x0600; 

	xls_converter			= xls_converter_;

	startAddedSharedStrings = 0;
	current_sheet			= 0;
	cmt_rules				= 0;

	cellXfs_count			= 0;
	cellStyleXfs_count		= 0;
	cellStyleDxfs_count		= 0;

	defaultDigitFontSize = std::pair<float, float>(0, 0);
	applicationFonts		= NULL;
}
Esempio n. 8
0
void CHostManager::UpdateHostInfo(const BroadCastFtpInfo &info)
{
	TLock(m_locker);
	j_string_t strHostId = info.host_id;
	HostMap::iterator it = m_hostMap.find(strHostId);
	if (it == m_hostMap.end())
	{
		DownLoadFtpInfo mInfo = {0};
		FillInfo(info, mInfo);
		m_hostMap[strHostId] = mInfo;
	}
	else
	{
		UpdateInfo(it->second);
	}
	TUnlock(m_locker);
}
Esempio n. 9
0
void CProjectile::Snap(int SnappingClient)
{
	float Ct = (Server()->Tick()-m_StartTick)/(float)Server()->TickSpeed();

	if(NetworkClipped(SnappingClient, GetPos(Ct)))
		return;

	CCharacter* pSnapChar = GameServer()->GetPlayerChar(SnappingClient);
	int Tick = (Server()->Tick()%Server()->TickSpeed())%((m_Explosive)?6:20);
	if (pSnapChar && pSnapChar->IsAlive() && (m_Layer == LAYER_SWITCH && !GameServer()->Collision()->m_pSwitchers[m_Number].m_Status[pSnapChar->Team()] && (!Tick)))
		return;

	if(pSnapChar && m_Owner != -1 && !pSnapChar->CanCollide(m_Owner))
		return;

	CNetObj_Projectile *pProj = static_cast<CNetObj_Projectile *>(Server()->SnapNewItem(NETOBJTYPE_PROJECTILE, m_ID, sizeof(CNetObj_Projectile)));
	if(pProj)
		FillInfo(pProj);
}
Esempio n. 10
0
GUI_status
GUI_GenericWidget:: HandleEvent(const SDL_Event *event)
{
	GUI_status status;

	status = GUI_PASS;
	if ( EventProc ) {
		int handle_it;

		/* Mouse events outside the widget area are ignored */
		handle_it = 1;
		switch (event->type) {
			case SDL_MOUSEBUTTONDOWN:
			case SDL_MOUSEBUTTONUP: {
				int x, y;
				x = event->button.x;
				y = event->button.y;
				if ( ! HitRect(x, y) ) {
					handle_it = 0;
				}
			}
			break;
			case SDL_MOUSEMOTION: {
				int x, y;
				x = event->motion.x;
				y = event->motion.y;
				if ( ! HitRect(x, y) ) {
					handle_it = 0;
				}
			}
			break;
		}
		if ( handle_it ) {
			widget_info info;

			FillInfo(&info);
			status = EventProc(&info, event);
		}
	}
	return(status);
}
Esempio n. 11
0
bool
OpenFileFinder::Next(OpenFileFinder::Info* aInfo)
{
  // NOTE: This function calls readdir and readlink, neither of which should
  //       block since we're using the proc filesystem, which is a purely
  // kernel in-memory filesystem and doesn't depend on external driver
  // behaviour.
  while (mState != DONE) {
    switch (mState) {
      case NEXT_PID: {
        struct dirent *pidEntry;
        pidEntry = readdir(mProcDir);
        if (!pidEntry) {
          mState = DONE;
          break;
        }
        char *endPtr;
        mPid = strtol(pidEntry->d_name, &endPtr, 10);
        if (mPid == 0 || *endPtr != '\0') {
          // Not a +ve number - ignore
          continue;
        }
        // We've found a /proc/PID directory. Scan open file descriptors.
        if (mFdDir) {
          closedir(mFdDir);
        }
        nsPrintfCString fdDirPath("/proc/%d/fd", mPid);
        mFdDir = opendir(fdDirPath.get());
        if (!mFdDir) {
          continue;
        }
        mState = CHECK_FDS;
      }
      // Fall through
      case CHECK_FDS: {
        struct dirent *fdEntry;
        while((fdEntry = readdir(mFdDir))) {
          if (!strcmp(fdEntry->d_name, ".") ||
              !strcmp(fdEntry->d_name, "..")) {
            continue;
          }
          nsPrintfCString fdSymLink("/proc/%d/fd/%s", mPid, fdEntry->d_name);
          nsCString resolvedPath;
          if (ReadSymLink(fdSymLink, resolvedPath) && PathMatches(resolvedPath)) {
            // We found an open file contained within the directory tree passed
            // into the constructor.
            FillInfo(aInfo, resolvedPath);
            // If sCheckIsB2gOrDescendant is set false, the caller cares about
            // all processes which have open files. If sCheckIsB2gOrDescendant
            // is set false, we only care about the b2g proccess or its descendants.
            if (!mCheckIsB2gOrDescendant || aInfo->mIsB2gOrDescendant) {
              return true;
            }
            LOG("Ignore process(%d), not a b2g process or its descendant.",
                aInfo->mPid);
          }
        }
        // We've checked all of the files for this pid, move onto the next one.
        mState = NEXT_PID;
        continue;
      }
      case DONE:
      default:
        mState = DONE;  // covers the default case
        break;
    }
  }
  return false;
}