IPM
AbstractSettings Class Reference

Intended use case: If you want a configuration-related class of which there will be at most one instance, that has settings with names defined in code (not just magic strings, and possibly with default values) that are configurable via the "init" command in the Package Manager shell and the Package Manager > Configuration menu item, extend AbstractSettings and add some properties, and you get all that. More...

Inheritance diagram for AbstractSettings:
Inheritance graph

Public Member Functions

_.Library.Status OnOpen ()
 For properties without a defined value in data, automatically populates with the InitialExpression for that property. More...
 
- Public Member Functions inherited from Singleton
_.Library.Status OnClose ()
 Removes the OREF of this instance from PPG. More...
 
_.Library.Status OnNew ()
 Tracks the OREF of this instance in a PPG for later reference. More...
 

Static Public Member Functions

_.Library.Status ClearSettingValue (_.Library.String pName)
 Clears value of setting pName
 
_.Library.String GetSettingType (_.Library.String pName)
 Returns the datatype of a setting, as one of: More...
 
_.Library.String GetSettingValue (_.Library.String pName)
 Clears value of setting pName
 
_.Library.String GetSettingsParameterValue ()
 Returns a list of all properties available as "settings" (for IConfigurable),. More...
 
_.Library.Status SetSettingValue (_.Library.String pName, _.Library.String pValue)
 Sets setting pName to pValue. More...
 
_.Library.Boolean SettingIsDefined (_.Library.String pName)
 Returns true if a value is defined for setting pName.
 

Public Attributes

 Key
   More...
 

Static Public Attributes

 SETTINGS = None
 A delimited string in the format: More...
 
- Static Public Attributes inherited from Singleton
 NAMESPACESCOPE = None
 If set to 1, calls to Get must return an instance of this class created in the current namespace; a new instance will be created if none exists.
 
 PPG = None
 PPG in which to track references to the instance of this class.
 
- Static Public Attributes inherited from IConfigurable
 DESCRIPTION = None
 Interface for classes that require some level of configuration. More...
 
 SETTINGS = None
 A delimited string in the format: More...
 

Detailed Description

Intended use case: If you want a configuration-related class of which there will be at most one instance, that has settings with names defined in code (not just magic strings, and possibly with default values) that are configurable via the "init" command in the Package Manager shell and the Package Manager > Configuration menu item, extend AbstractSettings and add some properties, and you get all that.

The description of the settings is taken from the triple-slash documentation for them.

Member Function Documentation

◆ OnOpen()

_.Library.Status OnOpen ( )

For properties without a defined value in data, automatically populates with the InitialExpression for that property.

(Only handles properties in the default storage for the class.)

◆ GetSettingType()

_.Library.String GetSettingType ( _.Library.String  pName)
static

Returns the datatype of a setting, as one of:

boolean, string The default implementation is to always return "string"

Reimplemented from IConfigurable.

◆ GetSettingsParameterValue()

_.Library.String GetSettingsParameterValue ( )
static

Returns a list of all properties available as "settings" (for IConfigurable),.

along with their triple-slash comments as descriptions. Omits calculated, multidimensional, transient, and read-only properties.

◆ SetSettingValue()

_.Library.Status SetSettingValue ( _.Library.String  pName,
_.Library.String  pValue 
)
static

Sets setting pName to pValue.

Should return an error Status if pValue is invalid.

Reimplemented from IConfigurable.

Member Data Documentation

◆ SETTINGS

SETTINGS = None
static

A delimited string in the format:

Key:Description[|Key:Description...]

◆ Key

Key