Documentation for SOOP API Library v1.0
Table of Contents

Data Type System

The new way to do Types!


Okay, the reason why this is the new way to do Types, is cause, not only can you check the data, to ensure that it'll fit into the Variable/Member, it's also cause you can store the data however you like! This brings a new freedom to the program, that wasn't previously available. Some C-Structure support should be possible through this method. Future versions may have the ability to support Structures better.

  • proc Assignment( eAtom RoutineID )   Associates a Routine ID as an Assignment Call.
  • proc DataType( sfStr Name )   This begins the definition of a Data Type
  • proc DataTypeID()   Returns the Data Type ID for use.
  • proc EndDataType()   Ends the DataType Definition
  • proc NoPointer()   Dis-allows for Pointer Retrival.
  • proc Retrival( eAtom RoutineID )   Associates a Routine ID as an Retrival Call.
  • proc VarFree( eAtom RoutineID )   Associates a Routine ID as an Freeing Call.
  • proc VarInit( eAtom RoutineID )   Associates a Routine ID as an Initalization Call.

    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    Assignment
    ( eAtom RoutineID )

    Associates a Routine ID as an Assignment Call.

    Category: Data Type System

    This routine associates an Euphoria function as a handler for assigning data to the data type. All type checking, and actual storing of the data is done with the routine id given.

    See Also: DataType, DataTypeID, EndDataType, NoPointer, Retrival, VarFree, VarInit


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    DataType
    ( sfStr Name )

    This begins the definition of a Data Type

    Category: Data Type System

    The Data Type system is setup just like the Class definition system, in where you have a DataType() block much like a for loop, if elsif end if, while loop, etc etc. You start a DataType block with this, by given it a name, that can be later refrenced to when a error occurs. Like with Classes, Data Types cannot be nested. This is subject to change, to support Structures.

    See Also: Assignment, DataTypeID, EndDataType, NoPointer, Retrival, VarFree, VarInit


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    DataTypeID
    ()

    Returns the Data Type ID for use.

    Category: Data Type System

    Since Most declorations in this are procedures, you can use DataTypeID() to retrive the ID for use with the DataType system. If you do not have the ID, you cannot use it. This should generally be declared as a global constant, so that any file in your program can use it, especially if the Data Type is declared in a seperate library.

    See Also: Assignment, DataType, EndDataType, NoPointer, Retrival, VarFree, VarInit


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    EndDataType
    ()

    Ends the DataType Definition

    Category: Data Type System

    This pretty much closes the Data Type Definition block, and should be called when you are done with the data type definition.

    See Also: Assignment, DataType, DataTypeID, NoPointer, Retrival, VarFree, VarInit


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    NoPointer
    ()

    Dis-allows for Pointer Retrival.

    Category: Data Type System

    This is mainly here, so that you can prevent retrival of the Pointer to the data. This may and may not be useful, but as demonstrated with the STRING data type, it can be useful, since the memory address to the string can be used by other things, such a External Libraries.

    See Also: Assignment, DataType, DataTypeID, EndDataType, Retrival, VarFree, VarInit


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    Retrival
    ( eAtom RoutineID )

    Associates a Routine ID as an Retrival Call.

    Category: Data Type System

    This routine associates an Euphoria functon as a handler for retriving data from the data type.

    See Also: Assignment, DataType, DataTypeID, EndDataType, NoPointer, VarFree, VarInit


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    VarFree
    ( eAtom RoutineID )

    Associates a Routine ID as an Freeing Call.

    Category: Data Type System

    Much like with Memory, you have to free it to return it to the system for future use, this allows you to write a routine to associate for a data type, to do any cleanup that may or may not be needed.

    See Also: Assignment, DataType, DataTypeID, EndDataType, NoPointer, Retrival, VarInit


    Documentation for SOOP API Library v1.0
    Table of Contents

    [proc]
    VarInit
    ( eAtom RoutineID )

    Associates a Routine ID as an Initalization Call.

    Category: Data Type System

    This routine associates an Euphoria function as a handler to initalize the data type, for future usage by the system.

    See Also: Assignment, DataType, DataTypeID, EndDataType, NoPointer, Retrival, VarFree