Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::ApplicationInfo Class Reference

Application information. More...

#include <arcane/utils/ApplicationInfo.h>

Public Member Functions

 ApplicationInfo (int *argc, char ***argv, const String &name, const VersionInfo &version)
 ApplicationInfo (const StringList &args, const String &name, const VersionInfo &version)
 ApplicationInfo (const CommandLineArguments &args, const String &name, const VersionInfo &version)
 ApplicationInfo (const ApplicationInfo &rhs)
ApplicationInfo & operator= (const ApplicationInfo &rhs)
const StringapplicationName () const
 Application name.
const VersionInfoversion () const
 Version number.
const VersionInfocodeVersion () const
 Version number.
const StringdataOsDir () const
 Returns the path where OS-dependent data files are located.
const StringdataDir () const
 Returns the path where data files are located.
int versionMajor () const
 Returns the major version number of the application.
int versionMinor () const
 Returns the minor version number of the application.
int versionPatch () const
 Returns the patch version number of the application.
bool isDebug () const
 Returns true if running in debug mode.
const StringcodeName () const
 Returns the name of the calculation code linked to the application.
const StringtargetFullName () const
 Returns the full target name.
int * commandLineArgc () const
char *** commandLineArgv () const
void args (StringList &args) const
 Fills args with command line arguments.
const CommandLineArgumentscommandLineArguments () const
 Command line arguments.
void addDynamicLibrary (const String &lib_name)
 Adds the library lib_name to the list of dynamically loaded libraries.
StringCollection dynamicLibrariesName () const
 List of dynamic libraries.
void setDataOsDir (const String &v)
 Sets the path where OS-dependent data files are located.
void setDataDir (const String &v)
 Sets the path where data files are located.
void setVersionInfo (const VersionInfo &version_info)
 Sets the code version number.
void setApplicationName (const String &v)
 Sets the application name.
void setCodeVersion (const VersionInfo &version_info)
 Sets the version number.
void setCodeName (const String &code_name)
 Sets the code name.
void setCommandLineArguments (const CommandLineArguments &args)
 Sets the command line arguments.
void setIsDebug (bool v)
 Sets the debug state.
void setRuntimeConfigFileContent (ByteConstSpan content)
 Sets the application configuration file content.
ByteConstSpan runtimeConfigFileContent () const
 Application configuration file content.
void addParameterLine (const String &line)
 Adds an Arcane parameter to the command line.

Public Attributes

int * m_argc
 Number of command line arguments.
char *** m_argv
 Array of command line arguments.

Detailed Description

Application information.

Definition at line 39 of file ApplicationInfo.h.

Constructor & Destructor Documentation

◆ ApplicationInfo() [1/5]

Arcane::ApplicationInfo::ApplicationInfo ( )

Definition at line 58 of file ApplicationInfo.cc.

◆ ApplicationInfo() [2/5]

Arcane::ApplicationInfo::ApplicationInfo ( int * argc,
char *** argv,
const String & name,
const VersionInfo & version )

Definition at line 70 of file ApplicationInfo.cc.

◆ ApplicationInfo() [3/5]

Arcane::ApplicationInfo::ApplicationInfo ( const StringList & args,
const String & name,
const VersionInfo & version )

Definition at line 82 of file ApplicationInfo.cc.

◆ ApplicationInfo() [4/5]

Arcane::ApplicationInfo::ApplicationInfo ( const CommandLineArguments & args,
const String & name,
const VersionInfo & version )

Definition at line 95 of file ApplicationInfo.cc.

◆ ApplicationInfo() [5/5]

Arcane::ApplicationInfo::ApplicationInfo ( const ApplicationInfo & rhs)

Definition at line 108 of file ApplicationInfo.cc.

◆ ~ApplicationInfo()

Arcane::ApplicationInfo::~ApplicationInfo ( )

Definition at line 135 of file ApplicationInfo.cc.

Member Function Documentation

◆ addDynamicLibrary()

void Arcane::ApplicationInfo::addDynamicLibrary ( const String & lib_name)

Adds the library lib_name to the list of dynamically loaded libraries.

lib_name must be a name, without path and without extension. For example, my_lib is valid but not libtoto.so, nor /tmp/toto.

Definition at line 347 of file ApplicationInfo.cc.

◆ addParameterLine()

void Arcane::ApplicationInfo::addParameterLine ( const String & line)

Adds an Arcane parameter to the command line.

See also
ParameterList::addParameterLine().

Definition at line 438 of file ApplicationInfo.cc.

◆ applicationName()

const String & Arcane::ApplicationInfo::applicationName ( ) const

Application name.

Definition at line 215 of file ApplicationInfo.cc.

◆ args()

void Arcane::ApplicationInfo::args ( StringList & args) const

Fills args with command line arguments.

Definition at line 338 of file ApplicationInfo.cc.

◆ codeName()

const String & Arcane::ApplicationInfo::codeName ( ) const

Returns the name of the calculation code linked to the application.

Definition at line 302 of file ApplicationInfo.cc.

◆ codeVersion()

const VersionInfo & Arcane::ApplicationInfo::codeVersion ( ) const

Version number.

Definition at line 224 of file ApplicationInfo.cc.

Referenced by version().

◆ commandLineArgc()

int * Arcane::ApplicationInfo::commandLineArgc ( ) const

Definition at line 320 of file ApplicationInfo.cc.

◆ commandLineArguments()

const CommandLineArguments & Arcane::ApplicationInfo::commandLineArguments ( ) const

Command line arguments.

Definition at line 365 of file ApplicationInfo.cc.

Referenced by Arcane::ArcaneLauncher::init(), and Arcane::ArcaneLauncher::needHelp().

◆ commandLineArgv()

char *** Arcane::ApplicationInfo::commandLineArgv ( ) const

Definition at line 329 of file ApplicationInfo.cc.

◆ dataDir()

const String & Arcane::ApplicationInfo::dataDir ( ) const

Returns the path where data files are located.

Definition at line 248 of file ApplicationInfo.cc.

◆ dataOsDir()

const String & Arcane::ApplicationInfo::dataOsDir ( ) const

Returns the path where OS-dependent data files are located.

Definition at line 233 of file ApplicationInfo.cc.

◆ dynamicLibrariesName()

StringCollection Arcane::ApplicationInfo::dynamicLibrariesName ( ) const

List of dynamic libraries.

Definition at line 356 of file ApplicationInfo.cc.

◆ isDebug()

bool Arcane::ApplicationInfo::isDebug ( ) const

Returns true if running in debug mode.

Definition at line 293 of file ApplicationInfo.cc.

◆ operator=()

ApplicationInfo & Arcane::ApplicationInfo::operator= ( const ApplicationInfo & rhs)

Definition at line 120 of file ApplicationInfo.cc.

◆ runtimeConfigFileContent()

ByteConstSpan Arcane::ApplicationInfo::runtimeConfigFileContent ( ) const

Application configuration file content.

Definition at line 429 of file ApplicationInfo.cc.

◆ setApplicationName()

void Arcane::ApplicationInfo::setApplicationName ( const String & v)

Sets the application name.

Definition at line 374 of file ApplicationInfo.cc.

Referenced by Arcane::ApplicationBuildInfo::setApplicationName().

◆ setCodeName()

void Arcane::ApplicationInfo::setCodeName ( const String & code_name)

Sets the code name.

Definition at line 392 of file ApplicationInfo.cc.

◆ setCodeVersion()

void Arcane::ApplicationInfo::setCodeVersion ( const VersionInfo & version_info)

Sets the version number.

Definition at line 383 of file ApplicationInfo.cc.

References version().

Referenced by setVersionInfo().

◆ setCommandLineArguments()

void Arcane::ApplicationInfo::setCommandLineArguments ( const CommandLineArguments & args)

Sets the command line arguments.

Calling this method modifies the values of m_argv and m_argc.

Definition at line 401 of file ApplicationInfo.cc.

◆ setDataDir()

void Arcane::ApplicationInfo::setDataDir ( const String & v)

Sets the path where data files are located.

Definition at line 257 of file ApplicationInfo.cc.

◆ setDataOsDir()

void Arcane::ApplicationInfo::setDataOsDir ( const String & v)

Sets the path where OS-dependent data files are located.

Definition at line 239 of file ApplicationInfo.cc.

◆ setIsDebug()

void Arcane::ApplicationInfo::setIsDebug ( bool v)

Sets the debug state.

Definition at line 411 of file ApplicationInfo.cc.

◆ setRuntimeConfigFileContent()

void Arcane::ApplicationInfo::setRuntimeConfigFileContent ( ByteConstSpan content)

Sets the application configuration file content.

Definition at line 420 of file ApplicationInfo.cc.

◆ setVersionInfo()

void Arcane::ApplicationInfo::setVersionInfo ( const VersionInfo & version_info)
inline

Sets the code version number.

Definition at line 115 of file ApplicationInfo.h.

References setCodeVersion(), and setVersionInfo().

Referenced by setVersionInfo().

◆ targetFullName()

const String & Arcane::ApplicationInfo::targetFullName ( ) const

Returns the full target name.

Definition at line 311 of file ApplicationInfo.cc.

◆ version()

const VersionInfo & Arcane::ApplicationInfo::version ( ) const
inline

Version number.

Definition at line 57 of file ApplicationInfo.h.

References codeVersion(), and version().

Referenced by setCodeVersion(), and version().

◆ versionMajor()

int Arcane::ApplicationInfo::versionMajor ( ) const

Returns the major version number of the application.

Definition at line 266 of file ApplicationInfo.cc.

◆ versionMinor()

int Arcane::ApplicationInfo::versionMinor ( ) const

Returns the minor version number of the application.

Definition at line 275 of file ApplicationInfo.cc.

◆ versionPatch()

int Arcane::ApplicationInfo::versionPatch ( ) const

Returns the patch version number of the application.

Definition at line 284 of file ApplicationInfo.cc.

Member Data Documentation

◆ m_argc

int* Arcane::ApplicationInfo::m_argc

Number of command line arguments.

Definition at line 152 of file ApplicationInfo.h.

◆ m_argv

char*** Arcane::ApplicationInfo::m_argv

Array of command line arguments.

Definition at line 154 of file ApplicationInfo.h.


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