当前位置: 首页>>代码示例>>C++>>正文


C++ Populate函数代码示例

本文整理汇总了C++中Populate函数的典型用法代码示例。如果您正苦于以下问题:C++ Populate函数的具体用法?C++ Populate怎么用?C++ Populate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Populate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DXASSERT

void CDxMonthPicker::ScrollLeft(int nMonthCount)
{
    int nYear = m_dtFirstMonth.GetYear();
    int nMonth = m_dtFirstMonth.GetMonth();
    if (nYear < 100 || (nYear == 100 && nMonth <= 2))
        return;
    int nYearNew = nYear - nMonthCount / 12;
    int nMonthNew = nMonth - nMonthCount % 12;
    if (nMonthNew < 1)
    {
        nMonthNew += 12;
        nYearNew--;
    }
    DXASSERT(nMonthNew >= 1 && nMonthNew <= 12);

    if (m_dtMinRange.GetStatus() == COleDateTime::valid)
    {
        if (nYearNew < m_dtMinRange.GetYear())
        {
            nYearNew = m_dtMinRange.GetYear();
            nMonthNew = m_dtMinRange.GetMonth();
        }

        if (m_dtMinRange.GetYear() == nYearNew)
        {
            if (nMonthNew < m_dtMinRange.GetMonth())
                nMonthNew = m_dtMinRange.GetMonth();
        }
    }

    m_dtFirstMonth.SetDate(nYearNew, nMonthNew, 1);

    Populate();
}
开发者ID:Johnny-Martin,项目名称:ComBase,代码行数:34,代码来源:DxMonthPicker.cpp

示例2: PrefsPanel

SpectrumPrefs::SpectrumPrefs(wxWindow * parent):
   PrefsPanel(parent)
{
   SetLabel(_("Spectrograms"));         // Provide visual label
   SetName(_("Spectrograms"));          // Provide audible label
   Populate( );
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:7,代码来源:SpectrumPrefs.cpp

示例3: Populate

// Build tree top down, assigning to older objects.
static void Populate(int iDepth, Node thisNode) {
        if (iDepth<=0) {
                return;
        } else {
                iDepth--;
#		ifdef GC
                  thisNode->left  = GC_NEW(Node0); HOLE();
                  thisNode->right = GC_NEW(Node0); HOLE();
#		else
                  thisNode->left  = calloc(1, sizeof(Node0));
                  thisNode->right = calloc(1, sizeof(Node0));
#		endif
                Populate (iDepth, thisNode->left);
                Populate (iDepth, thisNode->right);
        }
}
开发者ID:GregorR,项目名称:ggggc,代码行数:17,代码来源:GCBench.c

示例4: PrefsPanel

ProjectsPrefs::ProjectsPrefs(wxWindow * parent, wxWindowID winid)
:   PrefsPanel(parent, winid,
   /* i18n-hint: (noun) i.e Audacity projects. */
               _("Projects"))
{
   Populate();
}
开发者ID:SteveDaulton,项目名称:audacity,代码行数:7,代码来源:ProjectsPrefs.cpp

示例5: HasLocalData

status_t
ServerIconExportUpdateProcess::RunInternal()
{
	status_t result = B_OK;

	if (NULL == fLocalIconStore || fLocalIconStoragePath.Path() == NULL)
		result = B_ERROR;

	if (IsSuccess(result) && HasOption(SERVER_PROCESS_DROP_CACHE)) {
		result = StorageUtils::RemoveDirectoryContents(fLocalIconStoragePath);
	}

	if (result == B_OK) {
		bool hasData;

		result = HasLocalData(&hasData);

		if (result == B_OK && ShouldAttemptNetworkDownload(hasData))
			result = _DownloadAndUnpack();

		if (IsSuccess(result)) {
			status_t hasDataResult = HasLocalData(&hasData);

			if (hasDataResult == B_OK && !hasData)
				result = HD_ERR_NO_DATA;
		}
	}

	if (IsSuccess(result) && !WasStopped())
		result = Populate();

	return result;
}
开发者ID:looncraz,项目名称:haiku,代码行数:33,代码来源:ServerIconExportUpdateProcess.cpp

示例6: REQUIRED

      /// <summary>Populates the library from the string library</summary>
      /// <param name="data">Feedback data</param>
      /// <returns>Number of objects found</returns>
      /// <exception cref="Logic::ArgumentNullException">Worker data is null</exception>
      /// <exception cref="Logic::InvalidOperationException">String library is empty</exception>
      UINT  ScriptObjectLibrary::Enumerate(WorkerData* data)
      {
         REQUIRED(data);

         // Ensure string library exists
         if (StringLib.Files.empty())
            throw InvalidOperationException(HERE, L"String library has not been enumerated");

         // Feedback
         data->SendFeedback(Cons::Heading, ProgressType::Operation, 1, L"Generating script objects from language files");

         // Populate
         Clear();
         Populate(data);

         // DEBUG:
         Console << "Discovered " << (int)Objects.size() << " script objects..." << ENDL;
         
         // Feedback number of conflicts
         if (Objects.size() - Lookup.size() > 1)   // Always 1 less in lookup because old [THIS] intentionally removed
            data->SendFeedback(Cons::Error, ProgressType::Error, 2, VString(L"Unable to process %d script objects", Objects.size()-Lookup.size()-1));
         
         // Feedback object count
         data->SendFeedback(ProgressType::Info, 2, VString(L"Loaded %d script objects", Lookup.size()));
         return Lookup.size();
      }
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:31,代码来源:ScriptObjectLibrary.cpp

示例7: Populate

void rvInstance::Restart( void ) {
	if ( gameLocal.isMultiplayer ) {
		Populate();
	} else {
		gameLocal.SpawnMapEntities();
	}
}
开发者ID:ET-NiK,项目名称:amxxgroup,代码行数:7,代码来源:Instance.cpp

示例8: Win32Exception

   /// <summary>Initializes the property grid.</summary>
   /// <returns></returns>
   BOOL PreferencesPage::OnInitDialog()
   {
      try
      {
         // Create base
	      if (!__super::OnInitDialog())
		      throw Win32Exception(HERE, L"Failed to create dialog base");

	      ClientRect wnd(this);

         // Create property grid
	      if (!Grid.Create(WS_VISIBLE | WS_CHILD, wnd, this, IDC_PROPERTY_GRID))
	         throw Win32Exception(HERE, L"Failed to create Properties Grid");

	      // Grid
         Grid.EnableHeaderCtrl(FALSE);
	      Grid.EnableDescriptionArea();
	      Grid.SetVSDotNetLook();
	      Grid.MarkModifiedProperties();

         // Adjust layout
         AdjustLayout();

         // Populate grid
         Populate();
	      return TRUE;
      }
      catch (ExceptionBase& e) {
         Console.Log(HERE, e);
         return FALSE;
      }
   }
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:34,代码来源:PreferencesPage.cpp

示例9: Entity

	/**
	*Class constructor that initializes all data members
	*
	*@param name = the name of this entity
	*@param playerNumber = the owner of this block (int, 1 or 2)
	*/
	BlockEntity::BlockEntity(std::string name, std::uint32_t player) : Entity(name), mPlayer(player), mX(0), mY(0), mW(32), mH(32), mRenderer(*TetrominoRender::GetInstance()), mOldX(0), mOldY(0), mCollider(mX, mY, mW, mH), lastDirection(), mState(0), mWasNotified(false)
	{
		InternalAttribute(State, 1, Datum::INTEGER, &mState);
		InternalAttribute(value, 4, Datum::DatumType::INTEGER, mValues);
		InternalAttribute(Player, 1, Datum::DatumType::INTEGER, &mPlayer);

		if (mPlayer == 1)
		{
			int num = p1LeftBound;
			InternalAttribute(LeftXBound, 1, Datum::DatumType::INTEGER, &num);
			int num2 = p1RightBound;
			InternalAttribute(RightXBound, 1, Datum::DatumType::INTEGER, &num2);
			int num3 = bottomBounds;
			InternalAttribute(BottomBound, 1, Datum::DatumType::INTEGER, &num3);
		}
		else
		{
			int num = p2LeftBound;
			InternalAttribute(LeftXBound, 1, Datum::DatumType::INTEGER, &num);

			int num2 = p2RightBound;
			InternalAttribute(RightXBound, 1, Datum::DatumType::INTEGER, &num2);
			int num3 = bottomBounds;
			InternalAttribute(BottomBound, 1, Datum::DatumType::INTEGER, &num3);
		}
		Event<EventMessageAttributed>::Subscribe(this);
		blocks.push_back(this);
		Populate();
		auto& colorDatum = (*this)["BlockColor"];
		colorDatum.SetType(Datum::DatumType::STRING);
		colorDatum = std::string("Green");
	}
开发者ID:CalWLee,项目名称:FIEATetris,代码行数:38,代码来源:BlockEntity.cpp

示例10: RGB

CDxMonthPicker::CDxMonthPicker()
{
    m_monthPicker = NULL;

    m_mouseMode = mouseNothing;
    m_nTimerID = 0;
    m_bSelectWeek = FALSE;

    m_clrControlBack = RGB(255,255,255);

    m_nFirstDayOfWeek = 2;
    m_nFirstWeekOfYearDays = 1;
    m_dtToday = COleDateTime::GetCurrentTime();
    m_dtFirstMonth.SetDate(m_dtToday.GetYear(), m_dtToday.GetMonth(), 1);
    m_dtMinRange.SetStatus(COleDateTime::null);
    m_dtMaxRange.SetStatus(COleDateTime::null);

    m_rcControl.SetRectEmpty();
    m_rcGrid.SetRectEmpty();

    m_btnToday = NULL;
    m_bYearsTriangle = TRUE;
    m_btnCaptured = NULL;

    AddButton();

    m_arMonthNames     = new CString[12];
    m_arDayOfWeekNames = new CString[7];

    InitNames();
    Populate();
}
开发者ID:Johnny-Martin,项目名称:ComBase,代码行数:32,代码来源:DxMonthPicker.cpp

示例11: mName

	Sector::Sector()
		: mName(), mWorld(nullptr)
	{
		AddExternalSignature("name", 1, &mName);
		CreateTableDatum("entities");
		Populate();
	}
开发者ID:m-hansen,项目名称:Data-Driven-Game-Engine,代码行数:7,代码来源:Sector.cpp

示例12: FetchFromSpans

void* CentralFreeList::FetchFromSpansSafe() {
  void *t = FetchFromSpans();
  if (!t) {
    Populate();
    t = FetchFromSpans();
  }
  return t;
}
开发者ID:3runo5ouza,项目名称:rhodes,代码行数:8,代码来源:central_freelist.cpp

示例13: RowGetFocused

void CSimpleReport::RowDelete()
{
	int idx = RowGetFocused();
	GetRecords()->RemoveAt(idx);
	Populate();
	SetFocusedRow(GetRows()->GetAt(idx));
	SetFocus();
}
开发者ID:tlogger,项目名称:TMon,代码行数:8,代码来源:SimpleReport.cpp

示例14: PrefsPanel

SmartRecordPrefs::SmartRecordPrefs(wxWindow * parent) :
   PrefsPanel(parent)
{
   SetLabel(_("Smart Recording"));         // Provide visual label
   SetName(_("Smart Recording"));          // Provide audible label
  
   Populate();
}
开发者ID:andreipaga,项目名称:audacity,代码行数:8,代码来源:SmartRecordPrefs.cpp

示例15: Populate

 BOOL Populate(int csidl = CSIDL_DESKTOP)
 {
     CPidl pidl;
     if( FAILED( ::SHGetSpecialFolderLocation(NULL, csidl, &pidl) ) ) return FALSE;
     CComPtr<IShellFolder> spDesktop;
     if( FAILED( ::SHGetDesktopFolder(&spDesktop) ) ) return FALSE;
     return Populate(spDesktop, pidl, csidl == CSIDL_DESKTOP ? NULL : (LPCITEMIDLIST)pidl);
 }
开发者ID:Beifeng,项目名称:qui,代码行数:8,代码来源:behavior_shellctrl.cpp


注:本文中的Populate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。