CATKBEExpressionEngineTypes Types: BaseConcept

This package introduces the root type that is used to handle KML Objects.

This page discusses:

Inheritance Path

ObjectType
 Feature
  BaseConcept

Attributes

NameTypeComment
ObjectFeatureContains the real object equivalent to the KML one.

Methods

The following methods are associated with this type:

Example

Concept Division : BaseConcept
{
                   Attributes
                   {
                                 Inputs
                                 {
                                              Integer dividend;
                                              Integer divisor;
                                 }
                                 Outputs
                                 {
                                              Real quotient;
                                 }
                    }
                    Rules
                    {
                                  Rule
                                  {
                                               if divisor == 0
                                               {
                                                              this->PutInErrorState(TRUE)
                                                              quotient = -1
                                                              Message("Warning : Division by zero occurred !!!")
                                               }
                                              else
                                               {
                                                      Quotient = dividend / divisor
                                               }
                                   }
                    }
}
Concept Computer : BaseConcept
{
                  [...]
                  Children
                  {
                                   Division MyDivider;
                  }
                  Rules
                  {
                                   Rule
                                   {
                                                     [...]
                                                     if MyDivider.GetInErrorState() == TRUE
                                                     {
                                                                        /* The divider result is not usable,
                                                                        we ignore it and put it back to OK state
                                                                        so that the engine can continue */
                                                                        resultOfDivision = 0
                                                                        MyDivider.PutInErrorState(FALSE)
                                                      }
                                                      else
                                                      {
                                                                        resultOfDivision = MyDivider.quotient      
                                                      }
                                  }
}