本文整理汇总了C++中FormControlState::append方法的典型用法代码示例。如果您正苦于以下问题:C++ FormControlState::append方法的具体用法?C++ FormControlState::append怎么用?C++ FormControlState::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormControlState
的用法示例。
在下文中一共展示了FormControlState::append方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveFormControlState
FormControlState DateTimeFieldsState::saveFormControlState() const
{
FormControlState state;
state.append(hasYear() ? String::number(m_year) : emptyString());
state.append(hasMonth() ? String::number(m_month) : emptyString());
state.append(hasDayOfMonth() ? String::number(m_dayOfMonth) : emptyString());
state.append(hasHour() ? String::number(m_hour) : emptyString());
state.append(hasMinute() ? String::number(m_minute) : emptyString());
state.append(hasSecond() ? String::number(m_second) : emptyString());
state.append(hasMillisecond() ? String::number(m_millisecond) : emptyString());
state.append(hasWeekOfYear() ? String::number(m_weekOfYear) : emptyString());
if (hasAMPM())
state.append(m_ampm == AMPMValueAM ? "A" : "P");
else
state.append(emptyString());
return state;
}
示例2: deserialize
FormControlState FormControlState::deserialize(const Vector<String>& stateVector, size_t& index)
{
if (index >= stateVector.size())
return FormControlState(TypeFailure);
size_t valueSize = stateVector[index++].toUInt();
if (!valueSize)
return FormControlState();
if (index + valueSize > stateVector.size())
return FormControlState(TypeFailure);
FormControlState state;
state.m_values.reserveCapacity(valueSize);
for (size_t i = 0; i < valueSize; ++i)
state.append(stateVector[index++]);
return state;
}