本文整理匯總了C++中GetValueInternal函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetValueInternal函數的具體用法?C++ GetValueInternal怎麽用?C++ GetValueInternal使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetValueInternal函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: Evaluate
void Evaluate()
{
GetValueInternal() =
(float)(
((DWORD)Get0()->GetValue())
^ ((DWORD)Get1()->GetValue())
);
}
示例2: GetValueInternal
bool
HTMLTextAreaElement::IsValueEmpty() const
{
nsAutoString value;
GetValueInternal(value, true);
return value.IsEmpty();
}
示例3: GetValueInternal
void HTMLTextAreaElement::GetValue(nsAString& aValue) {
nsAutoString value;
GetValueInternal(value, true);
// Normalize CRLF and CR to LF
nsContentUtils::PlatformToDOMLineBreaks(value);
aValue = value;
}
示例4: Evaluate
void Evaluate()
{
float frame = GetFrame()->GetValue();
int count = m_keys.GetCount();
if (frame <= m_keys[0].m_frame) {
//
// Before first key
//
// , add a SetRotate(const Quaternion&) to Matrix
Vector vec;
float angle = m_keys[0].m_quat.GetRotation(vec);
GetValueInternal().SetRotate(vec, angle);
} else if (frame >= m_keys[count - 1].m_frame) {
//
// After last key
//
Vector vec;
float angle = m_keys[count - 1].m_quat.GetRotation(vec);
GetValueInternal().SetRotate(vec, angle);
} else {
//
// Between two keys
//
int index = 0;
while (frame > m_keys[index + 1].m_frame) {
index++;
}
float interpolant = (frame - m_keys[index].m_frame) / (m_keys[index + 1].m_frame - m_keys[index].m_frame);
Quaternion quat = Slerp(m_keys[index].m_quat, m_keys[index + 1].m_quat, interpolant);
Vector vec;
float angle = quat.GetRotation(vec);
GetValueInternal().SetRotate(vec, angle);
}
}
示例5: GetValueInternal
NS_IMETHODIMP
HTMLTextAreaElement::SetValue(const nsAString& aValue)
{
// If the value has been set by a script, we basically want to keep the
// current change event state. If the element is ready to fire a change
// event, we should keep it that way. Otherwise, we should make sure the
// element will not fire any event because of the script interaction.
//
// NOTE: this is currently quite expensive work (too much string
// manipulation). We should probably optimize that.
nsAutoString currentValue;
GetValueInternal(currentValue, true);
SetValueInternal(aValue, false);
if (mFocusedValue.Equals(currentValue)) {
GetValueInternal(mFocusedValue, true);
}
return NS_OK;
}
示例6: GetValueInternal
QVariant QtPropertyData::GetValue()
{
QVariant value = GetValueInternal();
if(value != curValue)
{
curValue = value;
ChildNeedUpdate();
}
return curValue;
}
示例7: NS_ENSURE_SUCCESS
nsresult
HTMLTextAreaElement::CopyInnerTo(Element* aDest)
{
nsresult rv = nsGenericHTMLFormElementWithState::CopyInnerTo(aDest);
NS_ENSURE_SUCCESS(rv, rv);
if (aDest->OwnerDoc()->IsStaticDocument()) {
nsAutoString value;
GetValueInternal(value, true);
static_cast<HTMLTextAreaElement*>(aDest)->SetValue(value);
}
return NS_OK;
}
示例8: GetPrimaryPresState
NS_IMETHODIMP
HTMLTextAreaElement::SaveState()
{
nsresult rv = NS_OK;
// Only save if value != defaultValue (bug 62713)
nsPresState *state = nullptr;
if (mValueChanged) {
state = GetPrimaryPresState();
if (state) {
nsAutoString value;
GetValueInternal(value, true);
rv = nsLinebreakConverter::ConvertStringLineBreaks(
value,
nsLinebreakConverter::eLinebreakPlatform,
nsLinebreakConverter::eLinebreakContent);
if (NS_FAILED(rv)) {
NS_ERROR("Converting linebreaks failed!");
return rv;
}
nsCOMPtr<nsISupportsString> pState =
do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
if (!pState) {
return NS_ERROR_OUT_OF_MEMORY;
}
pState->SetData(value);
state->SetStateProperty(pState);
}
}
if (mDisabledChanged) {
if (!state) {
state = GetPrimaryPresState();
rv = NS_OK;
}
if (state) {
// We do not want to save the real disabled state but the disabled
// attribute.
state->SetDisabled(HasAttr(kNameSpaceID_None, nsGkAtoms::disabled));
}
}
return rv;
}
示例9: ArgumentNullException
Value FieldInfoImpl::GetValue(const Value& thisObject)
{
if(thisObject.IsNull())
{
throw ArgumentNullException(L"thisObject", this);
}
else
{
auto td = thisObject.GetTypeDescriptor();
auto valueType = td->GetValueSerializer() ? Value::Text : Value::RawPtr;
if(!thisObject.CanConvertTo(ownerTypeDescriptor, valueType))
{
throw ArgumentTypeMismtatchException(L"thisObject", ownerTypeDescriptor, valueType, thisObject);
}
}
return GetValueInternal(thisObject);
}
示例10: GetPrimaryPresState
NS_IMETHODIMP
nsHTMLTextAreaElement::SaveState()
{
nsresult rv = NS_OK;
// Only save if value != defaultValue (bug 62713)
nsPresState *state = nsnull;
if (mValueChanged) {
rv = GetPrimaryPresState(this, &state);
if (state) {
nsAutoString value;
GetValueInternal(value, PR_TRUE);
rv = nsLinebreakConverter::ConvertStringLineBreaks(
value,
nsLinebreakConverter::eLinebreakPlatform,
nsLinebreakConverter::eLinebreakContent);
NS_ASSERTION(NS_SUCCEEDED(rv), "Converting linebreaks failed!");
nsCOMPtr<nsISupportsString> pState
(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
if (!pState) {
return NS_ERROR_OUT_OF_MEMORY;
}
pState->SetData(value);
state->SetStateProperty(pState);
}
}
if (mDisabledChanged) {
if (!state) {
rv = GetPrimaryPresState(this, &state);
}
if (state) {
PRBool disabled;
GetDisabled(&disabled);
state->SetDisabled(disabled);
}
}
return rv;
}
示例11: curVariantValue
QtPropertyDataDavaVariant::QtPropertyDataDavaVariant(const DAVA::VariantType &value)
: curVariantValue(value)
{
// set special flags
switch(curVariantValue.type)
{
case DAVA::VariantType::TYPE_BOOLEAN:
SetFlags(FLAG_IS_CHECKABLE | FLAG_IS_NOT_EDITABLE);
break;
case DAVA::VariantType::TYPE_KEYED_ARCHIVE:
case DAVA::VariantType::TYPE_BYTE_ARRAY:
SetFlags(FLAG_IS_DISABLED);
break;
case DAVA::VariantType::TYPE_MATRIX2:
case DAVA::VariantType::TYPE_MATRIX3:
case DAVA::VariantType::TYPE_MATRIX4:
case DAVA::VariantType::TYPE_AABBOX3:
SetFlags(FLAG_IS_NOT_EDITABLE);
break;
case DAVA::VariantType::TYPE_FLOAT:
case DAVA::VariantType::TYPE_INT32:
case DAVA::VariantType::TYPE_INT64:
case DAVA::VariantType::TYPE_UINT32:
case DAVA::VariantType::TYPE_UINT64:
case DAVA::VariantType::TYPE_STRING:
case DAVA::VariantType::TYPE_VECTOR2:
case DAVA::VariantType::TYPE_VECTOR3:
case DAVA::VariantType::TYPE_VECTOR4:
case DAVA::VariantType::TYPE_COLOR:
case DAVA::VariantType::TYPE_FASTNAME:
default:
break;
}
ChildsCreate();
// ensure data is fully initialized (icons set)
GetValueInternal();
}
示例12: GetPrimaryPresState
NS_IMETHODIMP
HTMLTextAreaElement::SaveState() {
nsresult rv = NS_OK;
// Only save if value != defaultValue (bug 62713)
PresState* state = nullptr;
if (mValueChanged) {
state = GetPrimaryPresState();
if (state) {
nsAutoString value;
GetValueInternal(value, true);
rv = nsLinebreakConverter::ConvertStringLineBreaks(
value, nsLinebreakConverter::eLinebreakPlatform,
nsLinebreakConverter::eLinebreakContent);
if (NS_FAILED(rv)) {
NS_ERROR("Converting linebreaks failed!");
return rv;
}
state->contentData() = std::move(value);
}
}
if (mDisabledChanged) {
if (!state) {
state = GetPrimaryPresState();
rv = NS_OK;
}
if (state) {
// We do not want to save the real disabled state but the disabled
// attribute.
state->disabled() = HasAttr(kNameSpaceID_None, nsGkAtoms::disabled);
state->disabledSet() = true;
}
}
return rv;
}
示例13: GetValueInternal
void QtPropertyData::BuildCurrentValue()
{
// Build value
const QVariant master = GetValueInternal();
bool isAllEqual = true;
isValuesMerged = false;
for ( int i = 0; i < mergedData.size(); i++ )
{
QtPropertyData *item = mergedData.at(i);
const QVariant slave = item->GetValue();
if (master != slave)
{
isAllEqual = false;
break;
}
}
curValue = isAllEqual ? master : QVariant();
isValuesMerged = isAllEqual;
// Update Qt MVC properties
if ( !isAllEqual )
{
QList<int> roles;
roles << Qt::DecorationRole;
for ( int iRole = 0; iRole < roles.size(); iRole++ )
{
const int role = roles.at(iRole);
auto it = style.find( role );
if ( it != style.end() )
{
*it = QVariant();
}
}
}
}
示例14: GetDisabled
NS_IMETHODIMP
nsHTMLTextAreaElement::SubmitNamesValues(nsIFormSubmission* aFormSubmission,
nsIContent* aSubmitElement)
{
nsresult rv = NS_OK;
//
// Disabled elements don't submit
//
PRBool disabled;
rv = GetDisabled(&disabled);
if (NS_FAILED(rv) || disabled) {
return rv;
}
//
// Get the name (if no name, no submit)
//
nsAutoString name;
if (!GetAttr(kNameSpaceID_None, nsGkAtoms::name, name)) {
return NS_OK;
}
//
// Get the value
//
nsAutoString value;
GetValueInternal(value, PR_FALSE);
//
// Submit
//
rv = aFormSubmission->AddNameValuePair(this, name, value);
return rv;
}
示例15: GetValueInternal
void TranslateTransform2::Evaluate()
{
GetValueInternal().SetTranslate(GetTranslate()->GetValue());
}