TinmanModule
Description
- Derived from
- Extended by
-
TinmanAddOnsDirectX11Module sealed
TinmanAddOnsDirectX12Module sealed
TinmanAddOnsDirectX9Module sealed
TinmanAddOnsModule sealed
TinmanCoreModule sealed
TinmanDemoModule sealed
TinmanDemoStandAloneModule sealed
TinmanEngineModule sealed
TinmanGpuModule sealed
TinmanProcessorModule sealed
TinmanTerrainModule sealed
Abstract base class for Tinman module descriptors.
Public / Constants
Public / Methods
AddConfigDocumentation
Adds the given config documentation to the associated module.
This method uses For to obtain the associated TinmanModule object. If ConfigDocumentation returns null
, the given config documentation is set.
Initialize
Initializes the Tinman 3D library.
Before calling this method, call IPleaseIncludeInBinaryThanks.PleaseIncludeInBinaryThanks on the top-level module(s) of the enclosing application. Then, based on the collected module dependencies (see Dependencies), this method will call IPleaseIncludeInBinaryThanks.PleaseIncludeInBinaryThanks and DoInitialize on all modules.
This method may be called repeatedly, subsequent invocations have no effect, except that they will initialize those TinmanModule instances that have been created since the most recent call to Initialize, for example after loading a plugin library.
- LicenceException
-
If LicenceDomain.Tinman is still locked.
- See also
PrepareResource
2 overloads
Prepares a binary resource for being embedded in the source code as a base-85 string literal.
Prepared resource data can only be read by modules that have the same Guid as the given guid in.
- IOException
-
If an I/O error has occurred.
Prepares a binary resource for being embedded in the source code as a base-85 string literal.
Prepared resource data can only be read by modules that have the same Guid as the given guid in.
- IOException
-
If an I/O error has occurred.
- See also
Resource
2 overloads
Returns the canonical path to the given embedded resource.
- IOException
-
If the given resourceName in is not a valid path name.
- See also
Returns the canonical path to the given embedded resource.
The canonical resource path is constructed as follows:
-
The given resourceName in path is made relative by calling Path.ToRelative.
-
The root selector (if any) is removed from resourceName in by calling Path.ToRootSelector1.
-
The resulting path is constructed by appending the following components:
res:/{moduleName}/{resourceName}
where
moduleName
is BuildInformation.ModuleName of Info andresourceName
is the result of steps 1 and 2.
For example, the canonical resource path for a resourceName in of Resources/MyData.bin
in a module named My.Own.Module
would be:
res:/My.Own.Module/Resources/MyData.bin
Shutdown
Shuts down the Tinman 3D library.
Before calling this method, make sure to relinquish ownership of all IDisposable objects. This method will call DoShutdown on all modules.
This method may be called repeatedly, subsequent invocations have no effect.
Public / Attributes
IsDebug
Has this module been compiled in DEBUG
mode?
For DEBUG
mode, code optimization is disabled and no runtime checks are performed, see InvalidArgumentException and FailedAssertionException.
- See also
IsInitialized
Checks if the Tinman 3D library has been initialized.
If new TinmanModule instances have become available after initializating, the Initialize method needs to be called again in order to initialize the new modules.
Settings
Canonical path to directory where to put application-specific settings for the current user.
The directory will be created, if necessary.
- IOException
-
If an I/O error has occurred.
Protected / Methods
AssertDebug
This is a fake assertion method which never throws an exception but instead sets the debug mode flag for this module when called (which by definition of an assertion method, only happens in debug mode).
CollectDependencies
Collects those TinmanModule module descriptors this module directly depends on.
CollectSystemInfo
Collects textual system information for debugging purposes.
- IOException
-
If an I/O error has occurred while writing to writer in.
DoInitialize
Initializes this Tinman module.
Overriding methods may use RegisterResource to add files to the in-memory filesystem for embedded resources (res:/
), see Resource2.
- LicenceException
-
If LicenceDomain.Tinman is still locked.
RegisterResource
Registers an embedded binary resource.
A TinmanModule class may call this method from DoInitialize. If the call is made from another site, the resource cannot be found or the ZIP archive is corrupt, an error log message is generated and the method returns silently.
- See also
RegisterResources
Registers the given embedded resources.
This method delegates to EmbeddedResource.Register, which in turn delegates to RegisterResource.
Protected / Attributes
pleaseIncludeInBinaryThanks
Subclasses may increment this dummy counter from within IPleaseIncludeInBinaryThanks.PleaseIncludeInBinaryThanks in order to prevent overly aggressive code optimizations that may alter the order of initialization.