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

C++ Modify函数代码示例

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

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



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

示例1: Modify

UEdGraphPin* UEdGraphNode::CreatePin(EEdGraphPinDirection Dir, const FEdGraphPinType& InPinType, const FString& PinName, int32 Index /*= INDEX_NONE*/)
{
	UEdGraphPin* NewPin = NewObject<UEdGraphPin>(this);
	NewPin->PinName = PinName;
	NewPin->Direction = Dir;

	NewPin->PinType = InPinType;

	NewPin->SetFlags(RF_Transactional);

	if (HasAnyFlags(RF_Transient))
	{
		NewPin->SetFlags(RF_Transient);
	}

	Modify(false);
	if (Pins.IsValidIndex(Index))
	{
		Pins.Insert(NewPin, Index);
	}
	else
	{
		Pins.Add(NewPin);
	}
	return NewPin;
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:26,代码来源:EdGraphNode.cpp


示例2: Modify

void UMovieSceneShotSection::SetShotNameAndNumber(const FText& InDisplayName, int32 InShotNumber)
{
	Modify();

	DisplayName = InDisplayName;
	ShotNumber = InShotNumber;
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:7,代码来源:MovieSceneShotSection.cpp


示例3: Modify

void UEdGraphPin::MakeLinkTo(UEdGraphPin* ToPin)
{
	Modify();

	if (ToPin != NULL)
	{
		ToPin->Modify();

		// Make sure we don't already link to it
		if (!LinkedTo.Contains(ToPin))
		{
			UEdGraphNode* MyNode = GetOwningNode();

			// Check that the other pin does not link to us
			ensureMsg(!ToPin->LinkedTo.Contains(this), *GetLinkInfoString( LOCTEXT("MakeLinkTo", "MakeLinkTo").ToString(), LOCTEXT("IsLinked", "is linked with pin").ToString(), ToPin));			    
			ensureMsg(MyNode->GetOuter() == ToPin->GetOwningNode()->GetOuter(), *GetLinkInfoString( LOCTEXT("MakeLinkTo", "MakeLinkTo").ToString(), LOCTEXT("OuterMismatch", "has a different outer than pin").ToString(), ToPin)); // Ensure both pins belong to the same graph

			// Add to both lists
			LinkedTo.Add(ToPin);
			ToPin->LinkedTo.Add(this);

			GraphPinHelpers::EnableAllConnectedNodes(MyNode);
			GraphPinHelpers::EnableAllConnectedNodes(ToPin->GetOwningNode());
		}
	}
}
开发者ID:johndpope,项目名称:UE4,代码行数:26,代码来源:EdGraphPin.cpp


示例4: Modify

bool UMovieScene::RemoveSpawnable( const FGuid& Guid )
{
	bool bAnythingRemoved = false;
	if( ensure( Guid.IsValid() ) )
	{
		for( auto SpawnableIter( Spawnables.CreateIterator() ); SpawnableIter; ++SpawnableIter )
		{
			auto& CurSpawnable = *SpawnableIter;
			if( CurSpawnable.GetGuid() == Guid )
			{
				Modify();

				{
					UClass* GeneratedClass = CurSpawnable.GetClass();
					UBlueprint* Blueprint = GeneratedClass ? Cast<UBlueprint>(GeneratedClass->ClassGeneratedBy) : nullptr;
					check(nullptr != Blueprint);
					// @todo sequencer: Also remove created Blueprint inner object.  Is this sufficient?  Needs to work with Undo too!
					Blueprint->ClearFlags( RF_Standalone );	// @todo sequencer: Probably not needed for Blueprint
					Blueprint->MarkPendingKill();
				}

				RemoveBinding( Guid );

				// Found it!
				Spawnables.RemoveAt( SpawnableIter.GetIndex() );


				bAnythingRemoved = true;
				break;
			}
		}
	}

	return bAnythingRemoved;
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:35,代码来源:MovieScene.cpp


示例5: Modify

void Beam::AddLayerElement(LayerElement *element)
{

    element->SetParent( this );
    m_children.push_back(element);
    Modify();
}
开发者ID:ianwmoore,项目名称:verovio,代码行数:7,代码来源:beam.cpp


示例6: GetPinInformation

void UAnimGraphNode_BlendListByEnum::RemovePinFromBlendList(UEdGraphPin* Pin)
{
	int32 RawArrayIndex = 0;
	bool bIsPosePin = false;
	bool bIsTimePin = false;
	GetPinInformation(Pin->PinName, /*out*/ RawArrayIndex, /*out*/ bIsPosePin, /*out*/ bIsTimePin);

	const int32 ExposedEnumIndex = (bIsPosePin || bIsTimePin) ? (RawArrayIndex - 1) : INDEX_NONE;

	if (ExposedEnumIndex != INDEX_NONE)
	{
		FScopedTransaction Transaction( LOCTEXT("RemovePin", "RemovePin") );
		Modify();

		// Record it as no longer exposed
		VisibleEnumEntries.RemoveAt(ExposedEnumIndex);

		// Remove the pose from the node
		UProperty* AssociatedProperty;
		int32 ArrayIndex;
		GetPinAssociatedProperty(GetFNodeType(), Pin, /*out*/ AssociatedProperty, /*out*/ ArrayIndex);

		ensure(ArrayIndex == (ExposedEnumIndex + 1));

		// setting up removed pins info 
		RemovedPinArrayIndex = ArrayIndex;
		Node.RemovePose(ArrayIndex);
		ReconstructNode();
		//@TODO: Just want to invalidate the visual representation currently
		FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified(GetBlueprint());
	}
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:32,代码来源:AnimGraphNode_BlendListByEnum.cpp


示例7: main

void main()
{
 ABList L;
 printf("nnttWelcom to the information management system!nttt Copyright. Huang Wenbo,2010.n");
 InitList_AB(L);
    load(L);
    system("color 18");
 int flag=1;
 while(flag)
 {
  
  switch(menu())
  {
  case 1:CreatABList(L);break;
  case 2:Increase(L);break;
  case 3:del(L);break;
  case 4:Modify(L);break;
  case 5:search(L);break;
  case 6:save(L);break;
  case 7:destroy(L);break;
  case 8:system("cls");break;
  case 9:flag = 0;printf("ttt欢迎下次使用! nttCopyright.Huang Wenbo,2010.n");
  }
 }
 
}
开发者ID:liujianpc,项目名称:mySource,代码行数:26,代码来源:a.cpp


示例8: assert

void Measure::AddChild(Object *child)
{
    if (child->IsControlElement()) {
        assert(dynamic_cast<ControlElement *>(child));
    }
    else if (child->IsEditorialElement()) {
        assert(dynamic_cast<EditorialElement *>(child));
    }
    else if (child->Is(STAFF)) {
        Staff *staff = dynamic_cast<Staff *>(child);
        assert(staff);
        if (staff && (staff->GetN() < 1)) {
            // This is not 100% safe if we have a <app> and <rdg> with more than
            // one staff as a previous child.
            staff->SetN(this->GetChildCount());
        }
    }
    else {
        LogError("Adding '%s' to a '%s'", child->GetClassName().c_str(), this->GetClassName().c_str());
        assert(false);
    }

    child->SetParent(this);
    m_children.push_back(child);
    Modify();
}
开发者ID:rettinghaus,项目名称:verovio,代码行数:26,代码来源:measure.cpp


示例9: Modify

void AGroupActor::Add(AActor& InActor)
{	
	// See if the incoming actor already belongs to a group
	AGroupActor* InActorParent = AGroupActor::GetParentForActor(&InActor);
	if(InActorParent) // If so, detach it first
	{
		if(InActorParent == this)
		{
			return;
		}
		InActorParent->Modify();
		InActorParent->Remove(InActor);
	}
	
	Modify();
	AGroupActor* InGroupPtr = Cast<AGroupActor>(&InActor);
	if(InGroupPtr)
	{
		check(InGroupPtr != this);
		SubGroups.AddUnique(InGroupPtr);
	}
	else
	{
		GroupActors.AddUnique(&InActor);
		InActor.Modify();
		InActor.GroupActor = this;
	}
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:28,代码来源:GroupActor.cpp


示例10: UpdateVersion_NestedNodes

void UEnvironmentQueryGraph::UpdateVersion()
{
	if (GraphVersion == EQSGraphVersion::Latest)
	{
		return;
	}

	// convert to nested nodes
	if (GraphVersion < EQSGraphVersion::NestedNodes)
	{
		UpdateVersion_NestedNodes();
	}

	if (GraphVersion < EQSGraphVersion::CopyPasteOutersBug)
	{
		UpdateVersion_FixupOuters();
	}

	if (GraphVersion < EQSGraphVersion::BlueprintClasses)
	{
		UpdateVersion_CollectClassData();
	}

	GraphVersion = EQSGraphVersion::Latest;
	Modify();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:26,代码来源:EnvironmentQueryGraph.cpp


示例11: assert

void ScoreDef::AddStaffGrp( StaffGrp *staffGrp )
{
    assert( m_children.empty() );
	staffGrp->SetParent( this );
	m_children.push_back( staffGrp );
    Modify();
}
开发者ID:raffazizzi,项目名称:verovio,代码行数:7,代码来源:scoredef.cpp


示例12: strdup

/*!
 * \brief Set value of a string item.
 */
bool CNutConfDoc::SetValue(CConfigItem & item, const wxString & strValue)
{
    if (item.m_option) {
        char *newval = strdup(strValue.mb_str());

        /* Check if edited value changed. */
        if (item.m_option->nco_value == NULL || strcmp(item.m_option->nco_value, newval)) {
            /* Remove any previously edited value. */
            if (item.m_option->nco_value) {
                free(item.m_option->nco_value);
                item.m_option->nco_value = NULL;
            }
            /* Check if new value differs from configured value. */
            char *cfgval = GetConfigValue(m_repository, item.m_option->nco_name);
            if ((cfgval == NULL && *newval) || (cfgval && strcmp(cfgval, newval))) {
                item.m_option->nco_value = newval;
                item.m_option->nco_active = 1;
                Modify(true);
            } else {
                free(newval);
            }
            if (cfgval) {
                free(cfgval);
            }
            CNutConfHint hint(&item, nutValueChanged);
            UpdateAllViews(NULL, &hint);
        } else {
            free(newval);
        }
    }
    return true;
}
开发者ID:niziak,项目名称:ethernut-4.9,代码行数:35,代码来源:nutconfdoc.cpp


示例13: Modify

void UStaticMeshComponent::InvalidateLightingCacheDetailed(bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly)
{
	if(bHasCachedStaticLighting)
	{
		// Save the static mesh state for transactions, force it to be marked dirty if we are going to discard any static lighting data.
		Modify(true);

		// Detach the component from the scene for the duration of this function.
		FComponentReregisterContext ReregisterContext(this);

		// Block until the RT processes the unregister before modifying variables that it may need to access
		FlushRenderingCommands();

		Super::InvalidateLightingCacheDetailed(bInvalidateBuildEnqueuedLighting, bTranslationOnly);

		// Discard all cached lighting.
		check(AttachmentCounter.GetValue() == 0);
		IrrelevantLights.Empty();
		for(int32 i = 0; i < LODData.Num(); i++)
		{
			FStaticMeshComponentLODInfo& LODDataElement = LODData[i];
			LODDataElement.LightMap = NULL;
			LODDataElement.ShadowMap = NULL;
		}
	}
	
	if (bInvalidateBuildEnqueuedLighting)
	{
		bStaticLightingBuildEnqueued = false;
	}
}
开发者ID:WasPedro,项目名称:UnrealEngine4.11-HairWorks,代码行数:31,代码来源:StaticMeshLight.cpp


示例14: FRawStructWriter

void UDataTable::CleanBeforeStructChange()
{
    RowsSerializedWithTags.Reset();
    TemporarilyReferencedObjects.Empty();
    {
        class FRawStructWriter : public FObjectWriter
        {
            TSet<UObject*>& TemporarilyReferencedObjects;
        public:
            FRawStructWriter(TArray<uint8>& InBytes, TSet<UObject*>& InTemporarilyReferencedObjects)
                : FObjectWriter(InBytes), TemporarilyReferencedObjects(InTemporarilyReferencedObjects) {}
            virtual FArchive& operator<<(class UObject*& Res) override
            {
                FObjectWriter::operator<<(Res);
                TemporarilyReferencedObjects.Add(Res);
                return *this;
            }
        };

        FRawStructWriter MemoryWriter(RowsSerializedWithTags, TemporarilyReferencedObjects);
        SaveStructData(MemoryWriter);
    }
    EmptyTable();
    Modify();
}
开发者ID:magetron,项目名称:UnrealEngine4-mod,代码行数:25,代码来源:DataTable.cpp


示例15: Modify

void USimpleConstructionScript::RemoveNode(USCS_Node* Node)
{
	// If it's a root node we are removing, clear it from the list
	if(RootNodes.Contains(Node))
	{
		Modify();

		RootNodes.Remove(Node);

		Node->Modify();

		Node->bIsParentComponentNative = false;
		Node->ParentComponentOrVariableName = NAME_None;
		Node->ParentComponentOwnerClassName = NAME_None;

		ValidateSceneRootNodes();
	}
	// Not the root, so iterate over all nodes looking for the one with us in its ChildNodes array
	else
	{
		USCS_Node* ParentNode = FindParentNode(Node);
		if(ParentNode != NULL)
		{
			ParentNode->Modify();

			ParentNode->ChildNodes.Remove(Node);
		}
	}
}
开发者ID:johndpope,项目名称:UE4,代码行数:29,代码来源:SimpleConstructionScript.cpp


示例16: assert

void StaffGrp::AddChild(Object *child)
{
    if (child->Is(INSTRDEF)) {
        assert(dynamic_cast<InstrDef *>(child));
    }
    else if (child->Is(LABEL)) {
        assert(dynamic_cast<Label *>(child));
    }
    else if (child->Is(LABELABBR)) {
        assert(dynamic_cast<LabelAbbr *>(child));
    }
    else if (child->Is(STAFFDEF)) {
        assert(dynamic_cast<StaffDef *>(child));
    }
    else if (child->Is(STAFFGRP)) {
        assert(dynamic_cast<StaffGrp *>(child));
    }
    else if (child->IsEditorialElement()) {
        assert(dynamic_cast<EditorialElement *>(child));
    }
    else {
        LogError("Adding '%s' to a '%s'", child->GetClassName().c_str(), this->GetClassName().c_str());
        assert(false);
    }

    child->SetParent(this);
    m_children.push_back(child);
    Modify();
}
开发者ID:rettinghaus,项目名称:verovio,代码行数:29,代码来源:staffgrp.cpp


示例17: FoldCreate

int EBuffer::FoldCreate(int Line) { /*FOLD00*/
  int n;

  if (Modify() == 0) return 0;

  if (FindFold(Line) != -1) return 1;  // already exists

  if (BFI(this, BFI_Undo)) {
    if (PushULong(Line) == 0) return 0;

    if (PushUChar(ucFoldCreate) == 0) return 0;
  }

  n = FindNearFold(Line);
  n++;
  FF = (EFold *)realloc((void *)FF, sizeof(EFold) * ((1 + FCount) | 7));
  assert(FF != 0);
  memmove(FF + n + 1, FF + n, sizeof(EFold) * (FCount - n));
  FCount++;
  FF[n].line  = Line;
  FF[n].level = 0;
  FF[n].open  = 1;
  FF[n].flags = 0;
  Draw(Line, Line);
  return 1;
}
开发者ID:AaronDP,项目名称:efte_adbshell,代码行数:26,代码来源:e_fold.cpp


示例18: main

main() {
	int k, n, a, b;
	for(a = 0; a < 10002; a++)	LOW[a] = a & (-a);
	scanf("%d", &k);
	while(k--) {
		scanf("%d", &n);
		for(a = 0; a < n; a++)
			scanf("%d %d %d", &A[a].a, &A[a].b, &A[a].c), 
			B[a].a = A[a].b, B[a].b = A[a].a, B[a].c = A[a].c;
		MergeSort(0, n-1, A), MergeSort(0, n-1, B);
		int Pa, Pb, Pc, t, Ans = 0;
		for(a = 0; a < n; ) {
			Pa = A[a].a;
			while(a < n && A[a].a <= Pa)	a++;
			memset(C, 0, (10000-Pa+2)*4);
			for(b = 0; b < n && Pa+B[b].a <= 10000; ) {
				Pb = B[b].a, Pc = 10000-Pa-Pb+1;
				while(b < n && B[b].a <= Pb) {
					if(B[b].b <= Pa)	Modify(B[b].c+1, Pc);
					b++;
				}
				t = Operator(Pc);
				Ans = Ans > t ? Ans : t;
			}
		}
		printf("%d\n", Ans);
	}
	return 0;
}
开发者ID:JohnXinhua,项目名称:UVa,代码行数:29,代码来源:b212.+E.+不景氣的年代.cpp


示例19: ScopedTransaction

void UAnimPreviewInstance::SetKeyImplementation(const FCompactPose& PreControllerInLocalSpace, const FCompactPose& PostControllerInLocalSpace)
{
#if WITH_EDITOR
	// evaluate the curve data first
	UAnimSequence* CurrentSequence = Cast<UAnimSequence>(CurrentAsset);
	UDebugSkelMeshComponent* Component = Cast<UDebugSkelMeshComponent> (GetSkelMeshComponent());

	if(CurrentSequence && CurrentSkeleton && Component && Component->SkeletalMesh)
	{
		FScopedTransaction ScopedTransaction(LOCTEXT("SetKey", "Set Key"));
		CurrentSequence->Modify(true);
		Modify();

		TArray<FName> BonesToModify;
		// need to get component transform first. Depending on when this gets called, the transform is not up-to-date. 
		// first look at the bonecontrollers, and convert each bone controller to transform curve key
		// and add new curvebonecontrollers with additive data type
		// clear bone controller data
		for(auto& SingleBoneController : BoneControllers)
		{
			// find bone name, and just get transform of the bone in local space
			// and get the additive data
			// find if this already exists, then just add curve data only
			FName BoneName = SingleBoneController.BoneToModify.BoneName;
			// now convert data
			const FMeshPoseBoneIndex MeshBoneIndex(Component->GetBoneIndex(BoneName));
			const FCompactPoseBoneIndex BoneIndex = RequiredBones.MakeCompactPoseIndex(MeshBoneIndex);
			FTransform  LocalTransform = PostControllerInLocalSpace[BoneIndex];

			// now we have LocalTransform and get additive data
			FTransform AdditiveTransform = LocalTransform.GetRelativeTransform(PreControllerInLocalSpace[BoneIndex]);
			AddKeyToSequence(CurrentSequence, CurrentTime, BoneName, AdditiveTransform);

			BonesToModify.Add(BoneName);
		}

		// see if the bone is selected right now and if that is added - if bone is selected, we should add identity key to it. 
		if ( Component->BonesOfInterest.Num() > 0 )
		{
			// if they're selected, we should add to the modifyBone list even if they're not modified, so that they can key that point. 
			// first make sure those are added 
			// if not added, make sure to set the key for them
			for (const auto& BoneIndex : Component->BonesOfInterest)
			{
				FName BoneName = Component->GetBoneName(BoneIndex);
				// if it's not on BonesToModify, add identity here. 
				if (!BonesToModify.Contains(BoneName))
				{
					AddKeyToSequence(CurrentSequence, CurrentTime, BoneName, FTransform::Identity);
				}
			}
		}

		ResetModifiedBone(false);

		OnSetKeyCompleteDelegate.ExecuteIfBound();
	}
#endif
}
开发者ID:didixp,项目名称:Ark-Dev-Kit,代码行数:59,代码来源:AnimPreviewInstance.cpp


示例20: GetCurves

TArray<FString> UCurveBase::CreateCurveFromCSVString(const FString& InString)
{
	// Array used to store problems about curve import
	TArray<FString> OutProblems;

	TArray<FRichCurveEditInfo> Curves = GetCurves();
	const int32 NumCurves = Curves.Num();

	const FCsvParser Parser(InString);
	const FCsvParser::FRows& Rows = Parser.GetRows();

	if(Rows.Num() == 0)
	{
		OutProblems.Add(FString(TEXT("No data.")));
		return OutProblems;
	}

	// First clear out old data.
	ResetCurve();

	// Each row represents a point
	for(int32 RowIdx=0; RowIdx<Rows.Num(); RowIdx++)
	{
		const TArray<const TCHAR*>& Cells = Rows[RowIdx];
		const int32 NumCells = Cells.Num();

		// Need at least two cell, Time and one Value
		if(NumCells < 2)
		{
			OutProblems.Add(FString::Printf(TEXT("Row '%d' has less than 2 cells."), RowIdx));
			continue;
		}

		float Time = FCString::Atof(Cells[0]);
		for(int32 CellIdx=1; CellIdx<NumCells && CellIdx<(NumCurves+1); CellIdx++)
		{
			FRichCurve* Curve = Curves[CellIdx-1].CurveToEdit;
			if(Curve != NULL)
			{
				FKeyHandle KeyHandle = Curve->AddKey(Time, FCString::Atof(Cells[CellIdx]));
				Curve->SetKeyInterpMode(KeyHandle, RCIM_Linear);
			}
		}

		// If we get more cells than curves (+1 for time cell)
		if(NumCells > (NumCurves + 1))
		{
			OutProblems.Add(FString::Printf(TEXT("Row '%d' has too many cells for the curve(s)."), RowIdx));
		}
		// If we got too few cells
		else if(NumCells < (NumCurves + 1))
		{
			OutProblems.Add(FString::Printf(TEXT("Row '%d' has too few cells for the curve(s)."), RowIdx));
		}
	}

	Modify(true);
	return OutProblems;
}
开发者ID:magetron,项目名称:UnrealEngine4-mod,代码行数:59,代码来源:CurveBase.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ModifyStyle函数代码示例发布时间:2022-05-30
下一篇:
C++ Modified函数代码示例发布时间: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