Difference between revisions of "CAObject"

 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:ADE Classes]]
 
[[Category:ADE Classes]]
<< [[Analytica Decision Engine (ADE) API]]
+
[[Category:ADE User Guide]]
 +
<languages />
 +
<translate>
 +
<!--T:1-->
 +
[[ADE User Guide]] > [[ADE Server Class Reference]] >
  
= class CAObject (ADE) =
+
<!--T:2-->
 +
A CAObject is ADE's wrapper for an Analytica object, such as a variable or module. It provides access the the object's attributes, including its definition and result. It often is used as a stepping stone for obtaining a variable's result table.
  
A CAObject is ADE's wrapper for an Analytica object, such as a variable or module.   
+
=Creation= <!--T:3-->
It provides access the the object's attributes, including its definition and result.
+
A CAObject instance cannot be created directlyYou must obtain a CAObject as the return results of other methods. The most common method used to obtain a CAObject is [[CAEngine::GetObjectByName]] (or its synonym, [[CAEngine::Get]]).
It often is used as a stepping stone for obtaining a variable's result table.
 
  
= Properties =
+
= Properties = <!--T:4-->
  
=== {get,put} string [[CAObject::ClassType|ClassType]] ===
+
=== {get,put} string [[CAObject::ClassType|ClassType]] === <!--T:5-->
  
 +
<!--T:6-->
 
The class of the object (e.g., "module", "variable", "chance", etc).   
 
The class of the object (e.g., "module", "variable", "chance", etc).   
 
If you want to change the object's class, set the property.
 
If you want to change the object's class, set the property.
  
=== {get} [[CAObject::DefinitionType|DefinitionType]] ===
+
=== {get} [[CAObject::DefinitionType|DefinitionType]] === <!--T:7-->
  
 +
<!--T:8-->
 
Quick info about how the object is defined.  Returns:
 
Quick info about how the object is defined.  Returns:
 
:-1 = not parsed (e.g., no definition)  
 
:-1 = not parsed (e.g., no definition)  
Line 30: Line 36:
 
:9  = checkbox
 
:9  = checkbox
  
=== {get,put} string [[CAObject::Name|Name]] ===
+
=== {get,put} long [[CAObject::MethodEvaluationTimeLimit|MethodEvaluationTimeLimit]] === <!--T:9-->
  
 +
<!--T:10-->
 +
''new to Analytica 4.2''
 +
 +
<!--T:11-->
 +
Specifies a maximum time limit in milliseconds on evaluations that occur from this [[CAObject]] by methods [[CAObject::Result|Result]], [[CAObject::ResultTable|ResultTable]], or [[CAObject::Evaluate|Evaluate]].  A value of 0 means no time limit.  The value is initialized to [[CAEngine::DefaultEvaluationTimeLimit]].
 +
 +
=== {get,put} string [[CAObject::Name|Name]] === <!--T:12-->
 +
 +
<!--T:13-->
 
The object's name.  To rename the object, set this property to the new name.
 
The object's name.  To rename the object, set this property to the new name.
  
=== {get,put} [[CARenderingStyle]] [[RenderingStyle]] ===
+
=== {get,put} [[CARenderingStyle]] [[CAObject::RenderingStyle|RenderingStyle]] === <!--T:14-->
  
 +
<!--T:15-->
 
Settings controlling how atomic values are passed.
 
Settings controlling how atomic values are passed.
  
=== {get,put} [[CAObject::ResultType|ResultType]] ===
+
=== {get,put} [[CAObject::ResultType|ResultType]] === <!--T:16-->
  
The type of the result to be return when [[CAEngine::Result]] or [[CAEngine::ResultTable]] is called.
+
<!--T:17-->
 +
The type of the result to be return when [[CAObject::Result|Result]] or [[CAObject::ResultTable|ResultTable]] is called.
 
:0 = Mid
 
:0 = Mid
 
:1 = Mean
 
:1 = Mean
Line 48: Line 65:
 
:5 = Statistics
 
:5 = Statistics
 
:6 = ProbBands
 
:6 = ProbBands
 
  
= Methods =
+
= Methods = <!--T:18-->
  
=== bool [[CAObject::CreateDefTable|CreateDefTable]]( [in] array(string) IndexArray ) ===
+
=== bool [[CAObject::CreateDefTable|CreateDefTable]]( [in] array(string) IndexArray ) === <!--T:19-->
  
 +
<!--T:20-->
 
Creates a new input table as the definition of the current object.
 
Creates a new input table as the definition of the current object.
  
=== [[CATable]] [[CAObject::DefTable|DefTable]]( ) ===
+
=== [[CATable]] [[CAObject::DefTable|DefTable]]( ) === <!--T:21-->
  
 +
<!--T:22-->
 
Returns a handle to an existing definition table.
 
Returns a handle to an existing definition table.
  
=== [[CATable]] [[CAObject::Evaluate|Evaluate]]( string expression ) ===
+
=== [[CATable]] [[CAObject::Evaluate|Evaluate]]( string expression ) === <!--T:23-->
  
 +
<!--T:24-->
 
Parses and evaluates an arbitrary Analytica expression, and returns the result as a [[CATable]].
 
Parses and evaluates an arbitrary Analytica expression, and returns the result as a [[CATable]].
  
=== variant [[CAObject::GetAttribute|GetAttribute]](string AttName ) ===
+
=== variant [[CAObject::GetAttribute|GetAttribute]](string AttName ) === <!--T:25-->
  
 +
<!--T:26-->
 
Returns the value of the specified attribute.
 
Returns the value of the specified attribute.
  
=== bool [[CAObject::PictureToFile|PictureToFile]]( string filename, string mimeType ) ===
+
=== bool [[CAObject::PictureToFile|PictureToFile]]( string filename, string mimeType ) === <!--T:27-->
  
 +
<!--T:28-->
 
Copies an object's picture to a file in the requested mime format.
 
Copies an object's picture to a file in the requested mime format.
  
=== bool [[CAObject::PictureToStream|PictureToStream]](IStream stream, string mimeType) ===
+
=== bool [[CAObject::PictureToStream|PictureToStream]](IStream stream, string mimeType) === <!--T:29-->
  
 +
<!--T:30-->
 
Copies an object's picture, if any, to the stream in a requested format.
 
Copies an object's picture, if any, to the stream in a requested format.
  
=== variant [[CAObject::Result]]( ) ===
+
=== variant [[CAObject::Result|Result]]( ) === <!--T:31-->
  
 +
<!--T:32-->
 
Returns the result of the current object.
 
Returns the result of the current object.
  
=== [[CATable]] [[CAObject::ResultTable]]( ) ===
+
=== [[CATable]] [[CAObject::ResultTable|ResultTable]]( ) === <!--T:33-->
  
 +
<!--T:34-->
 
Returns a handle to a result table for the current object.
 
Returns a handle to a result table for the current object.
  
== bool [[CAObject::SetAttribute|SetAttribute]](string AttName, variant AttValue) ===
+
=== bool [[CAObject::SetAttribute|SetAttribute]](string AttName, variant AttValue) === <!--T:35-->
 
 
 
Sets the specified object attribute.
 
Sets the specified object attribute.
 +
 +
= See Also = <!--T:36-->
 +
 +
<!--T:37-->
 +
* [[How to Abort an ADE Computation]]
 +
 +
<!--T:38-->
 +
{| style="margin: 1em auto 1em auto;width: 100%;border:0;table-layout: fixed;" cellpadding=5
 +
|- style="text-align: center"
 +
|  [[CAEngine]]  <-  ||  [[CAObject]] || -> [[CATable]]
 +
|}
 +
</translate>

Latest revision as of 18:34, 22 July 2015

Other languages:
English • ‎中文

ADE User Guide > ADE Server Class Reference >

A CAObject is ADE's wrapper for an Analytica object, such as a variable or module. It provides access the the object's attributes, including its definition and result. It often is used as a stepping stone for obtaining a variable's result table.

Creation

A CAObject instance cannot be created directly. You must obtain a CAObject as the return results of other methods. The most common method used to obtain a CAObject is CAEngine::GetObjectByName (or its synonym, CAEngine::Get).

Properties

{get,put} string ClassType

The class of the object (e.g., "module", "variable", "chance", etc). If you want to change the object's class, set the property.

{get} DefinitionType

Quick info about how the object is defined. Returns:

-1 = not parsed (e.g., no definition)
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

new to Analytica 4.2

Specifies a maximum time limit in milliseconds on evaluations that occur from this CAObject by methods Result, ResultTable, or Evaluate. A value of 0 means no time limit. The value is initialized to CAEngine::DefaultEvaluationTimeLimit.

{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
Comments


You are not allowed to post comments.