Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Preloading.StubElementClassNotFound Class Reference

Stub for an element with unknown object class. More...

Inheritance diagram for Dragengine.Preloading.StubElementClassNotFound:
Dragengine.Preloading.StubElement Dragengine.Preloading.StubWithProperties

Public Member Functions

void createAndAddElement (GameWorld gameWorld)
 Always throws an exception.
Element createElement ()
 Always throws an exception.
void loadAndAddElement (PersistencyEnvironment env, FileReader reader, GameWorld gameWorld)
 Always throws an exception.
Element loadElement (PersistencyEnvironment env, FileReader reader)
 Always throws an exception.
StubElementClassNotFound new (String eclassName)
 Create element stub.
StubElementClassNotFound new (String eclassName, UniqueID id)
 Create element stub.
StubElementClassNotFound new (String eclassName, UniqueID id, StubWithProperties properties)
 Create element stub.
StubElementClassNotFound new (StubElement stub)
 Create copy of element stub.
bool verifyPreloading (Console console)
 Verify if a resource failed preloading and print the problems to the console.
void writeToFile (FileWriter writer)
 Always throws an exception.
Public Member Functions inherited from Dragengine.Preloading.StubElement
void addAttachableBehavior (String factoryId)
 Add attachable behavior.
void forEachAttachableBehavior (Block ablock)
 Visit attachable behaviors using block.
void forEachTexture (Block ablock)
 Visit textures with a block.
UniqueID getAttachTo ()
 Identifier of object to attach to once added to a game world.
Connection getConnection ()
 Connection to server or or null.
bool getEnableNetworking ()
 Enable networking for this stub.
UniqueID getID ()
 Unique identifier of object.
DMatrix getMatrix ()
 Stub matrix.
NetworkState getNetworkState ()
 Network state provided by server or null.
DVector getPosition ()
 Position.
Vector getRotation ()
 Rotation.
Vector getScaling ()
 Scaling if sizable.
StubElementTexture getTextureAt (int index)
 Texture at index.
int getTextureCount ()
 Number of textures.
StubElementTexture getTextureNamed (String name)
 Named texture or null if not found.
StubElement new (ElementClass eclass)
 Create element stub.
StubElement new (ElementClass eclass, UniqueID id)
 Create element stub.
StubElement new (ElementClass eclass, UniqueID id, StubWithProperties properties)
 Create element stub.
void preloadResources ()
 Preload resources.
void removeAllAttachableBehaviors ()
 Remove all attachable behaviors.
void removeAllTextures ()
 Remove all textures.
void removeAttachableBehavior (String factoryId)
 Remove attachable behavior.
void removeTexture (StubElementTexture texture)
 Remove texture.
void setAttachTo (UniqueID id)
 Set dentifier of object to attach to once added to a game world.
void setClass (ElementClass elementClass)
 Set element class.
void setConnection (Connection connection)
 Set connection to server or null.
void setEnableNetworking (bool enable)
 Set if networking is enabled for this stub.
void setID (UniqueID id)
 Set unique identifier of object.
void setNetworkState (NetworkState networkState)
 Set network state provided by server or null.
void setPosition (DVector position)
 Set position.
void setRotation (Vector rotation)
 Set rotation.
void setScaling (Vector scaling)
 Set scaling if sizable.
Public Member Functions inherited from Dragengine.Preloading.StubWithProperties
Dictionary getProperties ()
 Copy of all properties as dictionary mapping String key to String value.
bool getPropertyBoolFor (String key, bool default)
 Boolean property value or default value if absent.
int getPropertyCount ()
 Number of properties.
float getPropertyFloatFor (String key, float default)
 Floating point property value or default value if absent.
int getPropertyIntFor (String key, int default)
 Integer property value or default value if absent.
Array getPropertyKeys ()
 Property keys (String array).
String getPropertyValueFor (String key, String default)
 Value of property or default value if absent.
bool hasPropertyWithKey (String key)
 Property key is present.
StubWithProperties new ()
 Create stub with properties.
StubWithProperties new (StubWithProperties stub)
 Create copy of stub with properties.
void readPropertiesFromFile (FileReader reader)
 Read properties from file.
void removeAllProperties ()
 Remove all properties.
void removePropertyWithKey (String key)
 Remove property if present.
void setFrom (Dictionary properties)
 Set all properties from dictionary mapping String key to String value.
void setFrom (StubWithProperties properties)
 Set properties from another StubWithProperties.
void setPropertyBoolFor (String key, bool value)
 Set property.
void setPropertyFloatFor (String key, float value)
 Set property.
void setPropertyIntFor (String key, int value)
 Set property.
void setPropertyValueFor (String key, String value)
 Set property.
void writePropertiesToFile (FileWriter writer)
 Write properties to file.

Static Public Member Functions

static StubElement readFromFile (FileReader reader, ElementClassList ElementClassList)
 Always throws an exception.

Additional Inherited Members

Public Attributes inherited from Dragengine.Preloading.StubElement
Array pAddAttachableBehaviors
ElementClass pClass
Connection pConnection
PreloadCounter pCounter
bool pEnableNetworking
UniqueID pID
DMatrix pMatrix
NetworkState pNetworkState
DVector pPosition
Vector pRotation
Array pTextures
Public Attributes inherited from Dragengine.Preloading.StubWithProperties
Dictionary pProperties
 Properties.

Detailed Description

Stub for an element with unknown object class.

Used during asynchronous loading to keep track of missing element classes so they can be reported all at once instead of only the first one encountered.

Extends StubElement.verifyPreloading() to log the problem. All attempts to create the element will thrown an exception. The missing element class is temporarily created and stored only in the stub for error printing.

Member Function Documentation

◆ createAndAddElement()

void Dragengine.Preloading.StubElementClassNotFound.createAndAddElement ( GameWorld gameWorld)

Always throws an exception.

Reimplemented from Dragengine.Preloading.StubElement.

Referenced by readFromFile().

◆ createElement()

Element Dragengine.Preloading.StubElementClassNotFound.createElement ( )

Always throws an exception.

References verifyPreloading().

Referenced by loadAndAddElement().

◆ loadAndAddElement()

void Dragengine.Preloading.StubElementClassNotFound.loadAndAddElement ( PersistencyEnvironment env,
FileReader reader,
GameWorld gameWorld )

Always throws an exception.

Reimplemented from Dragengine.Preloading.StubElement.

References createElement(), and new().

Referenced by writeToFile().

◆ loadElement()

Element Dragengine.Preloading.StubElementClassNotFound.loadElement ( PersistencyEnvironment env,
FileReader reader )

Always throws an exception.

Reimplemented from Dragengine.Preloading.StubElement.

Referenced by writeToFile().

◆ new() [1/4]

StubElementClassNotFound Dragengine.Preloading.StubElementClassNotFound.new ( String eclassName)

Create element stub.

References new().

Referenced by loadAndAddElement(), new(), new(), new(), new(), and writeToFile().

◆ new() [2/4]

StubElementClassNotFound Dragengine.Preloading.StubElementClassNotFound.new ( String eclassName,
UniqueID id )

Create element stub.

References new().

◆ new() [3/4]

StubElementClassNotFound Dragengine.Preloading.StubElementClassNotFound.new ( String eclassName,
UniqueID id,
StubWithProperties properties )

Create element stub.

References new().

◆ new() [4/4]

StubElementClassNotFound Dragengine.Preloading.StubElementClassNotFound.new ( StubElement stub)

Create copy of element stub.

Reimplemented from Dragengine.Preloading.StubElement.

References new(), and Dragengine.Preloading.StubWithProperties.setFrom().

◆ readFromFile()

StubElement Dragengine.Preloading.StubElementClassNotFound.readFromFile ( FileReader reader,
ElementClassList ElementClassList )
static

Always throws an exception.

Reimplemented from Dragengine.Preloading.StubElement.

References createAndAddElement().

Referenced by writeToFile().

◆ verifyPreloading()

bool Dragengine.Preloading.StubElementClassNotFound.verifyPreloading ( Console console)

Verify if a resource failed preloading and print the problems to the console.

In addition to StubElement.verifyPreloading() logs the missing element class and always returns false.

Referenced by createElement().

◆ writeToFile()

void Dragengine.Preloading.StubElementClassNotFound.writeToFile ( FileWriter writer)

Always throws an exception.

Reimplemented from Dragengine.Preloading.StubElement.

References loadAndAddElement(), loadElement(), new(), readFromFile(), and writeToFile().

Referenced by writeToFile().


The documentation for this class was generated from the following file: