本文整理汇总了C++中DateTime::FromString方法的典型用法代码示例。如果您正苦于以下问题:C++ DateTime::FromString方法的具体用法?C++ DateTime::FromString怎么用?C++ DateTime::FromString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateTime
的用法示例。
在下文中一共展示了DateTime::FromString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadFromNode
void HighScoreImpl::LoadFromNode( const XNode *pNode )
{
ASSERT( pNode->GetName() == "HighScore" );
RString s;
pNode->GetChildValue( "Name", sName );
pNode->GetChildValue( "Grade", s );
grade = StringToGrade( s );
pNode->GetChildValue( "Score", iScore );
pNode->GetChildValue( "PercentDP", fPercentDP );
pNode->GetChildValue( "SurviveSeconds", fSurviveSeconds );
pNode->GetChildValue( "MaxCombo", iMaxCombo );
pNode->GetChildValue( "StageAward", s ); stageAward = StringToStageAward(s);
pNode->GetChildValue( "PeakComboAward", s ); peakComboAward = StringToPeakComboAward(s);
pNode->GetChildValue( "Modifiers", sModifiers );
pNode->GetChildValue( "DateTime", s ); dateTime.FromString( s );
pNode->GetChildValue( "PlayerGuid", sPlayerGuid );
pNode->GetChildValue( "MachineGuid", sMachineGuid );
pNode->GetChildValue( "ProductID", iProductID );
const XNode* pTapNoteScores = pNode->GetChild( "TapNoteScores" );
if( pTapNoteScores )
FOREACH_ENUM( TapNoteScore, tns )
pTapNoteScores->GetChildValue( TapNoteScoreToString(tns), iTapNoteScores[tns] );
const XNode* pHoldNoteScores = pNode->GetChild( "HoldNoteScores" );
if( pHoldNoteScores )
FOREACH_ENUM( HoldNoteScore, hns )
pHoldNoteScores->GetChildValue( HoldNoteScoreToString(hns), iHoldNoteScores[hns] );
const XNode* pRadarValues = pNode->GetChild( "RadarValues" );
if( pRadarValues )
radarValues.LoadFromNode( pRadarValues );
pNode->GetChildValue( "LifeRemainingSeconds", fLifeRemainingSeconds );
pNode->GetChildValue( "Disqualified", bDisqualified);
// Validate input.
grade = clamp( grade, Grade_Tier01, Grade_Failed );
}
示例2: GetValue
void XAttr::GetValue(DateTime &out) const { out.FromString( m_sValue ); }
示例3: GetValue
void XNode::GetValue(DateTime &out) const { out.FromString( value ); }