载入中...
搜索中...
未找到
eve::editing::Value类 参考

Deterministic owning value tree shared by authoring hosts. 更多...

#include <EditingValue.h>

Public 类型

enum class  Type {
  Null , Bool , Integer , Number ,
  String , Array , Object
}
 Type public API. 更多...
 
using Array = std::vector< Value >
 
using Object = std::map< std::string, Value >
 
using Storage = std::variant< std::monostate, bool, int64_t, double, std::string, Array, Object >
 

Public 成员函数

 Value () noexcept
 Construct a null owning value.
 
 ~Value () noexcept
 Release the owned value tree.
 
 Value (const Value &other)
 Deep-copy the complete value tree.
 
Value & operator= (const Value &other)
 Replace this value with a deep copy.
 
 Value (Value &&other) noexcept(std::is_nothrow_move_constructible_v< Storage >)
 Transfer ownership of the complete value tree.
 
Value & operator= (Value &&other) noexcept(std::is_nothrow_move_assignable_v< Storage >)
 Replace this value by transferring tree ownership.
 
 Value (std::nullptr_t)
 Construct a null value.
 
 Value (bool value)
 Construct a boolean value.
 
 Value (int value)
 Construct an integer value.
 
 Value (int64_t value)
 Construct a signed 64-bit integer value.
 
 Value (float value)
 Construct a number from a float.
 
 Value (double value)
 Construct a number from a double.
 
 Value (const char *value)
 Copy a NUL-terminated string; a null input becomes empty text.
 
 Value (std::string value)
 Transfer ownership of string storage.
 
 Value (Array value)
 Transfer ownership of array entries.
 
 Value (Object value)
 Transfer ownership of ordered object fields.
 
Type type () const
 Return the active value type.
 
const Storage & storage () const
 Return the underlying variant for typed visitors.
 
Storage & storage ()
 Return mutable storage; all child borrows are invalidated by mutation.
 
template<class T >
const T * getIf () const
 Return an immediately borrowed typed value.
 
template<class T >
T * getIf ()
 Return an immediately borrowed mutable value.
 
bool isWithinLimits (size_t maxDepth, size_t maxElements, size_t maxStringBytes) const
 Validate nesting, element count and approximate string byte limits.
 
bool operator== (const Value &) const
 Compare complete trees by value, independent of object insertion order.
 

详细描述

Deterministic owning value tree shared by authoring hosts.

注解
Owns all children; copies are independent and moves transfer ownership.
Mutations invalidate child borrows; callers synchronize access. No callbacks are invoked.

Objects use std::map so serialization and equality do not depend on insertion order. Native pointers and runtime handles are intentionally excluded.

在文件 EditingValue.h 第 23 行定义.

成员类型定义说明

◆ Array

using eve::editing::Value::Array = std::vector<Value>

在文件 EditingValue.h 第 25 行定义.

◆ Object

using eve::editing::Value::Object = std::map<std::string, Value>

在文件 EditingValue.h 第 26 行定义.

◆ Storage

using eve::editing::Value::Storage = std::variant<std::monostate, bool, int64_t, double, std::string, Array, Object>

在文件 EditingValue.h 第 27 行定义.

成员枚举类型说明

◆ Type

enum class eve::editing::Value::Type
strong

Type public API.

枚举值
Null 
Bool 
Integer 
Number 
String 
Array 
Object 

在文件 EditingValue.h 第 30 行定义.

构造及析构函数说明

◆ Value() [1/13]

eve::editing::Value::Value ( )
defaultnoexcept

Construct a null owning value.

◆ ~Value()

eve::editing::Value::~Value ( )
defaultnoexcept

Release the owned value tree.

◆ Value() [2/13]

eve::editing::Value::Value ( const Value &  other)
default

Deep-copy the complete value tree.

◆ Value() [3/13]

eve::editing::Value::Value ( Value &&  other) const
defaultnoexcept

Transfer ownership of the complete value tree.

◆ Value() [4/13]

eve::editing::Value::Value ( std::nullptr_t  )

Construct a null value.

在文件 EditingValue.cpp 第 21 行定义.

◆ Value() [5/13]

eve::editing::Value::Value ( bool  value)

Construct a boolean value.

在文件 EditingValue.cpp 第 22 行定义.

◆ Value() [6/13]

eve::editing::Value::Value ( int  value)

Construct an integer value.

在文件 EditingValue.cpp 第 23 行定义.

◆ Value() [7/13]

eve::editing::Value::Value ( int64_t  value)

Construct a signed 64-bit integer value.

在文件 EditingValue.cpp 第 24 行定义.

◆ Value() [8/13]

eve::editing::Value::Value ( float  value)

Construct a number from a float.

在文件 EditingValue.cpp 第 25 行定义.

◆ Value() [9/13]

eve::editing::Value::Value ( double  value)

Construct a number from a double.

在文件 EditingValue.cpp 第 26 行定义.

◆ Value() [10/13]

eve::editing::Value::Value ( const char *  value)

Copy a NUL-terminated string; a null input becomes empty text.

在文件 EditingValue.cpp 第 27 行定义.

引用了 string.

◆ Value() [11/13]

eve::editing::Value::Value ( std::string  value)

Transfer ownership of string storage.

在文件 EditingValue.cpp 第 28 行定义.

◆ Value() [12/13]

eve::editing::Value::Value ( Array  value)

Transfer ownership of array entries.

在文件 EditingValue.cpp 第 29 行定义.

◆ Value() [13/13]

eve::editing::Value::Value ( Object  value)

Transfer ownership of ordered object fields.

在文件 EditingValue.cpp 第 30 行定义.

成员函数说明

◆ getIf() [1/2]

template<class T >
T * eve::editing::Value::getIf ( )
inline

Return an immediately borrowed mutable value.

返回
Borrowed pointer into this value, or null on type mismatch. @lifetime Valid until this Value is mutated or destroyed.

在文件 EditingValue.h 第 87 行定义.

◆ getIf() [2/2]

template<class T >
const T * eve::editing::Value::getIf ( ) const
inline

Return an immediately borrowed typed value.

返回
Borrowed pointer into this value, or null on type mismatch. @lifetime Valid until this Value is mutated or destroyed.

在文件 EditingValue.h 第 78 行定义.

被这些函数引用 eve::lighting_editing::Light3DRuntimeApplier::apply(), eve::lighting_editing::EnvironmentRuntimeApplier::applyDayNight(), eve::animation_editing::AnimationClipDocumentTarget::applyDomainOperation(), eve::audio_editing::AudioEffectChainTarget::applyDomainOperation(), eve::audio_editing::AudioSourceTarget::applyDomainOperation(), eve::lighting_editing::LightingPropertyTargetBase::applyDomainOperation(), eve::material_editing::MaterialDocumentTarget::applyDomainOperation(), eve::physics_editing::PhysicsColliderTarget::applyDomainOperation(), eve::physics_editing::PhysicsJointTarget::applyDomainOperation(), eve::scene_editing::SceneTargetBase::applyDomainOperation(), eve::social_editing::SocialDocumentTarget::applyDomainOperation(), eve::procgen_editing::ProcgenScriptDocumentTarget::applyDomainOperation(), eve::lighting_editing::EnvironmentRuntimeApplier::applyWeather(), eve::decal_editing::DecalGizmoPreviewService::build(), eve::dialogue_editing::DialogueGraphDomain::compile(), eve::particles_graphics_editing::ParticleEmitterOffscreenPresenter::draw(), eve::procgen_editing::detail::encodeBlockedLink(), eve::procgen_editing::detail::encodeConnectAtPosition(), eve::procgen_editing::detail::encodeDisconnectAtPosition(), eve::scene_editor::evaluateSceneVisualRelations(), eve::ui_editor::UiThemeEditor::getColorChannel(), eve::ui_editor::UiThemeEditor::getFloat(), eve::procgen_editing::ProcgenScriptDocumentTarget::loadSnapshot(), eve::animation_editing::AnimationClipDocumentTarget::loadSnapshot(), eve::audio_editing::AudioSourceTarget::loadSnapshot(), eve::audio_editing::AudioMixerTarget::loadSnapshot(), eve::lighting_editing::LightingPropertyTargetBase::loadSnapshot(), eve::material_editing::MaterialDocumentTarget::loadSnapshot(), eve::physics_editing::PhysicsColliderTarget::loadSnapshot(), eve::ui_editing::UiDocumentTarget::loadSnapshot(), eve::ui_editing::UiThemeCatalogTarget::loadSnapshot(), eve::editor::ScenePrefabService::loadSnapshot(), eve::scene_editing::SceneAuthoringDocumentTarget::makeDelete(), eve::procgen_editing::ProcgenScriptDocumentTarget::makeSet(), eve::editor::ProjectSettingsTarget::makeSet(), eve::fluids_editing::FluidSimulationTarget::makeSet(), eve::fluids_editing::SurfaceFluidTarget::makeSet(), eve::fluids_editing::VolumeFluidTarget::makeSet(), eve::gpuagents_editing::GpuAgentsDocumentTarget::makeSet(), eve::scene_editing::parseSceneRelations(), eve::procgen_editing::ProcgenScriptDocumentTarget::parseSpec(), eve::ui_editing::parseThemeTokens(), eve::editing::propertySchemaToJsonSchema(), eve::decal_editing::DecalRuntimeBinding::publish(), eve::action_editor::registerEditingCommands(), eve::animation_editing::registerEditingCommands(), eve::audio_editing::registerEditingCommands(), eve::material_editing::registerEditingCommands() , 以及 eve::scene_editing::registerEditingCommands().

◆ isWithinLimits()

bool eve::editing::Value::isWithinLimits ( size_t  maxDepth,
size_t  maxElements,
size_t  maxStringBytes 
) const

◆ operator=() [1/2]

Value & eve::editing::Value::operator= ( const Value &  other)
default

Replace this value with a deep copy.

◆ operator=() [2/2]

Value & eve::editing::Value::operator= ( Value &&  other)
defaultnoexcept

Replace this value by transferring tree ownership.

◆ operator==()

bool eve::editing::Value::operator== ( const Value &  other) const

Compare complete trees by value, independent of object insertion order.

在文件 EditingValue.cpp 第 31 行定义.

◆ storage() [1/2]

Storage & eve::editing::Value::storage ( )
inline

Return mutable storage; all child borrows are invalidated by mutation.

在文件 EditingValue.h 第 70 行定义.

◆ storage() [2/2]

const Storage & eve::editing::Value::storage ( ) const
inline

Return the underlying variant for typed visitors.

在文件 EditingValue.h 第 68 行定义.

◆ type()

Value::Type eve::editing::Value::type ( ) const

该类的文档由以下文件生成: