CAObject
ADE 用户指南 > ADE服务器类型参考 >
CAObject是ADE用于Analytica对象,例如一个变量或者模块,的包装器。允许访问对象的属性,包括其定义和结果。经常用来作为获取变量结果表的垫脚石。
建立
不能直接建立CAObject实例。比必作为其它方法的返回结果才能获取CAObject。获取CAObject最常见的方法就是 CAEngine::GetObjectByName(与 CAEngine::Get等同)。
属性
{get,put} string ClassType
object (e.g., "module", "variable", "chance", etc)类型。如果你想改变对象的类型,设置属性即可。
{get} DefinitionType
关于如何定义对象的快速信息。返回:
- -1 = not parsed (为解析,例如没有定义)
- 0 = expr (指数)
- 1 = edit table(编辑表)
- 2 = prob table(概率表)
- 3 = determ table(确定性表)
- 4 = sub table(子表)
- 5 = list(清单)
- 6 = list of labels(标签清单)
- 7 = choice
- 8 = intraTable
- 9 = checkbox(复选框)
{get,put} long MethodEvaluationTimeLimit
'Analytica 4.2新特征
对 CAEngine中的方法,例如 SendCommand, Send, OpenModel和 AddModule,以及任何被实例化的 CAObject的 CAObject::MethodEvaluationTimeLimit默认值等等,指定求值计算时的大时间限制(毫秒)。
{get,put} string Name
The object's name. To rename the object, set this property to the new name.
{get,put} CARenderingStyle RenderingStyle
Settings controlling how atomic values are passed.
{get,put} ResultType
The type of the result to be return when Result or ResultTable is called.
- 0 = Mid
- 1 = Mean
- 2 = Sample
- 3 = Pdf
- 4 = Cdf
- 5 = Statistics
- 6 = ProbBands
Methods
bool CreateDefTable( [in] array(string) IndexArray )
Creates a new input table as the definition of the current object.
CATable DefTable( )
Returns a handle to an existing definition table.
CATable Evaluate( string expression )
Parses and evaluates an arbitrary Analytica expression, and returns the result as a CATable.
variant GetAttribute(string AttName )
Returns the value of the specified attribute.
bool PictureToFile( string filename, string mimeType )
Copies an object's picture to a file in the requested mime format.
bool PictureToStream(IStream stream, string mimeType)
Copies an object's picture, if any, to the stream in a requested format.
variant Result( )
Returns the result of the current object.
CATable ResultTable( )
Returns a handle to a result table for the current object.
bool SetAttribute(string AttName, variant AttValue)
Sets the specified object attribute.
See Also
| CAEngine <- | CAObject | -> CATable |
Enable comment auto-refresher