PyJuggler.jccl
index
/home/patrick/PyJuggler-1.0.0-src/build/lib/python2.4/site-packages/PyJuggler/jccl.so

PyJuggler.jccl is an extension module written in Boost.Python that
exposes some C++ classes from the JCCL library.  The exposed classes
are those that tend to be of the most value for writing VR Juggler
application objects.
 
Refer to the JCCL and VR Juggler 2.0 C++ documentation for general
usage details:
   http://www.vrjuggler.org/jccl/docs.php
   http://www.vrjuggler.org/vrjuggler/docs.php

 
Classes
       
Boost.Python.instance(__builtin__.object)
ConfigDefinition
ConfigElement
ConfigElementHandler
ConfigManager
PropertyDefinition
PropertyDefinitionVec
StringVec

 
class ConfigDefinition(Boost.Python.instance)
    Definition of a single configuration element type.
 
 
Method resolution order:
ConfigDefinition
Boost.Python.instance
__builtin__.object

Methods defined here:
__eq__(...)
__init__(...)
__init__()
Default constructor.
 
__init__(def)
Copy constructor.
__ne__(...)
__str__(...)
getAllPropertyDefinitions(...)
getAllPropertyDefinitions() -> jccl.PropertyDefinitionVec (indexable container)
Gets an indexable container of all the PropertyDefinition objects
from self.
getHelp(...)
getHelp() -> string object
Returns the help text for this definition.
getName(...)
getName() -> string object
Returns the human-readable name of this definition.
getPropertyDefinition(...)
getPropertyDefinition(token) -> PropertyDefinition object
Gets a PropertyDefinition object from self with matchin token.
Arguments:
token -- A string that is the token of the desired
         PropertyDefinition object.
Returns:
PropertyDefinition object in self whose token matches the
given value.
getToken(...)
getToken() -> string object
Returns the token (a valid XML element identifier) of this
definition.  This corresponds to the ID of a config element.
getVersion(...)
getVersion() -> int
Gets the version of this definition.  If it is not set, 0 is
returned.
isParent(...)
isParent(token) -> Boolean
Tests to see if we derive from the given ConfigDefinition.
Arguments:
token -- A token for the ConfigDefinition that may be our
         parent.
Returns:
True is returned if the named ConfigDefinition type is a
parent of this definition.  False is returned otherwise.

Data and other attributes defined here:
__instance_size__ = 24

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>

 
class ConfigElement(Boost.Python.instance)
    A unit of configuration information.
References a config element DOM node and a definition for the given
configuration element type.
 
 
Method resolution order:
ConfigElement
Boost.Python.instance
__builtin__.object

Methods defined here:
__eq__(...)
__init__(...)
__init__()
Default constructor.
 
__init__(def)
Constructs a ConfigElement matching the given definition.
Arguments:
def -- A ConfigDefinition object that refers to a valid
       ConfigDefinition.
 
__init__(elt)
Copy constructor.
__lt__(...)
__ne__(...)
__str__(...)
getChildElement(...)
getChildElement(path) -> ConfigElement
Gets a child element from a property of self.
Arguments:
path -- The complete name of a child element in self.
        The form is, for example, "property_token/instance_name".
NOTE: This uses the name attribute of the elements.
Returns:
ConfigElement pointing to the child element.  This may be
a NULL ConfigElement if the child element name was not found.
Check before use.
getChildElements(...)
getChildElements() -> ConfigElement tuple
Returns a tuple of self's child (embedded) elements.
 
Returns:
A tuple of ConfigElement objects that are the config elements
embedded in self.
getConfigDefinition(...)
getDefinition() -> ConfigDefinition
Returns the ConfigDefinition for this config element.
getElementPtrDependencies(...)
getElementPtrDependencies() -> jccl.StringVec (indexable container)
Returns an indexable container of self's dependencies as string
objects.  Dependencies are any config element objects named by
an "Element Pointer" proeprty of self (or any element
embedded in self).
 
Returns:
A jccl.StringVec that contains the names of all config elements
referenced by self, which can be used for dependency checking.
getFullName(...)
getFullName() -> string
Returns the fully qualified, unique name of this element.
This will be different from getName() when this element is a
child of another element.  In that case, the name will be
based on the element hierarchy and the property token.  The
format in that case will be
"element name 0/proeprty_token_0/element name 1/property_token_1/..."
getID(...)
getID() -> string
Returns the string that identifies self's ConfigDefinition.
getName(...)
getName() -> string
Returns the instance name of this ConfigElement.
getNum(...)
getNum(property) -> int
Returns the number of values for the specified property.
Arguments:
property -- The token of a property in this element.
Returns:
The number of values that exist for the given property which
may be zero.
getPropertyBool(...)
getPropertyBool(prop, index) -> Boolean
Returns a Boolean value from the named property in self.
Arguments:
prop -- The token string for the desired property.
index -- The index of the property's list of values.  Use
         getNum() to determine the number of values for a
         given property.  The valid range is 0 to getNum() - 1.
getPropertyConfigElement(...)
getPropertyConfigElement(prop, index) -> ConfigElement object
Returns a ConfigElement object from the named property in self.
Arguments:
prop -- The token string for the desired property.
index -- The index of the property's list of values.  Use
         getNum() to determine the number of values for a
         given property.  The valid range is 0 to getNum() - 1.
getPropertyFloat(...)
getPropertyFloat(prop, index) -> floating-point value
Returns a floating-point value from the named property in self.
Arguments:
prop -- The token string for the desired property.
index -- The index of the property's list of values.  Use
         getNum() to determine the number of values for a
         given property.  The valid range is 0 to getNum() - 1.
getPropertyInt(...)
getPropertyInt(prop, index) -> int
Returns an integer value from the named property in self.
Arguments:
prop -- The token string for the desired property.
index -- The index of the property's list of values.  Use
         getNum() to determine the number of values for a
         given property.  The valid range is 0 to getNum() - 1.
getPropertyString(...)
getPropertyString(prop, index) -> string object
Returns a string object from the named property in self.
Arguments:
prop -- The token string for the desired property.
index -- The index of the property's list of values.  Use
         getNum() to determine the number of values for a
         given property.  The valid range is 0 to getNum() - 1.
getVersion(...)
getVersion() -> int
Returns the version number of the definition used by this
ConfigElement.
isValid(...)
setDefinition(...)
setDefinition(def)
Associates the given definition with this element.
setProperty(...)
setProperty(prop, index, value) -> Boolean
Sets a value for the given property.
Arguments:
prop  -- The token string for the property whose value will be
         set.
index -- The index of the property's list of values.
value -- The value to set.  It may be of type Boolean, integer,
         float, string, or ConfigElement.

Data and other attributes defined here:
__instance_size__ = 28

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>

 
class ConfigElementHandler(Boost.Python.instance)
    Abstract base class for all classes that can handle ConfigElement
objects.  Any class supporting this interface can be dynamically
reconfigured by the JCCL Configuration Manager.
 
The idea is that a subclass overrides configCanHandle() to
recognize those elements types that the derived class cares about.
Then override configAdd() and configRemove() to process instances
of those elements.
 
The actual work of checking the list of pending add and remove
requests and passing them to the methods of this interface is done
by configProcessPending().  This can also be overriden to provide
special behavior, but this is strongly discouraged.  The default
implementation should be sufficient for almost any conceivable
dynamic reconfiguration need.
 
 
Method resolution order:
ConfigElementHandler
Boost.Python.instance
__builtin__.object

Methods defined here:
__init__(...)
configAdd(...)
configAdd(element) -> Boolean
Adds the pending element to the configuration.
Pre-condition:
configCanHandle(element) == True
Arguments:
element -- A newly added ConfigElement object to be processed.
Returns:
True is returned if and only if the given element was
processed successfully.
configCanHandle(...)
configCanHandle(element) -> Boolean
Checks if this handler can process the given config element.
Typically, an implementation of this method will check the
element's definition ID to decide if it knows how to deal with
the element.
Arguments:
element -- The current config element that is ready to be
           processed.
Returns:
True is returned if this handler can process the given element.
configProcessPending(...)
configProcessPending() -> int
Processes any pending reconfiguration requests that we know
how to deal with.
 
The default implementation does the following for each item in
the pending list:
 
   for each pending item p in the pending list do
      if this->configCanHandle(p) AND p's dependencides are met
         retval = configAdd or configRemove (p)
         if retval == true
            remove request from pending
            add or remove p.element from active
 
ConfigManager's pending list MUST be locked before this
function is called.  Typically, configProcessPending() will be
called by ConfigManager.attemptReconfiguration(), which takes
care of this automatically.
configRemove(...)
configRemove(element) -> Boolean
Removes the pending element from the configuration.
Pre-condition:
configCanHandle(element) == True
Arguments:
element -- A newly removed ConfigElement object to be
           processed.
Returns:
True is returned if and only if the given element was
processed successfully.

Data and other attributes defined here:
__instance_size__ = 16

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>

 
class ConfigManager(Boost.Python.instance)
    Dynamic reconfiguration management for JCCL.  The Config Manager
provides a complete solution for configuration an application via
JCCL's ConfigElement type.  The Config Manager can configure based
on static configuration files or dynamically via a network
interface.
 
The Config Manager can be used in a number of ways.  It provices a
complete default solution to configuration, but it also exposes
enough of its inner workings to allow applications to implement
their own dynamic configuration algorithms.
 
The simplest way to use the Config Manager is to create one or more
types that implement the jccl.ConfigElementHandler interfaces and
register instances of these using the method
jccl.ConfigManager.addConfigElementHandler().
 
Requests to add config elements can be added via the network
connection or by the addPending*() methods of this class.  These
requests are added to the Config Manager's "pending" list.  The
Config Manager also maintains an "active" list that contains all
the config elements that have been handled successfully.
 
Once config element handlers have been registered with the Config
Manager, the application should periodically call the method
attemptReconfiguration().  This will try to match items in the
pending list with instances of jccl.ConfigElementHandler that know
how to handle them.
 
For more advanced uses, jccl.ConfigManager provides accessor
functions that allow direct manipulation of the pending and active
lists.  This allows an application to decide on its own when and how
to process requests in the pending list.  However, the
attemptReconfiguration() interface should be sufficient for almost
all uses.
 
 
Method resolution order:
ConfigManager
Boost.Python.instance
__builtin__.object

Methods defined here:
addConfigElementHandler(...)
addConfigElementHandler(handler)Registers the given handler (a subclass of
jccl.ConfigElementHandler.
getElementFromActive(...)
getElementFromActive(elementName) -> ConfigElement object
Attempts to find a config element matching the given name in the
active list.  If such an element is found, it is returned to the
caller.  If not, an empty jccl.ConfigElement is returned.
Arguments:
elementName -- The name of the element to find.
getElementFromPending(...)
getElementFromPending(elementName) -> ConfigElement object
Attempts to find a config element matching the given name in the
pending list.  If such an element is found, it is returned to the
caller.  If not, an empty jccl.ConfigElement is returned.
Arguments:
elementName -- The name of the element to find.
getElementNamed(...)
getElementNamed(elementName) -> ConfigElement object
Attempts to find a config element matching the given name, first
in the active list.  If the element is not found in the active
list, the pending list is searched.  If an element with a
matching name is found in either list, it is returned to the
caller.  If not, an empty jccl.ConfigElement is returned.
Arguments:
elementName -- The name of the element to find.
hasElementType(...)
hasElementType(elementType) -> Boolean
Searches the active list for an element matching the given type.
If none is found, the pending list is searched.
Arguments:
elementType -- The type of config element for which a search of
               the pending and active lists will be performed.
Returns:
True is returned if an element of the given type is found in
either the active or the pending list (in that order).  False is
returned if no such element is found in either list.
isElementInActiveList(...)
isElementInActiveList(elementName) -> Boolean
Checks if the named config element is in the active
configuration.  This locks the active list to do processing.
Arguments:
elementName -- The name of the element to find.
 
NOTE: This should not be used often.  Use at your own risk.
isElementTypeInActiveList(...)
isElementTypeInActiveList(elementType) -> Boolean
Is the element of this type in the active configuration?
This locks the active list to do processing.
Arguments:
elementType -- The type of the element to find.
 
NOTE: This should not be used often.  Use at your own risk.
isElementTypeInPendingList(...)
isElementTypeInPendingList(elementType) -> Boolean
Is the element of this type in the pending list?
This locks the pending list to do processing.
Arguments:
elementType -- The type of the element to find.
 
NOTE: This should not be used often.  Use at your own risk.
removeConfigElementHandler(...)
removeConfigElementHandler(handler)Un-registers the given handler (a subclass of
jccl.ConfigElementHandler.

Static methods defined here:
instance(...)

Data and other attributes defined here:
PendingElement = <class 'PyJuggler.jccl.PendingElement'>
__init__ = <built-in function __init__>
Raises an exception
This class cannot be instantiated from Python

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>

 
class PropertyDefinition(Boost.Python.instance)
    Describes properties.  Holds all the information describing a
property.  Instances of this class are read-only objects.
 
Properties are composed to make up a config element.  Each property
has zero or more values depending on how it is defined.  The basic
type of all the values for a given property will be the same.
 
 
Method resolution order:
PropertyDefinition
Boost.Python.instance
__builtin__.object

Methods defined here:
__eq__(...)
__init__(...)
__init__()
Default constructor.  self is initialized with default values
 
__init__(propdef)
Copy constructor.
__ne__(...)
__str__(...)
getDefaultValueString(...)
getDefaultValueString(index) -> string object
Retrieves the default value (as an XML string) for the i'th
item in this property definition.
getHelp(...)
getHelp() -> string object
Returns the help text for this definition.
getName(...)
getName() -> string object
Returns the human-readable name of this property.
getNumAllowed(...)
getNumAllowed() -> int
Returns the numbmer of values allowed for this property.
getToken(...)
getToken() -> string object
Returns the token (a valid XML element identifier) of this
property.
getVarType(...)
getVarType() -> VarType object
Returns an identifier that indicates the type of the values of
this proeprty.

Data and other attributes defined here:
__instance_size__ = 20

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>

 
class PropertyDefinitionVec(Boost.Python.instance)
    An indexable container of jccl.PropertyDefinition objects
 
 
Method resolution order:
PropertyDefinitionVec
Boost.Python.instance
__builtin__.object

Methods defined here:
__contains__(...)
__delitem__(...)
__getitem__(...)
__init__(...)
__iter__(...)
__len__(...)
__setitem__(...)
append(...)
extend(...)

Data and other attributes defined here:
__instance_size__ = 20

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>

 
class StringVec(Boost.Python.instance)
    An indexable container of string objects.
 
 
Method resolution order:
StringVec
Boost.Python.instance
__builtin__.object

Methods defined here:
__contains__(...)
__delitem__(...)
__getitem__(...)
__init__(...)
__iter__(...)
__len__(...)
__setitem__(...)
append(...)
extend(...)

Data and other attributes defined here:
__instance_size__ = 20

Data and other attributes inherited from Boost.Python.instance:
__dict__ = <dictproxy object>
__new__ = <built-in method __new__ of Boost.Python.class object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
__weakref__ = <member '__weakref__' of 'Boost.Python.instance' objects>