• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Populate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: QDialog

HouseholderListDialog::HouseholderListDialog(QWidget *parent) :	QDialog(parent), ui(new Ui::HouseholderListDialog), model(nullptr)
{
	ui->setupUi(this);
	connect(&client,SIGNAL(HouseholderListReturn(HouseholderList)),this,SLOT(Populate(HouseholderList)));
	connect(&client,SIGNAL(StatusMessage(QString)),this,SIGNAL(StatusMessage(QString)));
	connect(ui->tblHouseholders,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(VerifySelection(QModelIndex)));
	ui->tblHouseholders->setSelectionBehavior(QAbstractItemView::SelectRows);
}
开发者ID:herbmillerjr,项目名称:kst-desktop,代码行数:8,代码来源:householderlistdialog.cpp


示例17: PrefsPanel

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


示例18: PrefsPanel

QualityPrefs::QualityPrefs(wxWindow * parent):
   PrefsPanel(parent)
{
   SetLabel(_("Quality"));         // Provide visual label
   SetName(_("Quality"));          // Provide audible label
   mSampleRates = NULL;            // Pointers to controls.
   mOtherSampleRate = NULL;
   Populate( );
}
开发者ID:andreipaga,项目名称:audacity,代码行数:9,代码来源:QualityPrefs.cpp


示例19: VLC_OBJECT

/**
 * Interface Sub-Menu, to list extras interface and skins
 **/
QMenu *QVLCMenu::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
{
    vector<vlc_object_t *> objects;
    vector<const char *> varnames;
    varnames.push_back( "intf-add" );
    objects.push_back( VLC_OBJECT(p_intf) );

    return Populate( p_intf, current, varnames, objects );
}
开发者ID:Kafay,项目名称:vlc,代码行数:12,代码来源:menus.cpp


示例20: wxDialog

BatchCommandDialog::BatchCommandDialog(wxWindow * parent, wxWindowID id):
   wxDialog(parent, id, _("Select Command"),
            wxDefaultPosition, wxSize(250,200),
            wxDIALOG_MODAL | wxCAPTION | wxTHICK_FRAME)
{
   SetLabel(_("Select Command"));         // Provide visual label
   SetName(_("Select Command"));          // Provide audible label
   Populate();
}
开发者ID:andreipaga,项目名称:audacity,代码行数:9,代码来源:BatchCommandDialog.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PopulateNode函数代码示例发布时间:2022-05-30
下一篇:
C++ PopState函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap