B
Brad
All:
I'm currently working on the OpenVMS platform and would like to
write an extension library that would encapsulate the different
OpenVMS file types (of which there are several beyond text and
binary).
What needs to be done is to pass additional parameters to the
underlying C api's fopen. fopen on OpenVMS contains parameters
not supported by the ANSI standard. The extra parameters are
used to open the various file formats supported by OpenVMS.
My thoughts are to:
1) Create a new class that inherits from the File class and simply
overload/override the open/new command.
2) Add new methods to the File class that support the parameters
that I neeed to pass through (still requires access to the
underlying C API)
3) Overload the open/new in File directly to allow optional parameters
to be passed through.
My question is:
- What needs to be done? I can figure out how to write a class using
the RAPI, but I'm not sure about what Ruby does behind the scenes
(i.e. internal states,etc)
Note: Only the open/new is required to be modified, all other
file I/O routines work the same as in ANSI C.
Any help would be appreciated.
Regards,
Brad
I'm currently working on the OpenVMS platform and would like to
write an extension library that would encapsulate the different
OpenVMS file types (of which there are several beyond text and
binary).
What needs to be done is to pass additional parameters to the
underlying C api's fopen. fopen on OpenVMS contains parameters
not supported by the ANSI standard. The extra parameters are
used to open the various file formats supported by OpenVMS.
My thoughts are to:
1) Create a new class that inherits from the File class and simply
overload/override the open/new command.
2) Add new methods to the File class that support the parameters
that I neeed to pass through (still requires access to the
underlying C API)
3) Overload the open/new in File directly to allow optional parameters
to be passed through.
My question is:
- What needs to be done? I can figure out how to write a class using
the RAPI, but I'm not sure about what Ruby does behind the scenes
(i.e. internal states,etc)
Note: Only the open/new is required to be modified, all other
file I/O routines work the same as in ANSI C.
Any help would be appreciated.
Regards,
Brad