next up previous contents
Next: Error Packagers Up: Cross Interface Requirements Previous: Datatypes   Contents


Fieldspaces

This section details the functions which a MIC-compliant fieldspace object and the fields within it must support.



DataObj new (FieldSpace)

Takes a data object of some type, which may be various depending upon the implementation and/or desired characteristics of the FieldSpace and returns a properly instantiated, yet trivial, FieldSpace object. To fully instantiate all the data, the proper fields are then requested and instantiate() is called on the FieldSpace object.

The DataObj is the encapusalator or indicator on how to retrieve and/or resolve the data necessary for proper instantiation. It may be of various types; e.g., a CGI object, some sort of database table handle, or even a simple ID string.



request_group (scalar group_name)

Must be called before instantiate() to have a defined effect, this function requests that the named group be made available in the FieldSpace object. If the group_name is unknown, a warning will be sent to stderr, but program will otherwise continue unaffected.

Making a request for `_main' is how one requests the static or root group. Requesting a dynamic group has the effect of instantiating the next set of fields from that group based on the current index numbers and the num_display var set in the MICgroup tag.



instantiate ()

Will possibly raise on exception if there are errors in instantiation.



datatype get_field (scalar field_name)


datatype $<$field name$>$ ()

Takes field_name and returns the datatype associated with the field. It may also call the field name directly, though this method is not recommended. It will not work if the name of the field is the same as any functions defined within the fieldspace implementation, which will not be enumerated here.



scalar or null deposit_state (scalar data_obj, bool internal)

This function is meant to work in conjunction with retrieve_state, though exactly what it does is highly dependent on the nature of the fieldspace. It will take the data_obj figure out all the state data that it needs to continue operation when the next page in the chain is called. The return value, if defined, should be printed out to the HTML page before the close of the form.

If the boolean internal is set to true, the function may deposit state to the data_obj, but will not expect any sort of activity on MIC's part. This is for propagation across other boundaries or sub-boundaries.



retrieve_state (scalar data_obj)

This function is called as part of the initialization process and sets the fieldspace into the proper state to comply with MIC.


next up previous contents
Next: Error Packagers Up: Cross Interface Requirements Previous: Datatypes   Contents