org.ogre4j
Class CompositorScriptCompiler

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

public class CompositorScriptCompiler
extends NativeObject
implements ICompositorScriptCompiler


Nested Class Summary
protected static class CompositorScriptCompiler.CompositorScriptContext
           
protected static class CompositorScriptCompiler.CompositorScriptSection
           
protected static class CompositorScriptCompiler.TokenActionMap
           
protected static class CompositorScriptCompiler.TokenID
           
 
Nested classes/interfaces inherited from interface org.ogre4j.ICompositorScriptCompiler
ICompositorScriptCompiler.ICompositorScriptContext, ICompositorScriptCompiler.ITokenActionMap
 
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
  CompositorScriptCompiler()
           
  CompositorScriptCompiler(InstancePointer p)
          This constructor is public for internal useage only!
protected CompositorScriptCompiler(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  CompositorScriptCompiler(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 for script.
 java.lang.String getClientGrammerName()
          get the name of the script BNF grammar.
 void parseScript(IDataStreamPtr stream, java.lang.String groupName)
          Compile a compositor script from a data stream using a specific resource group name.
 
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

CompositorScriptCompiler

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


CompositorScriptCompiler

protected CompositorScriptCompiler(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.


CompositorScriptCompiler

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

CompositorScriptCompiler

public CompositorScriptCompiler()
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

getClientBNFGrammer

public java.lang.String getClientBNFGrammer()
gets BNF Grammar for script.

Specified by:
getClientBNFGrammer in interface ICompiler2Pass
Specified by:
getClientBNFGrammer in interface ICompositorScriptCompiler

getClientGrammerName

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

Specified by:
getClientGrammerName in interface ICompiler2Pass
Specified by:
getClientGrammerName in interface ICompositorScriptCompiler

parseScript

public void parseScript(IDataStreamPtr stream,
                        java.lang.String groupName)
Compile a compositor script from a data stream using a specific resource group name.

Specified by:
parseScript in interface ICompositorScriptCompiler

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


Copyright © 2007 netAllied GmbH. All Rights Reserved.