Documentation ¶
Index ¶
- Variables
- func ReferencePropT[T IPropSync](entity ec.Entity, name string) T
- func UnsafeProp(p IProp) _UnsafePropdeprecated
- func UnsafePropSync(ps IPropSync) _UnsafePropSyncdeprecated
- type IProp
- type IPropSync
- type IPropTab
- type IPropView
- type PropCreator
- type PropCreatorT
- type PropSync
- type PropT
- type PropTab
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Name = self.Name Using = self.Using Install = self.Install Uninstall = self.Uninstall )
View Source
var ( ErrEntityNotFound = variant.Errorln(-2, "entity not found") ErrEntityNoPropTab = variant.Errorln(-3, "entity hasn't prop table") ErrEntityNoProp = variant.Errorln(-4, "entity hasn't prop") ErrOutdatedRevision = variant.Errorln(-5, "synchronized revision is outdated") ErrDiscontinuousRevision = variant.Errorln(-6, "synchronized revision is discontinuous") ErrMethodNotFound = variant.Errorln(-7, "op method not found") ErrMethodParameterCountMismatch = variant.Errorln(-8, "op method parameter count mismatch") ErrMethodParameterTypeMismatch = variant.Errorln(-9, "op method parameter type mismatch") )
Functions ¶
func ReferencePropT ¶
ReferencePropT 引用属性
func UnsafeProp
deprecated
func UnsafeProp(p IProp) _UnsafeProp
Deprecated: UnsafeProp 访问属性内部函数
func UnsafePropSync
deprecated
func UnsafePropSync(ps IPropSync) _UnsafePropSync
Deprecated: UnsafePropSync 访问属性同步内部函数
Types ¶
type IProp ¶
type IProp interface { // Reset 重置 Reset() // Revision 版本号 Revision() int64 // Marshal 序列化 Marshal() ([]byte, int64, error) // Unmarshal 反序列化 Unmarshal(data []byte, revision int64) error // contains filtered or unexported methods }
IProp 属性接口
type IPropSync ¶
type IPropSync interface { IProp // Load 加载 Load(service string) error // Save 保存 Save(service string) error // Managed 托管的属性 Managed() IProp // Atti Atti Atti() any // Reflected 反射值 Reflected() reflect.Value // contains filtered or unexported methods }
IPropSync 属性同步接口
type IPropTab ¶
type IPropTab interface { // AddProp 添加属性 AddProp(name string, ps IPropSync) // GetProp 获取属性 GetProp(name string) IPropSync // RangeProps 遍历属性 RangeProps(fun generic.Func2[string, IPropSync, bool]) // EachProps 遍历属性 EachProps(fun generic.Action2[string, IPropSync]) }
IPropTab 属性表接口
type IPropView ¶
type IPropView interface {
// contains filtered or unexported methods
}
IPropView 属性视图插件接口
type PropCreator ¶
type PropCreator = PropCreatorT[IPropSync]
PropCreator 属性创建器
func DeclareProp ¶
func DeclareProp(entity ec.Entity, name string, prop any) PropCreator
DeclareProp 定义属性
type PropCreatorT ¶
type PropCreatorT[T IPropSync] struct { // contains filtered or unexported fields }
PropCreatorT 属性创建器
func DeclarePropT ¶
func DeclarePropT[T IPropSync](entity ec.Entity, name string) PropCreatorT[T]
DeclarePropT 定义属性
func (PropCreatorT[T]) SyncTo ¶
func (c PropCreatorT[T]) SyncTo(to ...string) PropCreatorT[T]
SyncTo 设置同步目标
Click to show internal directories.
Click to hide internal directories.