当前位置: 首页>>代码示例>>Python>>正文


Python rtti.typecheck函数代码示例

本文整理汇总了Python中marketsim.rtti.typecheck函数的典型用法代码示例。如果您正苦于以下问题:Python typecheck函数的具体用法?Python typecheck怎么用?Python typecheck使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了typecheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: typecheck

    def typecheck(self):
        from marketsim import rtti
        from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
        from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat

        rtti.typecheck(IObservablefloat, self.x)
        rtti.typecheck(IFunctionfloat, self.elsePart)
开发者ID:xiaobozi,项目名称:marketsimulator,代码行数:7,代码来源:_ifdefined.py

示例2: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorder import IOrder
     from marketsim.gen._out._iobservable._iobservableiorder import IObservableIOrder
     from marketsim.gen._out._ievent import IEvent
     rtti.typecheck(IObservableIOrder, self.orderFactory)
     rtti.typecheck(IEvent, self.eventGen)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_generic.py

示例3: typecheck

 def typecheck(self):
     from marketsim import rtti
     rtti.typecheck(str, self.ticker)
     rtti.typecheck(str, self.start)
     rtti.typecheck(str, self.end)
     rtti.typecheck(float, self.delta)
     rtti.typecheck(float, self.volume)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_marketdata.py

示例4: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorder import IOrder
     from marketsim.gen._out._iobservable._iobservableiorder import IObservableIOrder
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(IObservableIOrder, self.proto)
     rtti.typecheck(IFunctionfloat, self.maxloss)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_StopLoss.py

示例5: typecheck

    def typecheck(self):
        from marketsim import rtti
        from marketsim.gen._out._ifunction._ifunctioniobservableiorder_from_ifunctionside import (
            IFunctionIObservableIOrder_from_IFunctionSide,
        )

        rtti.typecheck(IFunctionIObservableIOrder_from_IFunctionSide, self.proto)
开发者ID:xiaobozi,项目名称:marketsimulator,代码行数:7,代码来源:_side_immediateorcancel.py

示例6: typecheck

    def typecheck(self):
        from marketsim import rtti
        from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
        from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat

        rtti.typecheck(IFunctionSide, self.side)
        rtti.typecheck(IFunctionfloat, self.volume)
开发者ID:xiaobozi,项目名称:marketsimulator,代码行数:7,代码来源:_price_limit.py

示例7: typecheck

 def typecheck(self):
     for obj in self._id2obj.itervalues():
         for p in rtti.properties(obj):
             try:
                 rtti.typecheck(p.type, getattr(obj, p.name))
             except exception.Constraint, err:
                 print err
                 print '    at ', repr(obj), '.', p.name
开发者ID:Courvoisier13,项目名称:marketsimulator,代码行数:8,代码来源:registry.py

示例8: typecheck

    def typecheck(self):
        from marketsim import listOf
        from marketsim.gen._out._imultiassetstrategy import IMultiAssetStrategy
        from marketsim.gen._out._itimeserie import ITimeSerie
        from marketsim import rtti
        from marketsim.gen._out._isingleassettrader import ISingleAssetTrader

        rtti.typecheck(listOf(ISingleAssetTrader), self.traders)
        rtti.typecheck(IMultiAssetStrategy, self.strategy)
        rtti.typecheck(str, self.name)
        rtti.typecheck(float, self.PnL)
        rtti.typecheck(listOf(ITimeSerie), self.timeseries)
开发者ID:xiaobozi,项目名称:marketsimulator,代码行数:12,代码来源:_multiasset.py

示例9: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ifunction._ifunctionfloat import IFunctionfloat
     rtti.typecheck(float, self.initialValue)
     rtti.typecheck(IFunctionfloat, self.deltaDistr)
     rtti.typecheck(IFunctionfloat, self.intervalDistr)
     rtti.typecheck(str, self.name)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_RandomWalk.py

示例10: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iorderbook import IOrderBook
     rtti.typecheck(float, self.alpha_1)
     rtti.typecheck(float, self.alpha_2)
     rtti.typecheck(float, self.threshold)
     rtti.typecheck(IOrderBook, self.book)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_crossingaverages.py

示例11: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iobservable._iobservablefloat import IObservablefloat
     from marketsim.gen._out._isingleassettrader import ISingleAssetTrader
     rtti.typecheck(float, self.alpha)
     rtti.typecheck(IObservablefloat, self.k)
     rtti.typecheck(float, self.timeframe)
     rtti.typecheck(ISingleAssetTrader, self.trader)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_rsi_linear.py

示例12: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._itimeserie import ITimeSerie
     from marketsim import listOf
     rtti.typecheck(str, self.name)
     rtti.typecheck(float, self.tickSize)
     rtti.typecheck(int, self._digitsToShow)
     rtti.typecheck(listOf(ITimeSerie), self.timeseries)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_local.py

示例13: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._iobservable._iobservableobject import IObservableobject
     from marketsim.gen._out._igraph import IGraph
     rtti.typecheck(IObservableobject, self.source)
     rtti.typecheck(IGraph, self.graph)
     rtti.typecheck(int, self._digitsToShow)
     rtti.typecheck(int, self._smooth)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:8,代码来源:_timeserie.py

示例14: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out._ievent import IEvent
     from marketsim.gen._out._ifunction._ifunctioniobservableiorder_from_ifunctionsideifunctionfloat import IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat
     from marketsim.gen._out.strategy.price._liquidityprovider import LiquidityProvider
     from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
     rtti.typecheck(LiquidityProvider, self.x)
     rtti.typecheck(IEvent, self.eventGen)
     rtti.typecheck(IFunctionIObservableIOrder_from_IFunctionSideIFunctionfloat, self.orderFactory)
     rtti.typecheck(IFunctionSide, self.side)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:10,代码来源:_onesidestrategy.py

示例15: typecheck

 def typecheck(self):
     from marketsim import rtti
     from marketsim.gen._out.strategy.price._marketdata import MarketData
     from marketsim.gen._out._ifunction._ifunctionside import IFunctionSide
     rtti.typecheck(MarketData, self.x)
     rtti.typecheck(IFunctionSide, self.side)
     rtti.typecheck(float, self.sign)
开发者ID:SemanticBeeng,项目名称:marketsimulator,代码行数:7,代码来源:_oneside.py


注:本文中的marketsim.rtti.typecheck函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。