本文整理汇总了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();
}
示例2: PrefsPanel
SpectrumPrefs::SpectrumPrefs(wxWindow * parent):
PrefsPanel(parent)
{
SetLabel(_("Spectrograms")); // Provide visual label
SetName(_("Spectrograms")); // Provide audible label
Populate( );
}
示例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);
}
}
示例4: PrefsPanel
ProjectsPrefs::ProjectsPrefs(wxWindow * parent, wxWindowID winid)
: PrefsPanel(parent, winid,
/* i18n-hint: (noun) i.e Audacity projects. */
_("Projects"))
{
Populate();
}
示例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;
}
示例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();
}
示例7: Populate
void rvInstance::Restart( void ) {
if ( gameLocal.isMultiplayer ) {
Populate();
} else {
gameLocal.SpawnMapEntities();
}
}
示例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;
}
}
示例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");
}
示例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();
}
示例11: mName
Sector::Sector()
: mName(), mWorld(nullptr)
{
AddExternalSignature("name", 1, &mName);
CreateTableDatum("entities");
Populate();
}
示例12: FetchFromSpans
void* CentralFreeList::FetchFromSpansSafe() {
void *t = FetchFromSpans();
if (!t) {
Populate();
t = FetchFromSpans();
}
return t;
}
示例13: RowGetFocused
void CSimpleReport::RowDelete()
{
int idx = RowGetFocused();
GetRecords()->RemoveAt(idx);
Populate();
SetFocusedRow(GetRows()->GetAt(idx));
SetFocus();
}
示例14: PrefsPanel
SmartRecordPrefs::SmartRecordPrefs(wxWindow * parent) :
PrefsPanel(parent)
{
SetLabel(_("Smart Recording")); // Provide visual label
SetName(_("Smart Recording")); // Provide audible label
Populate();
}
示例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);
}