Returns the ruleSchemaID that uniquely identifies an EDMruleSchema in the EDMdatabase.
EXPRESS:
ENTITY rule_schema;
name : STRING;
constants : SET OF user_constant;
types : SET OF rule_schema_defined_type;
entities : SET OF rule_schema_entity;
functions : SET OF rule_schema_function;
procedures : SET OF rule_schema_procedure;
rules : SET OF rule_schema_rule;
uniqueness_rules : SET OF rule_schema_uniqueness_rule;
used_built_in_functions : OPTIONAL SET OF INTEGER;
instances : SET OF entity_instance;
schema_instance : schema_instance;
global_variables : OPTIONAL algorithm_head;
line_number : INTEGER;
first_line : INTEGER;
last_line : INTEGER;
END_ENTITY;
Related functions: edmiDefineRuleSchema , edmiDeleteRuleSchema , and edmiDeleteSchema
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetRuleSchema (SdaiString schemaName,
SdaiString ruleSchemaName,
SdaiRuleSchema *ruleSchemaId);
Arguments:
schemaName |
Specifies the name of the dictionary model (EXPRESS schema) that hosts the rule schema. This EXPRESS schema must exist as a dictionary model in the EDMdatabase . Schema names are case insensitive. Schema names are unique in an EDMdatabase . |
ruleSchemaName |
Specifies the name of rule schema of interest. Rule schema names are case insensitive. Rule schema names are unique in an EDMdatabase . |
*ruleSchemaId |
Address of the variable that will receive the numeric ruleSchemaID that uniquely identifies the rule schema instance in the EDMdatabase . |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiRuleSchema ruleSchemaId;
EdmiError rstat;
. . .
if (rstat = edmiGetRuleSchema ("ifc151",
"WheelChairAccess",
&ruleSchemaId)) {
/* Error in operation */
printf("\nError: %s in edmiGetRuleSchema\n",
edmiGetErrorText(rstat));
goto error;
}
printf ("\nRuleSchemaId: %lu", ruleSchemaId);
. . .