载入中...
搜索中...
未找到
eve::emergence 命名空间参考

类

struct  Activation
 One scheduled activation produced by drain(). 更多...
 
class  Emergence
 Script-facing module that owns RuleEngine instances. 更多...
 
struct  EmergenceAction
 One deferred side-effect descriptor; domains interpret kind. 更多...
 
class  FactStore
 Mutable fact bag that doubles as a read-only Condition evaluation context. 更多...
 
struct  RuleDefinition
 One immutable rule definition owned by the catalogue. 更多...
 
class  RuleEngine
 Indexed, deferred rule evaluator for tens of thousands of conditions. 更多...
 
struct  RuleEngineHandleTag
 Handle domain for module-owned rule engines. 更多...
 
class  WatchIndex
 Dense, sorted multi-map used to wake O(watchers) rules on a fact change. 更多...
 

类型定义

using RuleEngineHandleRef = eve::script::RuntimeHandleRef< RuleEngineHandleTag >
 Generation-qualified reference to a module-owned RuleEngine.
 

枚举

enum class  FactDomain : std::uint8_t {
  Value , Tag , Attribute , Resource ,
  State , Authority , Policy
}
 Domain partition of a fact key used by the watch index. 更多...
 
enum class  FactChange : std::uint8_t { Unchanged = 0 , Changed = 1 }
 Whether a FactStore mutation changed stored state. 更多...
 
enum class  FireMode : std::uint8_t { Rising = 0 , Level = 1 }
 When a watched rule may emit an activation. 更多...
 

函数

eve::Result< decision::Condition > decodeCondition (const eve::Value &value)
 Decode one validated condition tree from an owning Value.
 
eve::Result< std::vector< std::string > > collectWatchKeys (const decision::Condition &condition)
 Collect the canonical fact keys a condition depends on.
 
 Module_IMPL (Emergence, new Emergence())
 
std::string makeFactKey (FactDomain domain, std::string_view name)
 Build the canonical watch key for one fact domain.
 
eve::Result< std::pair< FactDomain, std::string > > parseFactKey (std::string_view key)
 Parse a canonical watch key into domain and leaf name.
 

类型定义说明

◆ RuleEngineHandleRef

Generation-qualified reference to a module-owned RuleEngine.

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

枚举类型说明

◆ FactChange

enum class eve::emergence::FactChange : std::uint8_t
strong

Whether a FactStore mutation changed stored state.

枚举值
Unchanged 
Changed 

在文件 FactStore.h 第 34 行定义.

◆ FactDomain

enum class eve::emergence::FactDomain : std::uint8_t
strong

Domain partition of a fact key used by the watch index.

枚举值
Value 
Tag 
Attribute 
Resource 
State 
Authority 
Policy 

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

◆ FireMode

enum class eve::emergence::FireMode : std::uint8_t
strong

When a watched rule may emit an activation.

枚举值
Rising 

Fire only on false→true edges.

Level 

Fire whenever woken while the condition currently passes.

在文件 RuleTypes.h 第 19 行定义.

函数说明

◆ collectWatchKeys()

EVENGINE_API_FOUNDATION eve::Result< std::vector< std::string > > eve::emergence::collectWatchKeys ( const decision::Condition &  condition)

Collect the canonical fact keys a condition depends on.

Leaf nodes contribute their domain key. PolicyCall nodes contribute policy:<name> plus every declared scriptDeclaration.dependencies entry (already expected to be canonical fact keys). All/Any/Not recurse into children.

参数
conditionSide-effect-free condition tree.
返回
Sorted unique keys, or a structured failure when a PolicyCall lacks both a name and a dependency declaration that would make indexing safe. @thread Pure; reentrant; no callbacks.

在文件 ConditionWatch.cpp 第 81 行定义.

引用了 condition, eve::Diagnostic::error() , 以及 eve::InvalidArgument.

◆ decodeCondition()

EVENGINE_API_FOUNDATION eve::Result< decision::Condition > eve::emergence::decodeCondition ( const eve::Value &  value)

Decode one validated condition tree from an owning Value.

参数
valueNode-shaped Value from an eve.emergence.rules document.
返回
Validated condition tree, or a structured parse failure.

在文件 ConditionCodec.cpp 第 257 行定义.

引用了 value.

被这些函数引用 eve::emergence::RuleEngine::replaceCatalogueJson().

◆ makeFactKey()

EVENGINE_API_FOUNDATION std::string eve::emergence::makeFactKey ( FactDomain  domain,
std::string_view  name 
)

Build the canonical watch key for one fact domain.

参数
domainFact namespace.
nameNon-empty leaf name.
返回
Owning domain:name key, or empty when name is empty.

在文件 FactStore.cpp 第 106 行定义.

引用了 key , 以及 name.

被这些函数引用 eve::emergence::RuleEngine::setAttribute(), eve::emergence::RuleEngine::setAuthority(), eve::emergence::RuleEngine::setPolicy(), eve::emergence::RuleEngine::setResource(), eve::emergence::RuleEngine::setState(), eve::emergence::RuleEngine::setTag() , 以及 eve::emergence::RuleEngine::setValue().

◆ Module_IMPL()

eve::emergence::Module_IMPL ( Emergence  ,
new   Emergence() 
)

◆ parseFactKey()

EVENGINE_API_FOUNDATION eve::Result< std::pair< FactDomain, std::string > > eve::emergence::parseFactKey ( std::string_view  key)

Parse a canonical watch key into domain and leaf name.

返回
Structured failure when the key is empty or uses an unknown domain prefix.

在文件 FactStore.cpp 第 113 行定义.

引用了 Attribute, Authority, eve::Diagnostic::error(), eve::InvalidArgument, key, message, name, Policy, Resource, State, Tag , 以及 Value.