company logo

Dictionary :: isOperationValid - Check expression syntax

The function returns false when the operation is invalid or no valid object handle has been passed.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

  1. Check in-line operation in class scope
    bool Dictionary  :: isOperationValid ( odaba::String &sClassName, odaba::String &vExpression )

    This function checks the in-line operation passed in vExpression, which has to be defined in the scope of the class passed in sClassName. The object space on which the operation applies, is passed in cObjectSpace.

    Besides syntax checking, the function performs semantic checks in the scope of the class.

    • sClassName - Class name

      The class name is the name of an implementation class (usually) defined in the database. Class names must not exceed 40 characters.

      In order to pass no class name, an empty string ( String() ) might be passed.

    • vExpression - OSI inline expression

      An inline expression can be passed as operation path, as operand (something like a + b) or as complete expression. As operand, an expression may contain any expression, which is allowed in a statement, but no semicolon must be appended at the end.

      Complete expressions include expression header (optional) and may include different sections in the expression body which is enclosed in { ... }.

      In contrast to class expressions, inline expressions are not defined explicitly as class expressions but passed as strings to the application at run-time.

      In order to pass no expression, an empty string ( String() ) has to be passed.

  2. to list
  3. Check inline operation with different resource database
    bool Dictionary  :: isOperationValid ( odaba::String &sClassName, odaba::String &vExpression, odaba::ObjectSpace &cResourceObjectSpace )

    This function checks the inline operation passed in vExpression, which has to be defined in the scope of the class passed in sClassName. In order to check inline operation that call operations, which are not stored in the dictionary, but in another database, the object handle for the database has to be passed in rResourceObjectSpace.

    Besides syntax checking, the function performs semantic checks in the scope of the class.

    • sClassName - Class name

      The class name is the name of an implementation class (usually) defined in the database. Class names must not exceed 40 characters.

      In order to pass no class name, an empty string ( String() ) might be passed.

    • vExpression - OSI inline expression

      An inline expression can be passed as operation path, as operand (something like a + b) or as complete expression. As operand, an expression may contain any expression, which is allowed in a statement, but no semicolon must be appended at the end.

      Complete expressions include expression header (optional) and may include different sections in the expression body which is enclosed in { ... }.

      In contrast to class expressions, inline expressions are not defined explicitly as class expressions but passed as strings to the application at run-time.

      In order to pass no expression, an empty string ( String() ) has to be passed.

    • cResourceObjectSpace - Reference to resource object space

      The resource object space handle usually is a database handle, which is referred to as object space handle.

  4. to list
  5. Check class operation
    bool Dictionary  :: isOperationValid ( odaba::ObjectSpace &cResourceObjectSpace, odaba::String &sClassName, odaba::String &sExpressionName )

    The function checks the operation with the name passed in sExpressonName which has to be defined in the implementation class (ODC_ImpClass) with the name sClassName in the resource database. Note, that operations loaded from file, can not be checked with this function.

    • cResourceObjectSpace - Reference to resource object space

      The resource object space handle usually is a database handle, which is referred to as object space handle.

    • sClassName - Class name

      The class name is the name of an implementation class (usually) defined in the database. Class names must not exceed 40 characters.

      In order to pass no class name, an empty string ( String() ) might be passed.

    • sExpressionName - Expression name
  6. to list
  7. Check in-line expression
    bool Dictionary  :: isOperationValid ( odaba::String &vExpression )

    This function checks the in-line operation passed in vExpression, which has to be defined in the global scope.

    • vExpression - OSI inline expression

      An inline expression can be passed as operation path, as operand (something like a + b) or as complete expression. As operand, an expression may contain any expression, which is allowed in a statement, but no semicolon must be appended at the end.

      Complete expressions include expression header (optional) and may include different sections in the expression body which is enclosed in { ... }.

      In contrast to class expressions, inline expressions are not defined explicitly as class expressions but passed as strings to the application at run-time.

      In order to pass no expression, an empty string ( String() ) has to be passed.

  8. to list