You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/SceneProcessing/Code/Source/Config/SettingsObjects/SoftNameSetting.h

61 lines
2.0 KiB
C++

/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <AzCore/Math/Crc.h>
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/std/containers/vector.h>
#include <AzCore/std/string/string.h>
#include <SceneAPI/SceneCore/Containers/SceneGraph.h>
#include <SceneAPI/SceneCore/Utilities/PatternMatcher.h>
namespace AZ
{
namespace SceneAPI
{
namespace Containers
{
class Scene;
}
}
namespace SceneProcessingConfig
{
class SoftNameSetting
{
public:
AZ_CLASS_ALLOCATOR(SoftNameSetting, SystemAllocator, 0);
AZ_RTTI(SoftNameSetting, "{FE7AAAF6-8BA5-4599-B9A6-CC28026A6FFE}");
SoftNameSetting() = default;
SoftNameSetting(const char* pattern, SceneAPI::SceneCore::PatternMatcher::MatchApproach approach,
const char* virtualType);
virtual ~SoftNameSetting() = 0;
virtual const AZStd::string& GetVirtualType() const;
virtual Crc32 GetVirtualTypeHash() const;
virtual bool IsVirtualType(const SceneAPI::Containers::Scene& scene, SceneAPI::Containers::SceneGraph::NodeIndex node) const = 0;
static void Reflect(ReflectContext* context);
protected:
AZStd::vector<AZStd::string> GetAllVirtualTypes() const;
SceneAPI::SceneCore::PatternMatcher m_pattern;
AZStd::string m_virtualType;
mutable Crc32 m_virtualTypeHash;
};
} // namespace SceneProcessingConfig
} // namespace AZ