Servertec Java API
Content
Introduction
Release Notes
Features
FAQs
Requirements
Installation
Change Log
Future Plans
Knowledge Base
Reference Manual
Conventions
iPP
Templates
Constants
Identifiers
Operators
Directives
Macros
Java API
_init( )
_preprocess( )
_reset( )
_wrapup( )
directiveDelimiter
define( )
displayLogo
embeddedQuotes
generateLineDirectives
getDefinition( )
getFileName( )
getIdentifiers( )
getLine( )
getLineNumber( )
getVersion( )
isDefined( )
isMacro( )
lineDelimiter
main( )
pp( )
preprocess( )
removeBlankLines
removeComments
searchPath
undefine( )
verboseMessages
warningMessages

Legal
Contact Us

 

iPP can be directly accessed from Java using the following API.

API

    Category Description
    Classes
    pp( ) Constructs a new pp object.
    Variables
    directiveDelimiter Used to access the directive delimiter.
    displayLogo Used to set whether to display the copyright message.
    embeddedQuotes Used to set whether to support embedded quotes.
    generateLineDirectives Used to set whether to generate #line directives.
    lineDelimiter Used to access the line separator.
    removeComments Used to set whether user comments are to be preserved or removed.
    removeBlankLines Used to set whether blank lines are to be preserved or removed.
    searchPath The search path used by include directives.
    verboseMessages Used to set whether to display verbose error messages.
    warningMessages Used to set whether to display warnings.
    Methods
    _init( ) Used to initialize the preprocessor.
    _preprocess( ) Used to preprocess the give item without initializing the preprocessor before processing the item and without cleaning up the preprocessor after processing the item.
    _reset( ) Used to reset the preprocessor.
    _wrapup( ) Used to cleanup the preprocessor.
    define( ) Used to define a new identifier or macro or redefine the value of an existing one.
    getDefinition( ) Returns the definition associated with the specified identifier.
    getFileName( ) Returns the file name of the file currently being processed.
    getIdentifiers( ) Returns an enumeration of the identifiers.
    getLine( ) Returns the line being preprocessed.
    getLineNumber( ) Returns the current line number.
    getVersion( ) Returns the current version.
    isDefined( ) Returns whether the specified identifier is defined.
    isMacro( ) Returns whether the specified identifier is defined as a macro.
    main( ) Entry point from command line.
    preprocess( ) Used to preprocess a given item.
    undefine( ) Used to remove an existing identifier.

API

    Requires that stec.pp.pp be imported.

Example

    import stec.pp.pp;
    
    public class tPP
    {
        public static void main(String args[]) throws Exception
        {
            pp mypp = new pp();
            
            mypp.displayLogo = false;
    
            System.out.println
            (
                mypp.preprocess("#message Hello World")
            );
        }    
    }
    

Example

    import stec.pp.pp;
    
    public class tPP
    {
        public static void main(String args[]) throws Exception
        {
            pp mypp = new pp();
            mypp._init();
    
            mypp.displayLogo = false;
    
            System.out.println
            (
                mypp._preprocess("#message Hello") +
                mypp._preprocess("#message World")
            );
    
            mypp._wrapup();
        }    
    }
    
 top of page
Copyright © 1998-2005 Servertec. All rights reserved.
Privacy Statement.
Last Modified: Sun Sep 04 14:56:03 EDT 2005