org.ogre4j
Class Compiler2Pass

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Compiler2Pass
All Implemented Interfaces:
IAllocatedObject<IScriptingAllocPolicy>, ICompiler2Pass, IScriptingAllocatedObject, INativeObject

public class Compiler2Pass
extends NativeObject
implements ICompiler2Pass


Nested Class Summary
protected static class Compiler2Pass.BNF_ID
           
protected static class Compiler2Pass.LabelContainer
           
protected static class Compiler2Pass.LexemeTokenDef
           
protected static class Compiler2Pass.LexemeTokenDefContainer
           
protected static class Compiler2Pass.LexemeTokenMap
           
protected static class Compiler2Pass.OperationType
           
protected static class Compiler2Pass.SystemRuleToken
           
protected static class Compiler2Pass.TokenInst
           
protected static class Compiler2Pass.TokenInstContainer
           
protected static class Compiler2Pass.TokenRule
           
protected static class Compiler2Pass.TokenRuleContainer
           
protected static class Compiler2Pass.TokenState
           
 
Nested classes/interfaces inherited from interface org.ogre4j.ICompiler2Pass
ICompiler2Pass.ILabelContainer, ICompiler2Pass.ILexemeTokenDef, ICompiler2Pass.ILexemeTokenDefContainer, ICompiler2Pass.ILexemeTokenMap, ICompiler2Pass.ITokenInst, ICompiler2Pass.ITokenInstContainer, ICompiler2Pass.ITokenRule, ICompiler2Pass.ITokenRuleContainer, ICompiler2Pass.ITokenState, ICompiler2Pass.ITokenStateContainer
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Compiler2Pass(InstancePointer p)
          This constructor is public for internal useage only!
protected Compiler2Pass(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Compiler2Pass(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 boolean compile(java.lang.String source, java.lang.String sourceName)
          compile the source - performs 2 passes.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 java.lang.String getClientBNFGrammer()
          gets BNF Grammar.
 java.lang.String getClientGrammerName()
          get the name of the BNF grammar.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

Compiler2Pass

public Compiler2Pass(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


Compiler2Pass

protected Compiler2Pass(InstancePointer p,
                        boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


Compiler2Pass

public Compiler2Pass(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

compile

public boolean compile(java.lang.String source,
                       java.lang.String sourceName)
compile the source - performs 2 passes. First pass is to tokenize, check semantics and context. The second pass is performed by using tokens to look up function implementors and executing them which convert tokens to application specific instructions.

Specified by:
compile in interface ICompiler2Pass

getClientBNFGrammer

public java.lang.String getClientBNFGrammer()
gets BNF Grammar. Gets called when BNF grammar has to be compiled for the first time.

Specified by:
getClientBNFGrammer in interface ICompiler2Pass

getClientGrammerName

public java.lang.String getClientGrammerName()
get the name of the BNF grammar.

Specified by:
getClientGrammerName in interface ICompiler2Pass


Copyright © 2007 netAllied GmbH. All Rights Reserved.