Class SProperty

Summary

A singleton class that provides global access to a set of properties throughout a program's execution. Note that, unlike the Property class, SProperty does not provide persistence outside of a single execution. Any Unicon entity can be the value of a property managed by SProperty.

Superclasses:
Object

Package:
lang
File:
property.icn
Methods:
clearAll, count, getAllNames, getAllProperties, getP, getPString, removeP, setP, switchPropertyTable

Methods inherited from Object:
Type, className, clone, equals, fieldNames, genMethods, getField, get_class, get_class_name, get_id, hasField, hasMethod, hash_code, instanceOf, invoke, is_instance, setField, to_string

Fields:
pTable

Source code.

Details
Constructor

SProperty()

Construct a singleton SProperty class.

Methods:

clearAll()

Remove all properties from the database


count()

Returns:
the number of properties

Produce the number of properties.


getAllNames()

Returns:
set of property names

Produce a set of the names of all of the properties.


getAllProperties()

Returns:
table of all the properties

Produce a table containing all of the properties. The keys are the property names.


getP(pName)

Parameter:
pName
name of the property
Returns:
the current value of the named property

Produce a property's value.


getPString(pName)

Parameter:
pName
name of the property
Returns:
the ximage() string value of the named property

Produce a property's value as an ximage() string.


removeP(pName)

Parameter:
pName
name of property to remove

Remove a property from the database


setP(name, value)

Parameters:
name
name of the property
value
value for the named property

Set a property's value.


switchPropertyTable(tableName)

This is a NO-OP in the SProperty class.


Fields:
pTable


This page produced by UniDoc on 2021/04/15 @ 23:59:53.