IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Neural.Applications.AnnApp Class Reference

Application class for the current application. More...

+ Inheritance diagram for IG.Neural.Applications.AnnApp:
+ Collaboration diagram for IG.Neural.Applications.AnnApp:

Public Member Functions

 AnnApp ()
 
override void ParseCommandlineArguments (string[] args)
 Parses command-line arguments. More...
 
void SetWorkingDirectoryCustom ()
 Sets working directory to the custom model directory, which is defined by the command line argument following the StrDirectoryCustom argument (i.e. the directory argument). More...
 
void SetWorkingDirectoryDefault ()
 Sets working directory to the default model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname. More...
 
void SetWorkingDirectoryConvection2d ()
 Sets working directory to the 2D casting model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname. More...
 
void SetWorkingDirectoryCasting ()
 Sets working directory to the casting model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname. More...
 
void SetWorkingDirectoryProcessChain ()
 Sets working directory to the casting model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname. More...
 
void SetWorkingDirectoryTestModel ()
 Sets working directory to the test model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname. More...
 
override void LaunchInitNotice ()
 Launches initialization notice. More...
 
- Public Member Functions inherited from IG.Lib.App
 App (string programName, int version, int subVersion)
 Constructs a new application object. More...
 
 App (string programName, int version, int subVersion, string release)
 Constructs a new application object. More...
 
 App (string programName, int version, int subVersion, int subSubVersion, string release)
 Initializes the global data for the current program. More...
 
 App (string programName, string codeName, int version, int subVersion, string release)
 Initializes the global data for the current program. More...
 
 App (string programName, string codeName, int version, int subVersion, int subSubVersion, string release)
 Constructs a new application object. More...
 
void SetCommandlineArguments (string[] args)
 Sets command-line arguments of the application. More...
 
void AddModule (Module m)
 Adds the specified module to the application's list of modules. More...
 
void RemoveModule (Module m)
 Removes the specified module to the application's list of modules. More...
 
override string ToString ()
 
- Public Member Functions inherited from IG.Lib.ModuleBase
DateTime CalculateCreationTime ()
 Calculates program creation time of the current executable (the entry assembly) and returns it. More...
 
DateTime CalculateCreationTime (Type type)
 Calculates creation time of the assembly containing the specified class and returns it. More...
 
virtual bool CheckSoftwareRootValidity (string rootpath)
 Verifies whether the specified directory is a valid software root directory. Global is verified by the standard identtification file that was put into the directory at its creation. More...
 
string ToStringShort ()
 Retrurns a short string containing very basic information about the application or module. More...
 
override string ToString ()
 Returns a string containing basic data of the module or application. More...
 
virtual List< String > NoticeShort ()
 Returns a list of text lines introducing the module or application in a condensed way. More...
 
virtual List< String > Notice ()
 Returns a list of text lines introducing the module or application in. More...
 
virtual List< String > Notice (bool useCodename, bool printVersion, bool printRelease, bool printAuthor, bool printAuthorAddress, bool printWebPage, bool printEmail)
 Returns a list of text lines introducing the module or application. More...
 

Static Public Member Functions

static void Init (string[] args)
 Initializes application with command-line arguments. More...
 
static void Init ()
 Initializes global application data for the current class of application. More...
 
- Static Public Member Functions inherited from IG.Lib.ModuleBase
static string DecorationFrameAsterisk (List< string > lines, int indent, int padLeft, int padRight, int padTop, int padBottom)
 Returns a string containing the specified text lines in a single frame made of asterisks. More...
 
static string DecorationFrameDoubleAsterisk (List< string > lines, int indent, int padLeft, int padRight, int padTop, int padBottom)
 Returns a string containing the specified text lines in a double frame made of asterisks. More...
 
static string DecorationFrame (List< string > lines, int indent, int padLeft, int padRight, int padTop, int padBottom, char frameChar, int thickness)
 Returns a string containing the specified text lines in a frame made of one or more layers of equal characters. More...
 
static string DecorationFrameDashed (List< string > lines, int indent, int padLeft, int padRight, int padTop, int padBottom)
 Returns a string containing the specified text lines in a frame made of a single layers of dashes ('-') and vertical bars ('|'). More...
 
static string DecorationFrameDoubleDashed (List< string > lines, int indent, int padLeft, int padRight, int padTop, int padBottom)
 Returns a string containing the specified text lines in a frame made of a double layers of dashes ('-') and vertical bars ('|'). More...
 
static void AddDefaultAssembliesExtShellApp ()
 Appends list of assemblies for dynamic testing of software in the ExtShellApp project. More...
 
static void AddDefaultAssembliesExtNeuralApp ()
 Appends list of assemblies for dynamic testing of software in the ExtNeuralApp project. More...
 
static void AddDefaultAssembliesExtShellAppExt ()
 Appends list of assemblies for dynamic testing of software in the ExtShellAppExt project. More...
 

Public Attributes

string WorkingDirectory
 Application's working directory. More...
 
bool IsNormalMode = true
 Whether application should be started in normal mode. More...
 
bool IsVerbose = false
 Whether application is in verbose mode. More...
 
bool IsDirectoryCustom = false
 Whether the working directory is set to the custom directory that is defined by the next argument. More...
 
string CustomDirectory = null
 Custom directory as specified by the arguments. More...
 
bool IsDirectoryDefault = false
 Whether the working directory is set to the default model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname. More...
 
bool IsDirectoryConvection2d = false
 Whether the working directory is set to the default 2D convection model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname. More...
 
bool IsDirectoryCasting = false
 Whether the working directory is set to the casting model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname. More...
 
bool IsDirectoryProcessChain = false
 Whether the working directory is set to the process chain model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname. More...
 
bool IsDirectoryTestModel = false
 Whether the working directory is set to the test model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname. More...
 
bool IsDevelopMode = false
 Code in development is run (only for internal use, not mature for deployment). More...
 
bool IsExperimentalMode = false
 Experimental code (pre-development stage) is run (only for internal use, not mature for deployment). More...
 
bool IsOldTestMode = false
 Old test parametric demo is run (a different form). More...
 
bool IsPredictionMode = false
 Only prediction window is opened. More...
 
bool IsOldMode = false
 Old parametric demo written by Tadej is run. More...
 
bool IsOldTadejMode = false
 Very old parametric demo written by Tadej is run. More...
 
const string ModelBaseDirname = "neuralmodels"
 Name of the subdirectory of executable directory where models are located. More...
 
const string ModelDirDefault = "default"
 Name of the default model subdirectory. More...
 
const string ModelDirConvection2d = "convection2d"
 Name of the 2D convection model subdirectory. More...
 
const string ModelDirCasting = "casting"
 Name of the casting model subdirectory. More...
 
const string ModelDirProcessChain = "processchain"
 Name of the process chain model subdirectory. More...
 
const string ModelDirTestModel = "testmodel"
 Name of the test model subdirectory. More...
 
- Public Attributes inherited from IG.Lib.App
int _numCommandlineArguments
 
- Public Attributes inherited from IG.Lib.ModuleBase
XmlDocument Data =null
 
const string DefaultModuleName = "Test Library"
 
const int DefaultVersion = 0
 
String Email = null
 
String[] Authors = null
 
bool _expires = true
 

Protected Member Functions

override void BeforeInitialization ()
 Pre-initialization stage. More...
 
override void AfterInitialization ()
 A method called after any s initializations in constructors. Override this method in derived classes in order to achieve different behavior. More...
 
- Protected Member Functions inherited from IG.Lib.App
virtual void InitProgram (string programName, string codeName, int version, int subVersion, int subSubVersion, string release)
 Constructs a new application object. More...
 
int FindModuleIndex (Module m)
 
- Protected Member Functions inherited from IG.Lib.ModuleBase
void InitModuleBase (string name, string codeName, int version, int subVersion, int subSubVersion, string release)
 Performs complete initialization of the program or module, including the pre-initialization and post-initialization steps. More...
 
virtual string ToCodeName (string Name)
 Converts a module or program name to a valid code name. More...
 

Protected Attributes

const string StrVerbose = "-verbose"
 
const string StrDirectoryCustom = "-dir"
 
const string StrDirectoryDefault = "-dirdefault"
 
const string StrDirectoryConvection2d = "-dirconvection2d"
 
const string StrDirectoryCasting = "-dircasting"
 
const string StrDirectoryProcessChain = "-dirprocesschain"
 
const string StrDirectoryTestmodel = "-dirtestmodel"
 
const string StrDevelop = "-develop"
 
const string StrExperimental = "-experimental"
 
const string StrOldTest = "-oldtest"
 
const string StrPrediction = "-prediction"
 
const string StrOld = "-old"
 
const string StrOldTadej = "-oldtadej"
 
- Protected Attributes inherited from IG.Lib.App
string[] _commandLineArguments
 
List< Module_modules = new List<Module>()
 
- Protected Attributes inherited from IG.Lib.ModuleBase
const int DD = 06
 
object _lock = new object()
 
string _IGHomeEnv = null
 
string[] _IGHomeEnvList
 
bool _isModule = false
 
string _Name = "IG's Test Program"
 
int _version = 0
 
int _NumVersionDigits =2
 
bool _useSubVersion = true
 
DateTime _StartTime = DateTime.Now
 
TimeSpan _ValidityPeriod =new TimeSpan(100*366,0,0,0,0)
 
string _Directory = null
 
string _modulesDir = "modules"
 
string _applicationsDir = "applications"
 
IReporter _reporter = DefaultReporter
 

Properties

string ExecutableDirectory [get]
 Gets the executable directory. More...
 
string ModelBaseDirectoryPath [get]
 Path to the model base directory. More...
 
- Properties inherited from IG.Lib.App
string[] CommandlineArguments [get, protected set]
 Command-line arguments. More...
 
int NumCommandlineArguments [get, private set]
 Number of command-line arguments. More...
 
static App Global [get, protected set]
 Gets the global instance of the App class, representing the current program. More...
 
static bool InitializedGlobal [get, protected set]
 Gets a true/false value telling whether the global application data is initialized or not. More...
 
static IReporter Rep [get, set]
 Application's reporter. More...
 
- Properties inherited from IG.Lib.ModuleBase
object Lock [get]
 Object's lock (implementation of ILockable). More...
 
string IGHomeEnv [get, protected set]
 Environment variable that holds the software root directory. More...
 
string[] IGHomeEnvList [get, protected set]
 Possible names for environment variable that holds the software root directory. More...
 
virtual string IGHomeIdFile [get, protected set]
 Name of the software root identification file This file must be contained immediately in the software root directory. Its contents is checked in order to see whether a certain directory is actually the software root directory. More...
 
virtual string IGHomeIdFileString [get, protected set]
 Name of the software root identification file This file must be contained immediately in the software root directory. Its contents is checked in order to see whether a certain directory is actually the software root directory. More...
 
string AuthorFullName [get]
 Gets a treue/false value telling whether the global program data is initialized or not. More...
 
string AuthorAddress [get]
 Gets complete developer's address (combination of individual address lines). More...
 
virtual bool IsApplication [get, protected set]
 Whether the current object represents an application. More...
 
virtual bool IsModule [get, protected set]
 Whether the current object represents a module (not an application). More...
 
virtual string Name [get, set]
 Gets or sets the full name of the program. More...
 
string CodeName [get, set]
 Gets or sets code name of the program. More...
 
int Version [get, set]
 Gets or sets the main version number of the program. More...
 
int SubVersion [get, set]
 Gets or sets the subversion number of the program. More...
 
int SubSubVersion [get, set]
 Gets or sets the sub-subversion number of the program. More...
 
string Release [get, set]
 Gets or sets the release specification of the program (e.g. "alpha", "beta", "release"...). More...
 
virtual DateTime StartTime [get, private set]
 Gets The starting time of the program (time when program data was initialized). More...
 
DateTime CreationTime [get, protected set]
 Gets or sets craation time of the program. More...
 
virtual bool Expires [get, set]
 Gets or sets the flag telling whether the program expires. More...
 
TimeSpan ValidityPeriod [get, set]
 Gets or sets the validity period length for the program. More...
 
TimeSpan ExpireWarnPeriod [get, set]
 Gets or sets the length of the expiration warning period. This is the period of time between expiration of the software and time when the software actually stops working. If not set, 0 is taken. More...
 
DateTime ExpireTime [get, set]
 Gets or sets the expiration time of the program. Property is automatically updated if the validity period is changed. More...
 
DateTime ExpireFinalTime [get, set]
 Gets or sets the time when program will stop functioning completely. More...
 
bool HasExpired [get]
 Gets the indicatin whether the program has expired. More...
 
bool HasExpiredFinal [get]
 Gets the indicatin whether the program has stopped being functional because of expiration. This happens after final expiration time has reach, which follows a certain period after the regular expiration time. More...
 
int DaysTillExpire [get]
 Gets the number of days until the expiration of the program or module (0 or negative if already expired). More...
 
int DaysTillExpireFinal [get]
 Gets the number of days until the final expiration of the program or module, when the software will stop functioning (0 or negative if already expired). More...
 
int NumVersionDigits [get, set]
 Number of digits that are output in version strings. More...
 
bool UseSubVersion [get, set]
 Whether or not subversion number is used. More...
 
bool UseSubSubVersion [get, set]
 Whether or not sub-subversion number is used. More...
 
string VersionString [get]
 Gets the string that represents program version. More...
 
string DirectoryVersionString [get]
 Gets the string representation of program version to be used in directory and file names. Sub-subversion is not included in the string. More...
 
string User [get, set]
 Gets name of the user of the program. More...
 
virtual String SoftwareParentDirectory [get]
 Gets the directory containing individual module or application directories. More...
 
virtual string BaseDirectory [get, set]
 Gets or sets the program directory (containing all version directories, user directories, etc.). Setting of program directory should normally be left to the system. More...
 
virtual string VersionDirectory [get, set]
 Gets or sets the program'result specific version directory. Setting of this directory should normally be left to the system. More...
 
virtual string UserDirectory [get, set]
 Gets or sets the spedcific user'result directory for the current version of the progrm. Setting of this directory should normally be left to the system. More...
 
virtual string SessionDirectory [get, set]
 Gets or sets the current session'result directory. Setting of this directory should normally be left to the system. More...
 
virtual string SoftwareRoot [get, protected set]
 Gets or sets the software root directory. Setting it should normally be left to the system. More...
 
IReporter Reporter [get, set]
 
static IReporter DefaultReporter [get]
 Returns the curent global Application reporter. More...
 
static DateTime AnnDllTestLimit [get]
 
static bool IsAnnDllTestMode [get]
 Whether dynamic testing of software is on (helps in agile software development). More...
 
static bool LoadableScriptShellIsLoadableDefault [get]
 Basic procedure for calculation of the flag LoadableScriptShellIsLoadable. More...
 
static bool LoadableScriptShellIsRunnableDefault [get]
 Basic procedure for calculation of the flag LoadableScriptShellIsRunnable. More...
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Additional Inherited Members

- Static Protected Member Functions inherited from IG.Lib.App
static void InitApp ()
 Initializes the global application data. This should be called in derived class' Init(). More...
 
- Static Protected Member Functions inherited from IG.Lib.ModuleBase
static int MaxLength (List< string > lines)
 Maximal length of any line in the specified list. More...
 
static string MultiCharacter (char ch, int num)
 Returns a string containing the specified number of specified (equal) characters. More...
 
- Static Protected Attributes inherited from IG.Lib.App
static object lockGlobal = new Object()
 Global application data lock. More...
 
static App _global = new App(DefaultApplicationName, DefaultVersion, DefaultSubVersion)
 
static bool _initializedGlobal = false
 
- Static Protected Attributes inherited from IG.Lib.ModuleBase
static IReporter _defaultReporter = null
 

Detailed Description

Application class for the current application.

Constructor & Destructor Documentation

IG.Neural.Applications.AnnApp.AnnApp ( )
inline

Member Function Documentation

override void IG.Neural.Applications.AnnApp.BeforeInitialization ( )
inlineprotectedvirtual

Pre-initialization stage.

Reimplemented from IG.Lib.App.

override void IG.Neural.Applications.AnnApp.AfterInitialization ( )
inlineprotectedvirtual

A method called after any s initializations in constructors. Override this method in derived classes in order to achieve different behavior.

Reimplemented from IG.Lib.ModuleBase.

override void IG.Neural.Applications.AnnApp.ParseCommandlineArguments ( string[]  args)
inlinevirtual

Parses command-line arguments.

Parameters
AppArgumentsCommand-line arguments.

Reimplemented from IG.Lib.App.

void IG.Neural.Applications.AnnApp.SetWorkingDirectoryCustom ( )
inline

Sets working directory to the custom model directory, which is defined by the command line argument following the StrDirectoryCustom argument (i.e. the directory argument).

If the directory argument is an absolute path then this is the location of the working directory, otherwise the argument is treated as path relative to the subdirectory of the executable directory that is named ModelBaseDirname.

void IG.Neural.Applications.AnnApp.SetWorkingDirectoryDefault ( )
inline

Sets working directory to the default model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname.

void IG.Neural.Applications.AnnApp.SetWorkingDirectoryConvection2d ( )
inline

Sets working directory to the 2D casting model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname.

void IG.Neural.Applications.AnnApp.SetWorkingDirectoryCasting ( )
inline

Sets working directory to the casting model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname.

void IG.Neural.Applications.AnnApp.SetWorkingDirectoryProcessChain ( )
inline

Sets working directory to the casting model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname.

void IG.Neural.Applications.AnnApp.SetWorkingDirectoryTestModel ( )
inline

Sets working directory to the test model directory, which is located in the subdirectory of the executable directory named ModelBaseDirname.

override void IG.Neural.Applications.AnnApp.LaunchInitNotice ( )
inlinevirtual

Launches initialization notice.

Reimplemented from IG.Lib.ModuleBase.

static void IG.Neural.Applications.AnnApp.Init ( string[]  args)
inlinestatic

Initializes application with command-line arguments.

Parameters
AppArgumentsCommans-line arguments.

Referenced by IG.Neural.Applications.ProgramAnnApp.Main().

static void IG.Neural.Applications.AnnApp.Init ( )
inlinestatic

Initializes global application data for the current class of application.

References IG.Lib.App.InitApp().

Member Data Documentation

string IG.Neural.Applications.AnnApp.WorkingDirectory

Application's working directory.

bool IG.Neural.Applications.AnnApp.IsNormalMode = true

Whether application should be started in normal mode.

bool IG.Neural.Applications.AnnApp.IsVerbose = false

Whether application is in verbose mode.

const string IG.Neural.Applications.AnnApp.StrVerbose = "-verbose"
protected
bool IG.Neural.Applications.AnnApp.IsDirectoryCustom = false

Whether the working directory is set to the custom directory that is defined by the next argument.

If the next argument is an absolute path then this is the location of the working directory, otherwise the next argument is treated as path relative to the subdirectory of the executable directory that is named ModelBaseDirname.

const string IG.Neural.Applications.AnnApp.StrDirectoryCustom = "-dir"
protected
string IG.Neural.Applications.AnnApp.CustomDirectory = null

Custom directory as specified by the arguments.

bool IG.Neural.Applications.AnnApp.IsDirectoryDefault = false

Whether the working directory is set to the default model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname.

const string IG.Neural.Applications.AnnApp.StrDirectoryDefault = "-dirdefault"
protected
bool IG.Neural.Applications.AnnApp.IsDirectoryConvection2d = false

Whether the working directory is set to the default 2D convection model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname.

const string IG.Neural.Applications.AnnApp.StrDirectoryConvection2d = "-dirconvection2d"
protected
bool IG.Neural.Applications.AnnApp.IsDirectoryCasting = false

Whether the working directory is set to the casting model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname.

const string IG.Neural.Applications.AnnApp.StrDirectoryCasting = "-dircasting"
protected
bool IG.Neural.Applications.AnnApp.IsDirectoryProcessChain = false

Whether the working directory is set to the process chain model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname.

const string IG.Neural.Applications.AnnApp.StrDirectoryProcessChain = "-dirprocesschain"
protected
bool IG.Neural.Applications.AnnApp.IsDirectoryTestModel = false

Whether the working directory is set to the test model directory that is located in the subdirectory of the executable directory that is named ModelBaseDirname.

const string IG.Neural.Applications.AnnApp.StrDirectoryTestmodel = "-dirtestmodel"
protected
bool IG.Neural.Applications.AnnApp.IsDevelopMode = false

Code in development is run (only for internal use, not mature for deployment).

const string IG.Neural.Applications.AnnApp.StrDevelop = "-develop"
protected
bool IG.Neural.Applications.AnnApp.IsExperimentalMode = false

Experimental code (pre-development stage) is run (only for internal use, not mature for deployment).

const string IG.Neural.Applications.AnnApp.StrExperimental = "-experimental"
protected
bool IG.Neural.Applications.AnnApp.IsOldTestMode = false

Old test parametric demo is run (a different form).

const string IG.Neural.Applications.AnnApp.StrOldTest = "-oldtest"
protected
bool IG.Neural.Applications.AnnApp.IsPredictionMode = false

Only prediction window is opened.

const string IG.Neural.Applications.AnnApp.StrPrediction = "-prediction"
protected
bool IG.Neural.Applications.AnnApp.IsOldMode = false

Old parametric demo written by Tadej is run.

const string IG.Neural.Applications.AnnApp.StrOld = "-old"
protected
bool IG.Neural.Applications.AnnApp.IsOldTadejMode = false

Very old parametric demo written by Tadej is run.

const string IG.Neural.Applications.AnnApp.StrOldTadej = "-oldtadej"
protected
const string IG.Neural.Applications.AnnApp.ModelBaseDirname = "neuralmodels"

Name of the subdirectory of executable directory where models are located.

const string IG.Neural.Applications.AnnApp.ModelDirDefault = "default"

Name of the default model subdirectory.

const string IG.Neural.Applications.AnnApp.ModelDirConvection2d = "convection2d"

Name of the 2D convection model subdirectory.

const string IG.Neural.Applications.AnnApp.ModelDirCasting = "casting"

Name of the casting model subdirectory.

const string IG.Neural.Applications.AnnApp.ModelDirProcessChain = "processchain"

Name of the process chain model subdirectory.

const string IG.Neural.Applications.AnnApp.ModelDirTestModel = "testmodel"

Name of the test model subdirectory.

Property Documentation

string IG.Neural.Applications.AnnApp.ExecutableDirectory
get

Gets the executable directory.

string IG.Neural.Applications.AnnApp.ModelBaseDirectoryPath
get

Path to the model base directory.


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