Arena  1.0
A content management system
 All Classes Files Functions Variables Pages
Library.Application.Applications.AnApplication Class Reference

The base application class. More...

+ Inheritance diagram for Library.Application.Applications.AnApplication:

Public Member Functions

def __init__
 Construct a new instance of the application. More...
 
def init
 Initializer.
 
def __del__
 Destructor.
 
def run
 Run the application. More...
 
def toString
 Construct a string representation of the application (the name and version string). More...
 
def option
 Retrieves the value of the named option. More...
 
def version
 Retrieve the version string for the application. More...
 
def path
 Retrieve the path to the running script, either for local use or the use of the remote client. More...
 
def script
 Retrieve the name of the executing script. More...
 
- Public Member Functions inherited from Library.Base.Classwork.AnObject
def init
 Initialize a new object instance. More...
 
def __init__
 Construct and initialize a new instance of AnObject. More...
 
def __del__
 Destroy the object instance. More...
 
def displayName
 Construct a "pretty" display name for the class instance, based on the name of its class. More...
 
def implements
 Determine whether the class instance is related to the specified class. More...
 
def toString
 Return a string representation of the class, suitable for output to a console or text-based device. More...
 
def __str__
 Return a string representation of the class. More...
 
def classname
 Return the name of the class from which the instance was created. More...
 
def name
 Return the name of the class. More...
 
- Public Member Functions inherited from Library.String.Utilities.IsPrintable
def toString
 Return a string representation of the class conveniently. More...
 
def __str__
 Return a string representation of the class. More...
 
def printTo
 Print a string representation of the class to the specified stream. More...
 

Detailed Description

The base application class.

This class defines some methods that it does not implement, and so it should never be instantiated directly.

Constructor & Destructor Documentation

def Library.Application.Applications.AnApplication.__init__ (   Self,
  arguments 
)

Construct a new instance of the application.

Any arguments passed in arguments are stored internally.

Member Function Documentation

def Library.Application.Applications.AnApplication.option (   Self,
  optionName 
)

Retrieves the value of the named option.

This value is retrieved from the dictionary of application options, which includes those specified at the time the application instance was created.

def Library.Application.Applications.AnApplication.path (   Self,
  viewpoint = aDefaultPathViewpoint,
  appendix = None 
)

Retrieve the path to the running script, either for local use or the use of the remote client.

viewpoint specifies whether the routine should return the path as seen by the system (i.e., /home/username/public/file) or as seen by the client (i.e., /public/file).

The optional appendix argument may specify a path or file name that should be included in the returned result; if this parameter is omitted, the function simply returns the path to the running script.

def Library.Application.Applications.AnApplication.run (   Self)

Run the application.

This is the main loop of the application. It is expected to return a code to indicate success (0) or failure (non-zero). In the default implementation of AnApplication, it always returns zero. This routine must be overridden by descendant classes that are intended to do anything useful. """

def Library.Application.Applications.AnApplication.script (   Self)

Retrieve the name of the executing script.

def Library.Application.Applications.AnApplication.toString (   Self)

Construct a string representation of the application (the name and version string).

The representation is formatted based on the string provided by #aStringRepresentation.

def Library.Application.Applications.AnApplication.version (   Self)

Retrieve the version string for the application.

This value is retrieved from the internal "version" attribute, which is set by the class on initialization.


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