Up Right Corbascript

Exposations in CORBA-Script

Here are some fragments I note regarding CorbaScript.
Because each Corbascript-Contributor have to investigate the Code, I invite to contribute the Investigations, so that a Corba-Script-Internalspaper could be written with less effort.

CS_Object

CS_Object is the heard of CS. There are the Operations of the virtual Machine and so on.

For each Type exists a Class-Type (string -> CS_String), to which it is transformed for working with internaly with it.
So we need a CS_CorbaFixedValue, with wie implement in cs_CorbaFixedValue.h

The possible arithmetic operations are virtual, the default operation is to throw a CS_ExcNotSupported.

A part of the class-Hierarche

              CS_Object
                  |
              CS_Value
                  |
               ----------------------------------------------------------
               |                            |      |          |         |
            CS_CorbaValue                CS_Long CS_Boolean CS_String  ....
                  |
   ------------------------------
   |                            |
CS_CorbaBasicValue       CS_CorbaFixedValue

coercing

CS_COERCE(CLASS,VALUE) (defined in os_object.h) calls CLASS::_class_type->coerce(VALUE) In all Classes there is statically defind the Variable _class_type of the type CS_Type

In os_Type.cpp for each type a list of coerce-functions is managed.

In each Child of cs_Object is a list of Functions, where this type can coerced to. (So the conversionfunktion string2fixed is inserted in the CS_String.h. Perhaps it would be more clear to model it with a table, how it is implemented.)

Short description of the modules and thier purpose:

std_typed.h
Standard types as abstraction over the programming environment
CorbaTools.h
Abstraction over the ORBS
cs_SmartTypeCode.h
ProcessSmartTypeCode : abstract Framework for processing
cs_CorbaType.h
defines CS_CorbaType

CS_CorbaType is a CS_Type and a SmartTypeCode
Perhaps here in insert_coerce is a good place for inserting coerce-functions

cs_SmartDynAny.h
SmartDynAny : encapsulation over DynAny
ProcessSmartDynAny : abstract Framework for processing
CompareDynAny : a ProcessSmartDynany for comparing ProcessSmartDynany here obsolet because 9.2.3.5 DynAnyAPI has operation equal ???
cs_DisplayTypeCode.h
DisplayTypeCode : a ProcessSmartTypeCode
cs_DisplayDynAny.h
DisplayDynAny : a ProcessSmartDynAny
cs_Find_TypeCode_Field.h
Find_TypeCode_Field : a ProcessSmartTypeCode For elemantary types it seems to return 0 String should return 1 if the name = "length" ?
cs_Set_DynAny_with_CS_Object.h
Set_DynAny_with_CS_Object a ProcessSmartDynAny
it sets a DynAny with a CS_Object.
set_from_a_complex_CorbaValue delegates it to the CorbaBasicValue-assignment operation.

The opposite is done in CS_Corba_Basic_Value.

os_types.h
Definition of all _var-Types
cs_CorbaType.h/cs_CorbaType.cpp
For each Type in Corba there a many coorce-Functions the instances are initializied in cs_Interpreter.cpp
cs_CorbaValue.h/ cs_CorbaValue.h
cs_CorbaBasicValue.h /cs_CorbaBasicValueCpp
CS_CorbaBasicValue is a CS_CorbaValue and a SmartDynAny_var
There are the convertion-funktions to the intern Types
cs_interpreter.cpp
all Types are initialisiered in CorbaScript_MainProgram::initialization ().

Because fixed-Values with diffenent Precissions are the same kind, but different typecodes, the Constructor is registered.


Informatik- und Netzwerkverein Ravensburg e.V Rudolf Weber