This is HFunction.h in view mode; [Download] [Up]
/* HFunction.h by Paul Kunz May 1992
* Object used to store information on user defined function.
*
* Copyright (C) 1992 The Board of Trustees of
* The Leland Stanford Junior University. All Rights Reserved.
*/
#define HFUNCTION_H_ID "$Id: HFunction.h,v 2.10.2.1 1994/01/05 02:22:08 rensing Exp $"
#import <objc/Object.h>
typedef enum
{
OBJECTIVE_C, FORTRAN, CPP, ANSI_C
} LANGUAGE;
@interface HFunction:Object
{
NXStream *codeStream; /* The source code */
char *filename; /* Source code filename */
char *ofilename; /* last compiled objective filename */
char *flags; /* compile flags, such as -I */
char *outputDir; /* directory for output;if NULL, same as file*/
char *name; /* function's name */
LANGUAGE language; /* language used */
void *function; /* the function */
}
- init;
-(const char*) outputDir;
/*
* Returns the OutputDir of the saved source file.
*/
- setOutputDir:(const char *)fname;
/*
* set the OutputDir
*/
-(const char*) filename;
/*
* Returns the filename of the saved source file.
*/
- setFileName:(const char *)fname;
/*
* set the filename
*/
- (void *) funcPointer;
/*
* return the function pointer
*/
- initFromDirectory:(const char *)path;
/*
* Opens the source file in directory path.
*/
- (const char *) functionName;
/*
* Returns the name of the function.
*/
- setFunctionName:(const char *)name;
/*
* Set the name of the function.
*/
- getFunctionFrom:sender;
/*
* The receiver is notified that it should retreive the function
* pointer from sender. Normally, this is done at the end of
* the dynamic linking step.
*/
- (LANGUAGE) language;
/*
* Returns the function's programming language
*/
- setLanguage: (LANGUAGE)lang;
/*
* set the language
*/
- setCompileFlags: (const char *)flags;
/*
* set the compile flags
*/
- (const char *) compileFlags;
/*
* returns the compile flags string
*/
- (int) saveToTmpFile;
/*
* Saves the source code of the function to file in the form
* /tmp/nameXXXXXXX.c where XXXXXX is replace with unique number.
* Returns -1 if an error occurred while saving the file or 0 otherwise.
*/
- saveToDirectory:(const char *) directory;
/*
* Saves the source code stream in the directory.
*/
- (int) compile;
/*
* Compiles the function and return 0 if successful.
*/
- (int) link;
/*
* Links the last compiled version with the running application.
*/
- (int) unload;
/* Uses rld_unload to unlink and unload the last object that was loaded.
* (see rld(3) ). WARNING: because rld_unload() unloads the last
* object, this method must be invoked before the next object is loaded.
*/
- (NXStream *) openMessages;
/*
* Returns the NXStream containing compiler, linker, or other
* error messages.
*/
- write:(NXTypedStream *)ts;
- read:(NXTypedStream *)ts;
- free;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.