Documentation ¶
Overview ¶
parser @author LanguageY++2013 2023/4/3 18:00 @company soulgame
parser @author LanguageY++2013 2023/3/31 09:39 @company soulgame
parser @author LanguageY++2013 2023/4/3 22:19 @company soulgame
Index ¶
- Constants
- func AvgFloat64(values []float64) (avg float64)
- func AvgHandlerWrapper(ctx context.Context, handler chain.UserHandler)
- func CountHandlerWrapper(ctx context.Context, handler chain.UserHandler)
- func FilterPlayerAttribute(p *open.MatchPlayer, attrName string) float64
- func FilterRuleClosure(rules []*open.MatchmakingRule, ruleNames []string) (out []*open.MatchmakingRule)
- func FilterTeamClosure(teams []*open.MatchTeam, names []string) (out []*open.MatchTeam)
- func FlattenFloat2DArray(array2d [][]float64) (out []float64)
- func FlattenFloat2DArrayWithPtr(array2d []*[]float64) (out []float64)
- func FlattenHandlerWrapper(ctx context.Context, handler chain.UserHandler)
- func MaxFloat64(values []float64) float64
- func MaxHandlerWrapper(ctx context.Context, handler chain.UserHandler)
- func MinFloat64(values []float64) float64
- func MinHandlerWrapper(ctx context.Context, handler chain.UserHandler)
- func RuleConfValue(rule *open.MatchmakingRule, fieldName string) (ret float64)
- func SumFloat64(values []float64) (sum float64)
- func TeamConfValue(team *open.MatchTeam, fieldName string) (ret float64)
- type PropertyExprParser
Constants ¶
View Source
const ( Token_EOF = iota Token_Unknown Token_Numeral //数字 Token_Identifier Token_ParenL // ( Token_ParenR // ) Token_BracketL // [ Token_BracketR // ] Token_Wildcard // * 通配符 Token_Dot // . Token_Comma // , Token_XMax // max 函数 Token_XMin // min 函数 Token_XFlatten // flatten 函数 Token_XAvg // avg 平均 //Token_XAnd // and 函数 //Token_XOr // or 函数 Token_XCount // count 函数 Token_ERules // rules 实体 Token_ETeams // teams 实体 Token_EPlayers // players 实体 Token_EAttributes // attributes 实体 )
自定义token id
Variables ¶
This section is empty.
Functions ¶
func AvgHandlerWrapper ¶
func AvgHandlerWrapper(ctx context.Context, handler chain.UserHandler)
func CountHandlerWrapper ¶
func CountHandlerWrapper(ctx context.Context, handler chain.UserHandler)
CountHandlerWrapper 计数
func FilterPlayerAttribute ¶
func FilterPlayerAttribute(p *open.MatchPlayer, attrName string) float64
FilterPlayerAttribute 过滤玩家属性
func FilterRuleClosure ¶
func FilterRuleClosure(rules []*open.MatchmakingRule, ruleNames []string) (out []*open.MatchmakingRule)
FilterRuleClosure 规则过滤闭包
func FilterTeamClosure ¶
FilterTeamClosure 团队过滤闭包
func FlattenFloat2DArray ¶
FlattenFloat2DArray 扁平化二维float数组
func FlattenFloat2DArrayWithPtr ¶
FlattenFloat2DArrayWithPtr 扁平化二维float数组
func FlattenHandlerWrapper ¶
func FlattenHandlerWrapper(ctx context.Context, handler chain.UserHandler)
FlattenHandlerWrapper 多维数组扁平化(降维)
func MaxHandlerWrapper ¶
func MaxHandlerWrapper(ctx context.Context, handler chain.UserHandler)
MaxHandlerWrapper 最大值
func MinHandlerWrapper ¶
func MinHandlerWrapper(ctx context.Context, handler chain.UserHandler)
MinHandlerWrapper 最小值处理
func RuleConfValue ¶
func RuleConfValue(rule *open.MatchmakingRule, fieldName string) (ret float64)
RuleConfValue 读取rule配置值
Types ¶
type PropertyExprParser ¶
func NewPropertyExprParser ¶
func NewPropertyExprParser(expr string) *PropertyExprParser
NewPropertyExprParser 建立属性表达式
func (*PropertyExprParser) Do ¶
func (p *PropertyExprParser) Do(ctx context.Context, userHandler chain.UserHandler)
func (*PropertyExprParser) IsEntity ¶
func (p *PropertyExprParser) IsEntity() bool
IsEntity Kind是否为实体
Click to show internal directories.
Click to hide internal directories.