sdurw_core module
- class sdurw_core.sdurw_core.AnyPtr(*args)
Bases:
object
Smart pointer that can point to any type, and optionally takes ownership of the object pointer.
- __init__(*args)
- Overload 1:
Construct empty null pointer.
Overload 2:
Copy constructor - ownership is shared. :type other:
AnyPtr
:param other: [in] other AnyPtr object.
- isNull()
Check if pointer is null. :rtype: boolean :return: true is the smart pointer is null.
- property thisown
The membership flag
- type()
Get type info for the object pointed to. :rtype: std::type_info :return: type_info object.
- class sdurw_core.sdurw_core.DOMElem(*args, **kwargs)
Bases:
object
an wrapper interface for easy access to XML DOM parser. This require an active back-end that does the actual parsing and validation.
The DOMElem consist of a <name>, <value> and a DOMElem list of <attributes> and <children>. The value is a string and can (for convenience) be extracted as different primitive values on the interface eg. double or std::vector<double>. Attributes are DOMElem that does not have any children. Children are DOMElem that might contain other children.
- __init__(*args, **kwargs)
- addAttribute(name)
Add an attribute element. :type name: string :param name: [in] name of the attribute. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new attribute.
- addChild(*args)
Overload 1:
Add a child with an empty name. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new child element.
Overload 2:
Add a child element. :type name: string :param name: [in] name of child. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new child element.
- getAttribute(name, optional=False)
get a attribute with a specific name. If more attributes with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. :type name: string :param name: [in] name of the attribute to find :type optional: boolean, optional :param optional: [in] :rtype: rw::core::Ptr< rw::core::DOMElem > :return: the DOMElem attribute if found, else either NULL (is optional) or an exception is
thrown.
- getAttributeValue(*args)
Overload 1:
Get the value of attribute as a string. :type name: string :param name: [in] the name of the attribute. :rtype: string :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (string) – [in] a default value to return if attibute is not found.
- getAttributeValueAsBool(*args)
Overload 1:
Get the value of attribute as an boolean. :type name: string :param name: [in] the name of the attribute. :rtype: boolean :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (boolean) – [in] a default value to return if attibute is not found.
- getAttributeValueAsDouble(*args)
Overload 1:
Get the value of attribute as an double. :type name: string :param name: [in] the name of the attribute. :rtype: float :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (float) – [in] a default value to return if attibute is not found.
- getAttributeValueAsInt(*args)
Overload 1:
Get the value of attribute as an integer. :type name: string :param name: [in] the name of the attribute. :rtype: int :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (int) – [in] a default value to return if attibute is not found.
- getAttributes()
Get iterator to attributes. :rtype: rw::core::DOMElem::IteratorPair :return: iterator pair for the first and last attributes.
- getChild(name, optional=False)
get a child with a specific name. If more children with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. :type name: string :param name: [in] name of the child to find :type optional: boolean, optional :param optional: [in] :rtype: rw::core::Ptr< rw::core::DOMElem > :return: the DOMElem child if found, else either NULL (is optional) or an exception is
thrown.
- getChildren()
Get iterator to child elements. :rtype: rw::core::DOMElem::IteratorPair :return: iterator pair for the first and last elements.
- getName()
get name of this DOMElem :rtype: string :return: name of DOMElem
- getValue()
get string value of this DOMElem :rtype: string :return: string value of this elem
- getValueAsBool()
Get the value as a boolean. :rtype: boolean :return: boolean value.
- getValueAsDouble()
get value as an double floating point, throws an exception if this is not an double value. :rtype: float :return: the double value
- getValueAsDoubleList(*args)
Overload 1:
get value as a list of doubles, throws an exception if this is not a list of doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of doubles
Overload 2:
get value as a list of N doubles, throws an exception if this is not a list of N doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of N doubles
- getValueAsInt()
get value as an integer, throws an exception if this is not an int value. :rtype: int :return: the int value
- getValueAsStringList(*args)
get value as a list of strings, throws an exception if this is not a list of strings. The default string seperator is semicolon (;). :rtype: std::vector< std::string > :return: list of strings
- hasAttribute(name)
test if this DOMElem has an attribute by name name. :type name: string :param name: [in] name of the attribute DOMElem :rtype: boolean :return: true if this DOMElem has an attribute with name name
- hasChild(name)
test if this DOMElem has a child by name name. :type name: string :param name: [in] name of the child DOMElem :rtype: boolean :return: true if this DOMElem has a child with name name
- hasChildren()
test if this DOMElem has any children :rtype: boolean :return: true if this DOMElem has any children
- isName(elemname)
test if name of this elem equals elemname :type elemname: string :param elemname: [in] string name to test with :rtype: boolean :return: true if elemname equals name of this DOMElem, false otherwise
- setName(val)
Set the name of this element. :type val: string :param val: [in] new name.
- setValue(*args)
Overload 1:
Set the value of this element. :type val: string :param val: [in] new value.
- Overload 2:
std::string&)
- Overload 3:
std::string&)
- Overload 4:
std::string&)
- Overload 5:
std::string&)
- setValueString(val)
std::string&)
- property thisown
The membership flag
- class sdurw_core.sdurw_core.DOMElemCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getName()
get name of this DOMElem :rtype: string :return: name of DOMElem
- getValue()
get string value of this DOMElem :rtype: string :return: string value of this elem
- getValueAsDouble()
get value as an double floating point, throws an exception if this is not an double value. :rtype: float :return: the double value
- getValueAsDoubleList(*args)
Overload 1:
get value as a list of doubles, throws an exception if this is not a list of doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of doubles
Overload 2:
get value as a list of N doubles, throws an exception if this is not a list of N doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of N doubles
- getValueAsInt()
get value as an integer, throws an exception if this is not an int value. :rtype: int :return: the int value
- getValueAsStringList(*args)
get value as a list of strings, throws an exception if this is not a list of strings. The default string seperator is semicolon (;). :rtype: std::vector< std::string > :return: list of strings
- hasAttribute(name)
test if this DOMElem has an attribute by name name. :type name: string :param name: [in] name of the attribute DOMElem :rtype: boolean :return: true if this DOMElem has an attribute with name name
- hasChild(name)
test if this DOMElem has a child by name name. :type name: string :param name: [in] name of the child DOMElem :rtype: boolean :return: true if this DOMElem has a child with name name
- hasChildren()
test if this DOMElem has any children :rtype: boolean :return: true if this DOMElem has any children
- isName(elemname)
test if name of this elem equals elemname :type elemname: string :param elemname: [in] string name to test with :rtype: boolean :return: true if elemname equals name of this DOMElem, false otherwise
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.DOMElemPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- addAttribute(name)
Add an attribute element. :type name: string :param name: [in] name of the attribute. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new attribute.
- addChild(*args)
Overload 1:
Add a child with an empty name. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new child element.
Overload 2:
Add a child element. :type name: string :param name: [in] name of child. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new child element.
- cptr()
- deref()
The pointer stored in the object.
- getAttribute(name, optional=False)
get a attribute with a specific name. If more attributes with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. :type name: string :param name: [in] name of the attribute to find :type optional: boolean, optional :param optional: [in] :rtype: rw::core::Ptr< rw::core::DOMElem > :return: the DOMElem attribute if found, else either NULL (is optional) or an exception is
thrown.
- getAttributeValue(*args)
Overload 1:
Get the value of attribute as a string. :type name: string :param name: [in] the name of the attribute. :rtype: string :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (string) – [in] a default value to return if attibute is not found.
- getAttributeValueAsBool(*args)
Overload 1:
Get the value of attribute as an boolean. :type name: string :param name: [in] the name of the attribute. :rtype: boolean :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (boolean) – [in] a default value to return if attibute is not found.
- getAttributeValueAsDouble(*args)
Overload 1:
Get the value of attribute as an double. :type name: string :param name: [in] the name of the attribute. :rtype: float :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (float) – [in] a default value to return if attibute is not found.
- getAttributeValueAsInt(*args)
Overload 1:
Get the value of attribute as an integer. :type name: string :param name: [in] the name of the attribute. :rtype: int :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (int) – [in] a default value to return if attibute is not found.
- getAttributes()
Get iterator to attributes. :rtype: rw::core::DOMElem::IteratorPair :return: iterator pair for the first and last attributes.
- getChild(name, optional=False)
get a child with a specific name. If more children with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. :type name: string :param name: [in] name of the child to find :type optional: boolean, optional :param optional: [in] :rtype: rw::core::Ptr< rw::core::DOMElem > :return: the DOMElem child if found, else either NULL (is optional) or an exception is
thrown.
- getChildren()
Get iterator to child elements. :rtype: rw::core::DOMElem::IteratorPair :return: iterator pair for the first and last elements.
- getDeref()
Member access operator.
- getName()
get name of this DOMElem :rtype: string :return: name of DOMElem
- getValue()
get string value of this DOMElem :rtype: string :return: string value of this elem
- getValueAsBool()
Get the value as a boolean. :rtype: boolean :return: boolean value.
- getValueAsDouble()
get value as an double floating point, throws an exception if this is not an double value. :rtype: float :return: the double value
- getValueAsDoubleList(*args)
Overload 1:
get value as a list of doubles, throws an exception if this is not a list of doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of doubles
Overload 2:
get value as a list of N doubles, throws an exception if this is not a list of N doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of N doubles
- getValueAsInt()
get value as an integer, throws an exception if this is not an int value. :rtype: int :return: the int value
- getValueAsStringList(*args)
get value as a list of strings, throws an exception if this is not a list of strings. The default string seperator is semicolon (;). :rtype: std::vector< std::string > :return: list of strings
- hasAttribute(name)
test if this DOMElem has an attribute by name name. :type name: string :param name: [in] name of the attribute DOMElem :rtype: boolean :return: true if this DOMElem has an attribute with name name
- hasChild(name)
test if this DOMElem has a child by name name. :type name: string :param name: [in] name of the child DOMElem :rtype: boolean :return: true if this DOMElem has a child with name name
- hasChildren()
test if this DOMElem has any children :rtype: boolean :return: true if this DOMElem has any children
- isName(elemname)
test if name of this elem equals elemname :type elemname: string :param elemname: [in] string name to test with :rtype: boolean :return: true if elemname equals name of this DOMElem, false otherwise
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- setName(val)
Set the name of this element. :type val: string :param val: [in] new name.
- setValue(*args)
Overload 1:
Set the value of this element. :type val: string :param val: [in] new value.
- Overload 2:
std::string&)
- Overload 3:
std::string&)
- Overload 4:
std::string&)
- Overload 5:
std::string&)
- setValueString(val)
std::string&)
- property thisown
The membership flag
- class sdurw_core.sdurw_core.DOMParser(*args, **kwargs)
Bases:
object
interface for parsing documents in a DOM fasion.
The factory method in the DOM parser enables extensions to be added by the user through plugins.
- __init__(*args, **kwargs)
- getRootElement()
get the top/root element in the DOM structure :rtype:
Ptr
:return: root element of dom structure
- load(*args)
Overload 1:
parse from file :type filename: string :param filename: [in] name of file
Overload 2:
parse from stream :type input: std::istream :param input: [in] input stream
- static make()
make an instance of the default DOM parser :rtype: rw::core::Ptr< rw::core::DOMParser > :return: a DOM parser for xml files
- save(*args)
Overload 1:
save DOM structure to file :type filename: string :param filename: [in] filename
Overload 2:
save DOM structure to stream :type input: std::ostream :param input:
- setDebug(debug)
Enable/disable debugging to the debug Log. :type debug: boolean :param debug: [in] true to enable debug output.
- setSchema(filename)
specify the schema file
Notes: not all DOMParser implementations support schema validation :type filename: string :param filename:
- property thisown
The membership flag
- class sdurw_core.sdurw_core.DOMParserCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.DOMParserPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getRootElement()
get the top/root element in the DOM structure :rtype:
Ptr
:return: root element of dom structure
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- load(*args)
Overload 1:
parse from file :type filename: string :param filename: [in] name of file
Overload 2:
parse from stream :type input: std::istream :param input: [in] input stream
- make()
make an instance of the default DOM parser :rtype: rw::core::Ptr< rw::core::DOMParser > :return: a DOM parser for xml files
- save(*args)
Overload 1:
save DOM structure to file :type filename: string :param filename: [in] filename
Overload 2:
save DOM structure to stream :type input: std::ostream :param input:
- setDebug(debug)
Enable/disable debugging to the debug Log. :type debug: boolean :param debug: [in] true to enable debug output.
- setSchema(filename)
specify the schema file
Notes: not all DOMParser implementations support schema validation :type filename: string :param filename:
- property thisown
The membership flag
- sdurw_core.sdurw_core.DOMParser_make()
make an instance of the default DOM parser :rtype: rw::core::Ptr< rw::core::DOMParser > :return: a DOM parser for xml files
- class sdurw_core.sdurw_core.DOMPropertyMapFormat
Bases:
object
Class storing the identifiers used for properties
- __init__()
- static idProperty()
Get identifier for rw::core::Property. :rtype: string :return: the identifier.
- static idPropertyDescription()
Get identifier for the description of a rw::core::Property. :rtype: string :return: the identifier.
- static idPropertyMap()
Get identifier for rw::core::PropertyMap. :rtype: string :return: the identifier.
- static idPropertyName()
Get identifier for the name of a rw::core::Property. :rtype: string :return: the identifier.
- static idPropertyValue()
Get identifier for the value of a rw::core::Property. :rtype: string :return: the identifier.
- property thisown
The membership flag
- sdurw_core.sdurw_core.DOMPropertyMapFormat_idProperty()
Get identifier for rw::core::Property. :rtype: string :return: the identifier.
- sdurw_core.sdurw_core.DOMPropertyMapFormat_idPropertyDescription()
Get identifier for the description of a rw::core::Property. :rtype: string :return: the identifier.
- sdurw_core.sdurw_core.DOMPropertyMapFormat_idPropertyMap()
Get identifier for rw::core::PropertyMap. :rtype: string :return: the identifier.
- sdurw_core.sdurw_core.DOMPropertyMapFormat_idPropertyName()
Get identifier for the name of a rw::core::Property. :rtype: string :return: the identifier.
- sdurw_core.sdurw_core.DOMPropertyMapFormat_idPropertyValue()
Get identifier for the value of a rw::core::Property. :rtype: string :return: the identifier.
- class sdurw_core.sdurw_core.Descriptor(*args)
Bases:
object
An extension descriptor.
The descriptor holds meta-data for an extension, and makes it possible to do lazy-loading of plugins.
- __init__(*args)
- Overload 1:
Construct empty descriptor.
Overload 2:
Construct new descriptor. :type id_: string :param id_: [in] a unique id of the extension. :type point_: string :param point_: [in] the extension point.
- getProperties()
Get the extension properties.
The properties will typically include information about the file extensions supported by the plugin, or other meta-data required to determine the proper extension to use.
- Return type
- Returns
a reference to the properties.
- property id
A unique id of an extension.
- property name
A human-readable name of an extension.
- property point
The extension point that this extension extends.
- property props
Properties of the extension.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Exception(*args)
Bases:
object
Standard exception type of RobWork.
All exception thrown within RobWork are of the type Exception.
An exception contains a message (of type Message) for the user and nothing else.
- __init__(*args)
- getId()
get id of this exception message :rtype: int :return: id
- getMessage()
The message for the user describing the reason for the error.
- Return type
- Returns
The message for the user.
- property thisown
The membership flag
- what()
readable description of this esception :rtype: string :return: string description
readable description of this esception :rtype: string :return: string description
- class sdurw_core.sdurw_core.Extension(*args)
Bases:
object
The Extension class is used to provide additonal functionality from a Plugin to other extension points of either the system or other plugins.
%Extension points in %RobWork:
- __init__(*args)
Overload 1:
Constructor. :type desc:
Descriptor
:param desc: [in] Description and configuration of extension. :type owner:Plugin
:param owner: [in] the plugin that owns this extension or NULL.Overload 2:
Constructor. :type id: string :param id: [in] a unique id of the extension. :type point: string :param point: [in] the extension point. :type owner:
Plugin
:param owner: [in] the plugin that owns this extension or NULL.Overload 3:
std::string&,const std::string&,Plugin*)
- Parameters
obj (
AnyPtr
) – [in] a pointer to the object.
- getId()
a unique id that uniquely identifies this extension in its owner Plugin
- getName()
a human readable name of this plugin (may contain spaces)
- getOwner()
get the owner plugin
- getPoint()
a unique global identifier of the extension point that this extension is attached to
- getProperties()
const
- property thisown
The membership flag
- class sdurw_core.sdurw_core.ExtensionCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getPoint()
a unique global identifier of the extension point that this extension is attached to
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.ExtensionPointDOMParser(id, name, plugin=None)
Bases:
object
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
- __init__(id, name, plugin=None)
Constructor :type id: string :param id: [in] unique identifier of this extension point :type name: string :param name: [in] human readable name of this extension point :type plugin:
Plugin
, optional :param plugin: [in] the plugin from which this extension point is defined, NULL if notdefined from plugin
- getExtensionDescriptors()
get all extension descriptions of this extension point
- getExtensions()
get all extensions of this extension point
- getId()
get unique identifier of this extensionpoint
- getName()
get human readable name of this extension point
- getSchema()
the schema describe the possible properties/configurations elements which is used in the PropertyMap. It contain examples of all possible configuration options. This can be used to configure any extensions that needs to attach to this extension point.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.ExtensionPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getId()
a unique id that uniquely identifies this extension in its owner Plugin
- getName()
a human readable name of this plugin (may contain spaces)
- getOwner()
get the owner plugin
- getPoint()
a unique global identifier of the extension point that this extension is attached to
- getProperties()
const
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.ExtensionRegistry
Bases:
object
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
- __init__()
Constructor
- clearExtensions()
Unregister all extensions.
- getExtensionDescriptors(ext_point_id)
get all descriptors registered for a specific extension point id :type ext_point_id: string :param ext_point_id: [in] identifier of extension point :rtype: std::vector< rw::core::Extension::Descriptor > :return: list of extension point descriptions
- getExtensions(ext_point_id)
get all extensions of a specific extension point :type ext_point_id: string :param ext_point_id: [in] identifier of extension point :rtype: std::vector< rw::core::Ptr< rw::core::Extension > > :return: list of extensions
- static getInstance()
get registry instance
- getPlugins()
get a list of registered plugins :rtype: std::vector< rw::core::Ptr< rw::core::Plugin > > :return: list of plugins
- registerExtensions(plugin)
register extensions and extension points of a plugin :type plugin: rw::core::Ptr< rw::core::Plugin > :param plugin: [in] the plugin that is to be registered
- property thisown
The membership flag
- unregisterExtensions(plugin)
Unregister extensions and extension points of a plugin. :type plugin: rw::core::Ptr< rw::core::Plugin > :param plugin: [in] the plugin that is to be removed.
- sdurw_core.sdurw_core.ExtensionRegistry_getInstance()
get registry instance
- class sdurw_core.sdurw_core.Factory
Bases:
ExtensionPointDOMParser
a factory for DOMParsers. This factory defines an extension point for DOMParsers. Typically this is for parsing xml files, however, anything that parses from some stream or file into a DOM structure can be a DOMParser.
- __init__()
constructor
- static getDOMParser(format)
get a DOM parser for a specific file format :type format: string :param format: [in] the extension identifying the file format (without initial dot). :rtype: rw::core::Ptr< rw::core::DOMParser > :return: a parser if found, false otherwise.
- static getSupportedFormats()
get a list of supported formats :rtype: std::vector< std::string > :return:
- static hasDOMParser(format)
check if the factory has a DOM parser for a specific format :type format: string :param format: [in] file ending like: xml, ini, txt… :rtype: boolean :return:
- property thisown
The membership flag
- sdurw_core.sdurw_core.Factory_getDOMParser(format)
get a DOM parser for a specific file format :type format: string :param format: [in] the extension identifying the file format (without initial dot). :rtype: rw::core::Ptr< rw::core::DOMParser > :return: a parser if found, false otherwise.
- sdurw_core.sdurw_core.Factory_getSupportedFormats()
get a list of supported formats :rtype: std::vector< std::string > :return:
- sdurw_core.sdurw_core.Factory_hasDOMParser(format)
check if the factory has a DOM parser for a specific format :type format: string :param format: [in] file ending like: xml, ini, txt… :rtype: boolean :return:
- class sdurw_core.sdurw_core.IOUtil
Bases:
object
Collection of IO related utilities
- __init__()
- static getAbsoluteFileName(file)
returns the absolute filename of file. If file is absolute filename then file is returned. If not, then working directory path is appended to file. :type file: string :param file: [in] the relative or absolute filename
- static getFileSize(filename)
get size of file :type filename: string :param filename: [in] name of file :rtype: int :return: the size of file in bytes
- static getFilesInFolder(*args)
Overload 1:
Returns files in the folder specified by path
Throws rw::core::Exception if unable to obtain file names.
- Parameters
path (string) – [in] Path to search in
recursive (boolean) – [in] if true files in subfolders are also added
addPath (boolean, optional) – [in] If true both path and filenames are returned. Otherwise only the filenames are returned.
mask (string, optional) – [in] Mask to filter filenames. Example: “*.dll” to return all DLL files.
- Return type
std::vector< std::string >
- Returns
Files located at path.
Overload 2:
get all files in a folder :type path: string :param path: [in] folder path :type fileMask: string :param fileMask: [in] file mask. Example: “.dll” to return all DLL files. :type recursive: boolean :param recursive: [in] if true files in subfolders are also added :type addPath: boolean :param addPath: [in] if true then folder paths are added to solution :type result: std::vector< std::string > :param result: [out] all files and if **addPath*
- static getFirstXMLElement(*args)
Overload 1:
extracts the first element tag in any xml document.
throws if not xml document or file cannot be openned :type filename: string :param filename: [in] name of the xml file :rtype: string :return: name of first xml element
Overload 2:
extracts the first element tag in any xml document.
throws if not xml document :type inputStream: std::istream :param inputStream: [in] ifstream containing the xml document :rtype: string :return: name of first xml element
- static getLastFileWrite(filename)
get the last date of writing of the file filename :type filename: string :param filename: [in] name of file :rtype: std::time_t :return: time of modification
- static isLittleEndian()
tests if this machine use little or big endian. :rtype: boolean :return: true if machine
- static readFile(file_name, result)
Read the contents of a file.
The contents of the file file_name are read into the buffer result. The result buffer is resized to match the length of the input.
Files can be lengthy which is why the result is returned via the result parameter (an alternative would be to return a smart pointer to a vector).
An exception is thrown if the file can’t be opened or can’t be read.
- Parameters
file_name (string) – [in] The name of the file.
result (std::vector< char >) – [out] Buffer to which the file contents are written.
- static resolveFileName(filename, extensions)
Attach to filename the proper extension.
Find the the suffix of extensions that when appended to filename yields the file name for readable file.
For suffix of extensions, lower case and upper case versions of this suffix are also considered.
The file name filename as is with nothing prepended at all is considered as the first thing.
If filename can’t be resolved to a readable file, an informative error message is thrown.
- Parameters
filename (string) – [in] The file name to resolve.
extensions (std::vector< std::string >) – [in] The sequence of file name suffixes.
- Return type
string
- Returns
The filename with extension
- static rwAssert(expression, file, line)
Emit an assertion message and kill the program.
rwAssert() is called by the RW_ASSERT() macro.
rwAssert() is for internal use only.
- Parameters
expression (string) – [in] The thing that wasn’t true.
file (string) – [in] The originating file name.
line (int) – [in] The originating line number.
- property thisown
The membership flag
- sdurw_core.sdurw_core.IOUtil_getAbsoluteFileName(file)
returns the absolute filename of file. If file is absolute filename then file is returned. If not, then working directory path is appended to file. :type file: string :param file: [in] the relative or absolute filename
- sdurw_core.sdurw_core.IOUtil_getFileSize(filename)
get size of file :type filename: string :param filename: [in] name of file :rtype: int :return: the size of file in bytes
- sdurw_core.sdurw_core.IOUtil_getFilesInFolder(*args)
Overload 1:
Returns files in the folder specified by path
Throws rw::core::Exception if unable to obtain file names.
- Parameters
path (string) – [in] Path to search in
recursive (boolean) – [in] if true files in subfolders are also added
addPath (boolean, optional) – [in] If true both path and filenames are returned. Otherwise only the filenames are returned.
mask (string, optional) – [in] Mask to filter filenames. Example: “*.dll” to return all DLL files.
- Return type
std::vector< std::string >
- Returns
Files located at path.
Overload 2:
get all files in a folder :type path: string :param path: [in] folder path :type fileMask: string :param fileMask: [in] file mask. Example: “.dll” to return all DLL files. :type recursive: boolean :param recursive: [in] if true files in subfolders are also added :type addPath: boolean :param addPath: [in] if true then folder paths are added to solution :type result: std::vector< std::string > :param result: [out] all files and if **addPath*
- sdurw_core.sdurw_core.IOUtil_getFirstXMLElement(*args)
Overload 1:
extracts the first element tag in any xml document.
throws if not xml document or file cannot be openned :type filename: string :param filename: [in] name of the xml file :rtype: string :return: name of first xml element
Overload 2:
extracts the first element tag in any xml document.
throws if not xml document :type inputStream: std::istream :param inputStream: [in] ifstream containing the xml document :rtype: string :return: name of first xml element
- sdurw_core.sdurw_core.IOUtil_getLastFileWrite(filename)
get the last date of writing of the file filename :type filename: string :param filename: [in] name of file :rtype: std::time_t :return: time of modification
- sdurw_core.sdurw_core.IOUtil_isLittleEndian()
tests if this machine use little or big endian. :rtype: boolean :return: true if machine
- sdurw_core.sdurw_core.IOUtil_readFile(file_name, result)
Read the contents of a file.
The contents of the file file_name are read into the buffer result. The result buffer is resized to match the length of the input.
Files can be lengthy which is why the result is returned via the result parameter (an alternative would be to return a smart pointer to a vector).
An exception is thrown if the file can’t be opened or can’t be read.
- Parameters
file_name (string) – [in] The name of the file.
result (std::vector< char >) – [out] Buffer to which the file contents are written.
- sdurw_core.sdurw_core.IOUtil_resolveFileName(filename, extensions)
Attach to filename the proper extension.
Find the the suffix of extensions that when appended to filename yields the file name for readable file.
For suffix of extensions, lower case and upper case versions of this suffix are also considered.
The file name filename as is with nothing prepended at all is considered as the first thing.
If filename can’t be resolved to a readable file, an informative error message is thrown.
- Parameters
filename (string) – [in] The file name to resolve.
extensions (std::vector< std::string >) – [in] The sequence of file name suffixes.
- Return type
string
- Returns
The filename with extension
- sdurw_core.sdurw_core.IOUtil_rwAssert(expression, file, line)
Emit an assertion message and kill the program.
rwAssert() is called by the RW_ASSERT() macro.
rwAssert() is for internal use only.
- Parameters
expression (string) – [in] The thing that wasn’t true.
file (string) – [in] The originating file name.
line (int) – [in] The originating line number.
- class sdurw_core.sdurw_core.Initializer
Bases:
object
Utility class which initializes local static variables.
If the DOMPropertyMapFormat is used outside main (as a part of global initialization/destruction), the Initializer should be used explicitly to control the static initialization/destruction order.
Notice that the Initializer is automatically defined as a global variable, hence it should not be necessary to specify the initializer explicitly if DOMPropertyMapFormat is to be used in local static initialization/destruction.
- __init__()
Initializes when constructed.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.ItImpl(*args, **kwargs)
Bases:
object
The DOMElem Iterator is initialized with a specific implementation of this interface.
- __init__(*args, **kwargs)
- clone()
clone this ItImpl object
- equal(arg2)
test if two iterators are in same state
- getElem()
get the element that the iterator is currently pointing to
- increment()
increment the iterator
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Iterator(*args)
Bases:
object
DOMElem iterator based on concrete ItImpl implementations.
- __init__(*args)
Overload 1: constructor
Overload 2: constructor
Overload 3: constructor
- addAttribute(name)
Add an attribute element. :type name: string :param name: [in] name of the attribute. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new attribute.
- addChild(*args)
Overload 1:
Add a child with an empty name. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new child element.
Overload 2:
Add a child element. :type name: string :param name: [in] name of child. :rtype: rw::core::Ptr< rw::core::DOMElem > :return: pointer to the new child element.
- getAttribute(name, optional=False)
get a attribute with a specific name. If more attributes with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. :type name: string :param name: [in] name of the attribute to find :type optional: boolean, optional :param optional: [in] :rtype: rw::core::Ptr< rw::core::DOMElem > :return: the DOMElem attribute if found, else either NULL (is optional) or an exception is
thrown.
- getAttributeValue(*args)
Overload 1:
Get the value of attribute as a string. :type name: string :param name: [in] the name of the attribute. :rtype: string :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (string) – [in] a default value to return if attibute is not found.
- getAttributeValueAsBool(*args)
Overload 1:
Get the value of attribute as an boolean. :type name: string :param name: [in] the name of the attribute. :rtype: boolean :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (boolean) – [in] a default value to return if attibute is not found.
- getAttributeValueAsDouble(*args)
Overload 1:
Get the value of attribute as an double. :type name: string :param name: [in] the name of the attribute. :rtype: float :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (float) – [in] a default value to return if attibute is not found.
- getAttributeValueAsInt(*args)
Overload 1:
Get the value of attribute as an integer. :type name: string :param name: [in] the name of the attribute. :rtype: int :return: the value.
Overload 2:
std::string&)
- Parameters
default_value (int) – [in] a default value to return if attibute is not found.
- getAttributes()
Get iterator to attributes. :rtype: rw::core::DOMElem::IteratorPair :return: iterator pair for the first and last attributes.
- getChild(name, optional=False)
get a child with a specific name. If more children with the same name occur then it cannot be guaranteed which is returned. If optional is false then an exception will be thrown if the child cannot be found. If optional is true then NULL is returned if child is not found. :type name: string :param name: [in] name of the child to find :type optional: boolean, optional :param optional: [in] :rtype: rw::core::Ptr< rw::core::DOMElem > :return: the DOMElem child if found, else either NULL (is optional) or an exception is
thrown.
- getChildren()
Get iterator to child elements. :rtype: rw::core::DOMElem::IteratorPair :return: iterator pair for the first and last elements.
- getName()
get name of this DOMElem :rtype: string :return: name of DOMElem
- getValue()
get string value of this DOMElem :rtype: string :return: string value of this elem
- getValueAsBool()
Get the value as a boolean. :rtype: boolean :return: boolean value.
- getValueAsDouble()
get value as an double floating point, throws an exception if this is not an double value. :rtype: float :return: the double value
- getValueAsDoubleList(*args)
Overload 1:
get value as a list of doubles, throws an exception if this is not a list of doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of doubles
Overload 2:
get value as a list of N doubles, throws an exception if this is not a list of N doubles. The default string seperator is space ( ). :rtype: std::vector< double > :return: list of N doubles
- getValueAsInt()
get value as an integer, throws an exception if this is not an int value. :rtype: int :return: the int value
- getValueAsStringList(*args)
get value as a list of strings, throws an exception if this is not a list of strings. The default string seperator is semicolon (;). :rtype: std::vector< std::string > :return: list of strings
- hasAttribute(name)
test if this DOMElem has an attribute by name name. :type name: string :param name: [in] name of the attribute DOMElem :rtype: boolean :return: true if this DOMElem has an attribute with name name
- hasChild(name)
test if this DOMElem has a child by name name. :type name: string :param name: [in] name of the child DOMElem :rtype: boolean :return: true if this DOMElem has a child with name name
- hasChildren()
test if this DOMElem has any children :rtype: boolean :return: true if this DOMElem has any children
- isName(elemname)
test if name of this elem equals elemname :type elemname: string :param elemname: [in] string name to test with :rtype: boolean :return: true if elemname equals name of this DOMElem, false otherwise
- setName(val)
Set the name of this element. :type val: string :param val: [in] new name.
- setValue(*args)
Overload 1:
Set the value of this element. :type val: string :param val: [in] new value.
- Overload 2:
std::string&)
- Overload 3:
std::string&)
- Overload 4:
std::string&)
- Overload 5:
std::string&)
- setValueString(val)
std::string&)
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Log
Bases:
object
Provides basic log functionality.
The Log class owns a number of LogWriters in a static map, which can be accessed using a string identifier. All logs are global.
By default the Log class contains a Debug, Info, Warning and Error log. These can be accessed statically as:
Log::debugLog() << "This is an debug message"; Log::infoLog() << "This is an info message"; Log::warnLog() << "This is an error message"; Log::errorLog() << "This is an error message";
or on the log instance
Log &log = Log::log(); log.debug() << "This is an debug message"; log.info() << "This is an info message"; log.warn() << "This is an error message"; log.error() << "This is an error message";
or using one one the RW_LOG, RW_LOGLINE or RW_LOG2 macros, e.g.
RW_LOG_INFO("The value of x is "<<x); RW_LOG_DEBUG("The value of x is "<<x); RW_LOG_ERROR(Log::infoId(), "The value of x is "<<x);
You can control what logs are active both using a loglevel and by using a log mask. The loglevel enables all logs with LogIndex lower or equal to the loglevel. As default loglevel is LogIndex::info which means debug and all user logs are disabled. However, logs can be individually enabled using log masks which will override loglevel setting.
Notice that logmasks cannot disable logs that are below or equal to loglevel.
change loglevel:
Log::log().setLevel(Log::Debug);
- AllMask = 65535
- Critical = 1
- CriticalMask = 2
- Debug = 5
- DebugMask = 32
- Error = 2
- ErrorMask = 4
- Fatal = 0
- FatalMask = 1
- Info = 4
- InfoMask = 16
- User1 = 6
- User1Mask = 64
- User2 = 7
- User2Mask = 128
- User3 = 8
- User3Mask = 256
- User4 = 9
- User4Mask = 512
- User5 = 10
- User5Mask = 1024
- User6 = 11
- User6Mask = 2048
- User7 = 12
- User7Mask = 4096
- User8 = 13
- User8Mask = 8096
- Warning = 3
- WarningMask = 8
- __init__()
constructor
- debug()
convenience function for getting the LogWriter that is associated with the debug loglevel :rtype:
LogWriter
:return: info LogWriter
- static debugLog()
convenience function for getting the LogWriter that is associated with the debug loglevel :rtype:
LogWriter
:return: debug LogWriter
- decreaseTabLevel()
Decrease the indentation.
- error()
convenience function for getting the LogWriter that is associated with the error loglevel :rtype:
LogWriter
:return: info LogWriter
- static errorLog()
convenience function for getting the LogWriter that is associated with the error loglevel :rtype:
LogWriter
:return: error LogWriter
- flush(id)
Calls flush on the specified log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] loglevel
- flushAll()
Calls flush on all logs
- get(id)
Returns the LogWriter that is associated with LogIndex id
If the id is unknown an exception is thrown.
- Parameters
id (int) – [in] loglevel
- Return type
- Returns
Reference to LogWriter object
- static getInstance()
returns the global log instance. Global in the sence of whatever is linked staticly together. :rtype:
Ptr
:return: a Log
- getLogIndexMask()
get the current log mask :rtype: int :return: the LogIndex Notes: DEPRECATED. To be removed
- getLogWriter(id)
Returns the LogWriter that is associated with LogIndex id
If the id is unknown an exception is thrown.
- Parameters
id (int) – [in] loglevel
- Return type
- Returns
Reference to LogWriter object
- getWriter(id)
gets the log writer associated to logindex id :type id: int :param id: [in] logindex :rtype:
Ptr
:return: log writer
- increaseTabLevel()
Make indentation to make logs easier to read.
- info()
convenience function for getting the LogWriter that is associated with the info loglevel :rtype:
LogWriter
:return: info LogWriter
- static infoLog()
convenience function for getting the LogWriter that is associated with the info loglevel :rtype:
LogWriter
:return: info LogWriter
- isEnabled(idx)
Checks if the given LogIndex is enabled. This can be used to determine if a certain log level will be displayed or not. :type idx: int :param idx: [in] the level
- remove(id)
Removes a log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
- removeAll()
Removes all log writers
- setDisable(mask)
Disable log(s) given by log mask. :type mask: int :param mask: [in] the mask for the logs to disable.
- setEnable(mask)
Enable log(s) given by log mask. :type mask: int :param mask: [in] the mask for the logs to enable.
- setLevel(loglevel)
set the loglevel. Any log with LogIndex equal to or less than loglevel will be enabled. Any log above will be disabled unless an enabled mask is specified for that log :type loglevel: int :param loglevel: [in] the level
- static setLog(log)
sets the instance of the log class :type log:
Ptr
:param log: [in] the log that will be used through the static log methods.
- setLogIndexMask(mask)
the loglevel is a runtime handle for enabling/disabling logging to specific loglevels. :type mask: int :param mask:
Notes: DEPRECATED. Use setEnable/setDisable instead
- setWriter(id, writer)
Associates a LogWriter with the LogIndex id.
SetWriter can either be used to redefine an existing log or to create a new custom output.
Example:
Log::SetWriter(Log::User1, new LogStreamWriter(std::cout)); RW_LOG(Log::User1, "Message send to User log 1");
- Parameters
id (int) – [in] the LogIndex that the logwriter is associated with.
writer (
Ptr
) – [in] LogWriter object to use
- setWriterForMask(mask, writer)
Associates a LogWriter with the logs specified with mask.
SetWriter can either be used to redefine an existing log or to create a new custom output.
Example:
log.setWriterForMask(Log::InfoMask | Log::DebugMask, new LogStreamWriter(std::cout)); RW_LOG(Log::Info, "Message send to User log 1");
- Parameters
mask (int) – [in] the LogIndexMask that the logwriter is associated with.
writer (
Ptr
) – [in] LogWriter object to use
- property thisown
The membership flag
- static toMask(idx)
Convert a LogIndex to a mask. :type idx: int :param idx: [in] the LogIndex. :rtype: int :return: the mask enabling the given log level.
- warning()
convenience function for getting the LogWriter that is associated with the warning loglevel :rtype:
LogWriter
:return: info LogWriter
- static warningLog()
convenience function for getting the LogWriter that is associated with the warning loglevel :rtype:
LogWriter
:return: warning LogWriter
- write(*args)
Overload 1:
Writes message to the log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
message (string) – [in] String message to write
Overload 2:
Writes message to the logwriter associated with LogIndex id
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
message (
Message
) – [in] Message to write
- writeln(id, message)
Writes message followed by a ‘n’ to the log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
message (string) – [in] Message to write
- class sdurw_core.sdurw_core.LogCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getLogIndexMask()
get the current log mask :rtype: int :return: the LogIndex Notes: DEPRECATED. To be removed
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.LogPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- debug()
convenience function for getting the LogWriter that is associated with the debug loglevel :rtype:
LogWriter
:return: info LogWriter
- debugLog()
convenience function for getting the LogWriter that is associated with the debug loglevel :rtype:
LogWriter
:return: debug LogWriter
- decreaseTabLevel()
Decrease the indentation.
- deref()
The pointer stored in the object.
- error()
convenience function for getting the LogWriter that is associated with the error loglevel :rtype:
LogWriter
:return: info LogWriter
- errorLog()
convenience function for getting the LogWriter that is associated with the error loglevel :rtype:
LogWriter
:return: error LogWriter
- flush(id)
Calls flush on the specified log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] loglevel
- flushAll()
Calls flush on all logs
- get(id)
Returns the LogWriter that is associated with LogIndex id
If the id is unknown an exception is thrown.
- Parameters
id (int) – [in] loglevel
- Return type
- Returns
Reference to LogWriter object
- getDeref()
Member access operator.
- getInstance()
returns the global log instance. Global in the sence of whatever is linked staticly together. :rtype:
Ptr
:return: a Log
- getLogIndexMask()
get the current log mask :rtype: int :return: the LogIndex Notes: DEPRECATED. To be removed
- getLogWriter(id)
Returns the LogWriter that is associated with LogIndex id
If the id is unknown an exception is thrown.
- Parameters
id (int) – [in] loglevel
- Return type
- Returns
Reference to LogWriter object
- getWriter(id)
gets the log writer associated to logindex id :type id: int :param id: [in] logindex :rtype:
Ptr
:return: log writer
- increaseTabLevel()
Make indentation to make logs easier to read.
- info()
convenience function for getting the LogWriter that is associated with the info loglevel :rtype:
LogWriter
:return: info LogWriter
- infoLog()
convenience function for getting the LogWriter that is associated with the info loglevel :rtype:
LogWriter
:return: info LogWriter
- isEnabled(idx)
Checks if the given LogIndex is enabled. This can be used to determine if a certain log level will be displayed or not. :type idx: int :param idx: [in] the level
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- remove(id)
Removes a log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
- removeAll()
Removes all log writers
- setDisable(mask)
Disable log(s) given by log mask. :type mask: int :param mask: [in] the mask for the logs to disable.
- setEnable(mask)
Enable log(s) given by log mask. :type mask: int :param mask: [in] the mask for the logs to enable.
- setLevel(loglevel)
set the loglevel. Any log with LogIndex equal to or less than loglevel will be enabled. Any log above will be disabled unless an enabled mask is specified for that log :type loglevel: int :param loglevel: [in] the level
- setLog(log)
sets the instance of the log class :type log:
Ptr
:param log: [in] the log that will be used through the static log methods.
- setLogIndexMask(mask)
the loglevel is a runtime handle for enabling/disabling logging to specific loglevels. :type mask: int :param mask:
Notes: DEPRECATED. Use setEnable/setDisable instead
- setWriter(id, writer)
Associates a LogWriter with the LogIndex id.
SetWriter can either be used to redefine an existing log or to create a new custom output.
Example:
Log::SetWriter(Log::User1, new LogStreamWriter(std::cout)); RW_LOG(Log::User1, "Message send to User log 1");
- Parameters
id (int) – [in] the LogIndex that the logwriter is associated with.
writer (
Ptr
) – [in] LogWriter object to use
- setWriterForMask(mask, writer)
Associates a LogWriter with the logs specified with mask.
SetWriter can either be used to redefine an existing log or to create a new custom output.
Example:
log.setWriterForMask(Log::InfoMask | Log::DebugMask, new LogStreamWriter(std::cout)); RW_LOG(Log::Info, "Message send to User log 1");
- Parameters
mask (int) – [in] the LogIndexMask that the logwriter is associated with.
writer (
Ptr
) – [in] LogWriter object to use
- property thisown
The membership flag
- toMask(idx)
Convert a LogIndex to a mask. :type idx: int :param idx: [in] the LogIndex. :rtype: int :return: the mask enabling the given log level.
- warning()
convenience function for getting the LogWriter that is associated with the warning loglevel :rtype:
LogWriter
:return: info LogWriter
- warningLog()
convenience function for getting the LogWriter that is associated with the warning loglevel :rtype:
LogWriter
:return: warning LogWriter
- write(*args)
Overload 1:
Writes message to the log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
message (string) – [in] String message to write
Overload 2:
Writes message to the logwriter associated with LogIndex id
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
message (
Message
) – [in] Message to write
- writeln(id, message)
Writes message followed by a ‘n’ to the log
If the id cannot be found an exception is thrown
- Parameters
id (int) – [in] Log identifier
message (string) – [in] Message to write
- class sdurw_core.sdurw_core.LogWriter(*args, **kwargs)
Bases:
object
Write interface for Logs
LogWriter provides an output strategy for a log.
- __init__(*args, **kwargs)
- flush()
Flush method
- setTabLevel(tabLevel)
Set the tab level
- property thisown
The membership flag
- write(*args)
Overload 1:
Writes str to the log :type str: string :param str: [in] message to write
Overload 2:
Writes msg to the log
Default behavior is to use write(const std::string&) for the standard streaming representation of msg.
- Parameters
msg (
Message
) – [in] message to write
- writeln(str)
Writes str as a line
By default writeln writes str followed by a ‘n’. However, logs are free to implement a line change differently.
- class sdurw_core.sdurw_core.LogWriterCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.LogWriterPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- flush()
Flush method
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- setTabLevel(tabLevel)
Set the tab level
- property thisown
The membership flag
- write(*args)
Overload 1:
Writes str to the log :type str: string :param str: [in] message to write
Overload 2:
Writes msg to the log
Default behavior is to use write(const std::string&) for the standard streaming representation of msg.
- Parameters
msg (
Message
) – [in] message to write
- writeln(str)
Writes str as a line
By default writeln writes str followed by a ‘n’. However, logs are free to implement a line change differently.
- sdurw_core.sdurw_core.Log_debugLog()
convenience function for getting the LogWriter that is associated with the debug loglevel :rtype:
LogWriter
:return: debug LogWriter
- sdurw_core.sdurw_core.Log_errorLog()
convenience function for getting the LogWriter that is associated with the error loglevel :rtype:
LogWriter
:return: error LogWriter
- sdurw_core.sdurw_core.Log_getInstance()
returns the global log instance. Global in the sence of whatever is linked staticly together. :rtype:
Ptr
:return: a Log
- sdurw_core.sdurw_core.Log_infoLog()
convenience function for getting the LogWriter that is associated with the info loglevel :rtype:
LogWriter
:return: info LogWriter
- sdurw_core.sdurw_core.Log_setLog(log)
sets the instance of the log class :type log:
Ptr
:param log: [in] the log that will be used through the static log methods.
- sdurw_core.sdurw_core.Log_toMask(idx)
Convert a LogIndex to a mask. :type idx: int :param idx: [in] the LogIndex. :rtype: int :return: the mask enabling the given log level.
- sdurw_core.sdurw_core.Log_warningLog()
convenience function for getting the LogWriter that is associated with the warning loglevel :rtype:
LogWriter
:return: warning LogWriter
- class sdurw_core.sdurw_core.Message(*args)
Bases:
object
Standard type for user messages of robwork.
Messages are used for exception, warnings, and other things that are reported to the user.
Message values should contain the source file name and line number so that it is easy to look up the place in the code responsible for the generation of the message.
RW_THROW and RW_WARN of macros.hpp have been introduced for the throwing of exceptions and emission of warnings.
- __init__(*args)
Constructor
Messages of RobWork are all annotated by the originating file name, the originating line number, and a message text for the user.
Supplying all the file, line, and message parameters can be a little painfull, so a utility for creating messages is available from the file macros.hpp.
- Parameters
file (string) – [in] The source file name.
line (int) – [in] The source file line number.
message (string, optional) – [in] A message for a user.
- getFile()
The name of source file within which the message was constructed.
- Return type
string
- Returns
The exception file name.
- getFullText()
Returns a full description of the message containing file, line number and message.
- getLine()
The line number for the file at where the message was constructed.
- Return type
int
- Returns
The exception line number.
- getText()
The message text meant for the user.
- Return type
string
- Returns
The message text.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.OS
Bases:
object
encapsulates os dependent functionality
- static InstallPluginLocation(*args)
find the location of where installed robwork plugins are placed. :type pack: string, optional :param pack: [in] this is used for some systems where RobWork, RobWorkSim, RobWorkHardware and
RobWorkStudio don’t install the plugins in the same location. This variable takes one of four strings as argument {RobWork, RobWorkSim, RobWorkHardware and RobWorkStudio}
- Return type
string
- Returns
return “” if location not found
- __init__()
- static getDLLExtension()
get the extension for dynamic linked libraries :rtype: string :return: returns the extension without a . infront
- property thisown
The membership flag
- sdurw_core.sdurw_core.OS_InstallPluginLocation(*args)
find the location of where installed robwork plugins are placed. :type pack: string, optional :param pack: [in] this is used for some systems where RobWork, RobWorkSim, RobWorkHardware and
RobWorkStudio don’t install the plugins in the same location. This variable takes one of four strings as argument {RobWork, RobWorkSim, RobWorkHardware and RobWorkStudio}
- Return type
string
- Returns
return “” if location not found
- sdurw_core.sdurw_core.OS_getDLLExtension()
get the extension for dynamic linked libraries :rtype: string :return: returns the extension without a . infront
- class sdurw_core.sdurw_core.Pair_i_i(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Pair_s_s(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Plugin(*args, **kwargs)
Bases:
object
this define is to be used whenever dynamically loadable RobWork libraries are being created. Simply add this in the bottom of the .cpp file which defines you plugin. RW_ADD_PLUGIN(MyPluginName)
where MyPluginName is the name of your plugin including namespace. So if your plugin is named: “rw::example::MyExamplePlugin” then you should use the complete name.
an interface for defining dynamically loadable plugins that define extensions and extension points.
- __init__(*args, **kwargs)
- getExtensionDescriptors()
get all extension descriptors of this plugin
- getExtensionPointIDs()
get a list of extension point ids which this plugin define :rtype: std::vector< std::string > :return: list of extension points ids.
- getHandle()
Get the low-level handle of the plugin (for internal use). :rtype: rw::core::Plugin::OSHandle :return: the handle.
- getId()
Get unique identifier of plugin. :rtype: string :return: the identifier.
- getName()
Get human readable identifier for the plugin. :rtype: string :return: the identifier.
- getVersion()
Get version of plugin. :rtype: string :return: the version.
- static load(filename)
Load the plugin given by filename.
A filename with .xml extension will be loaded as a lazy plugin.
Notice that the smart pointer returned will automatically unload the plugin when there are no more references to the plugin.
- Parameters
filename (string) – [in] the filename.
- Return type
rw::core::Ptr< rw::core::Plugin >
- Returns
the plugin, or NULL if load failed.
- makeExtension(id)
get a specific extension using the unique extendion ID
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PluginCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PluginPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getExtensionDescriptors()
get all extension descriptors of this plugin
- getExtensionPointIDs()
get a list of extension point ids which this plugin define :rtype: std::vector< std::string > :return: list of extension points ids.
- getHandle()
Get the low-level handle of the plugin (for internal use). :rtype: rw::core::Plugin::OSHandle :return: the handle.
- getId()
Get unique identifier of plugin. :rtype: string :return: the identifier.
- getName()
Get human readable identifier for the plugin. :rtype: string :return: the identifier.
- getVersion()
Get version of plugin. :rtype: string :return: the version.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- load(filename)
Load the plugin given by filename.
A filename with .xml extension will be loaded as a lazy plugin.
Notice that the smart pointer returned will automatically unload the plugin when there are no more references to the plugin.
- Parameters
filename (string) – [in] the filename.
- Return type
rw::core::Ptr< rw::core::Plugin >
- Returns
the plugin, or NULL if load failed.
- makeExtension(id)
get a specific extension using the unique extendion ID
- property thisown
The membership flag
- sdurw_core.sdurw_core.Plugin_load(filename)
Load the plugin given by filename.
A filename with .xml extension will be loaded as a lazy plugin.
Notice that the smart pointer returned will automatically unload the plugin when there are no more references to the plugin.
- Parameters
filename (string) – [in] the filename.
- Return type
rw::core::Ptr< rw::core::Plugin >
- Returns
the plugin, or NULL if load failed.
- sdurw_core.sdurw_core.Property(identifier, description, value)
Create a new Property identifier [str]: the id of the property description [str]: description of the property value [mixed]: the value of the property
- class sdurw_core.sdurw_core.PropertyBase(*args, **kwargs)
Bases:
object
Base class for Property handling
- __init__(*args, **kwargs)
- changedEvent()
get changed event
to add listener use: changedEvent().add(…)
- clone()
Construct a clone of the property.
- getDescription()
Returns description :rtype: string :return: string description
- getIdentifier()
Returns the Property identifier :rtype: string :return: string identifier
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype:
PropertyValueBase
:return: valueOverload 2:
returns const reference to the property value :rtype:
PropertyValueBase
:return: value
- getType()
Returns the PropertyType :rtype:
PropertyType
:return: the PropertyType
- setDescription(desc, fireChangedEvent=True)
Set description. :type desc: string :param desc: [in] the new description. :type fireChangedEvent: boolean, optional :param fireChangedEvent: [in] (optional) fire changed event.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyBaseCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- clone()
Construct a clone of the property.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getDescription()
Returns description :rtype: string :return: string description
- getIdentifier()
Returns the Property identifier :rtype: string :return: string identifier
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype:
PropertyValueBase
:return: valueOverload 2:
returns const reference to the property value :rtype:
PropertyValueBase
:return: value
- getType()
Returns the PropertyType :rtype:
PropertyType
:return: the PropertyType
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyBasePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- changedEvent()
get changed event
to add listener use: changedEvent().add(…)
- clone()
Construct a clone of the property.
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getDescription()
Returns description :rtype: string :return: string description
- getIdentifier()
Returns the Property identifier :rtype: string :return: string identifier
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype:
PropertyValueBase
:return: valueOverload 2:
returns const reference to the property value :rtype:
PropertyValueBase
:return: value
- getType()
Returns the PropertyType :rtype:
PropertyType
:return: the PropertyType
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- setDescription(desc, fireChangedEvent=True)
Set description. :type desc: string :param desc: [in] the new description. :type fireChangedEvent: boolean, optional :param fireChangedEvent: [in] (optional) fire changed event.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyMap(*args)
Bases:
object
Container for a collection of Property Objects
This container is used to bind various user information to for example Frame.
Example: Getting a string property with ID “Camera” from a frame
const std::string* ptr = frame.getPropertyMap().getPtr<std::string>("Camera"); if (ptr) { std::cout << "Property 'Camera' has value " << *ptr << "\n"; }
- __init__(*args)
Overload 1:
Constructor
Overload 2:
constructor :type name: string :param name: [in] name of this propertymap
Overload 3:
Copy constructor.
- add(property)
Adds a property to the map
This will fire a PropertyChangedEvent.
- Parameters
property (
Ptr
) – [in] Property to add- Return type
boolean
- Returns
True if added, false if property already exists.
- addChangedListener(callback)
Add listener to be call, when the property changes :type callback: rw::core::PropertyMap::PropertyChangedListener :param callback: [in] Callback method
- clear()
Clear the content of the property map
- clearChangedListeners()
Clears the list of changed listeners
- empty()
True iff the property map contains no properties.
- erase(identifier)
Remove a property
- Return type
boolean
- Returns
true if the property was successfully removed.
- findPropertyBase(identifier)
Find the property base for an identifier.
The find methods returns pointer to PropertyBase object or NULL if a property base with that identifier does not exist.
- Parameters
identifier (string) – [in] identifier for the property base to find.
- getBool(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
boolean
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
boolean
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (boolean) – [in] the value that will be returned if property with identifier is not found.
- Return type
boolean
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (boolean) – [in] the value that will be returned if property with identifier is not found.
- Return type
boolean
- Returns
the value of the property if it exists, else defval is returned
- getDouble(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
float
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
float
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (float) – [in] the value that will be returned if property with identifier is not found.
- Return type
float
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (float) – [in] the value that will be returned if property with identifier is not found.
- Return type
float
- Returns
the value of the property if it exists, else defval is returned
- getFloat(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
float
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
float
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (float) – [in] the value that will be returned if property with identifier is not found.
- Return type
float
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (float) – [in] the value that will be returned if property with identifier is not found.
- Return type
float
- Returns
the value of the property if it exists, else defval is returned
- getInt(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
int
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
int
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (int) – [in] the value that will be returned if property with identifier is not found.
- Return type
int
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (int) – [in] the value that will be returned if property with identifier is not found.
- Return type
int
- Returns
the value of the property if it exists, else defval is returned
- getName()
get the name of this propertymap :rtype: string :return: name of this propertymap
- getString(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
string
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
string
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (string) – [in] the value that will be returned if property with identifier is not found.
- Return type
string
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (string) – [in] the value that will be returned if property with identifier is not found.
- Return type
string
- Returns
the value of the property if it exists, else defval is returned
- getVectorBool(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< bool >
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< bool >
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< bool >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< bool >
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< bool >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< bool >
- Returns
the value of the property if it exists, else defval is returned
- getVectorDouble(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< double >
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< double >
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< double >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< double >
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< double >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< double >
- Returns
the value of the property if it exists, else defval is returned
- getVectorFloat(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< float >
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< float >
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< float >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< float >
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< float >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< float >
- Returns
the value of the property if it exists, else defval is returned
- getVectorInt(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< int >
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< int >
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< int >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< int >
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< int >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< int >
- Returns
the value of the property if it exists, else defval is returned
- getVectorString(*args)
Overload 1:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< std::string >
- Returns
the value of the property
Overload 2:
Get the value of a property
If a property of the given identifier and type cannot be found, the method throws an exception
- Parameters
identifier (string) – [in] the identifier of the property
- Return type
std::vector< std::string >
- Returns
the value of the property
Overload 3:
Get the value of a property if it exists.
If a property of the given identifier and type cannot be found, the method returns the default value defval.
example int iterations = map.get<int>(“Iterations”, 20);
This will fire a PropertyChangedEvent if a new property is added. Notice that a new property is inserted in the map with the default value if it does not already exist.
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< std::string >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< std::string >
- Returns
the value of the property if it exists, else defval is returned
Overload 4:
Get the value of a property
If a property of the given identifier and type cannot be found method throws an exception
example int iterations = map.get<int>(“Iterations”, 20);
- Parameters
identifier (string) – [in] the identifier of the property
defval (std::vector< std::string >) – [in] the value that will be returned if property with identifier is not found.
- Return type
std::vector< std::string >
- Returns
the value of the property if it exists, else defval is returned
- has(identifier)
True if a specific property exists
- Parameters
identifier (string) – [in] The identifier of the property
- Return type
boolean
- Returns
true if the property exists
- notifyListeners(base=None)
Notifies listeners about a change in the Property
- propertyChangedListener(base)
used for listening for property changes in the map :type base:
PropertyBase
:param base:
- setBool(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (boolean) – [in] the new value
- setDouble(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (float) – [in] the new value
- setFloat(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (float) – [in] the new value
- setInt(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (int) – [in] the new value
- setString(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (string) – [in] the new value
- setVectorBool(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (std::vector< bool >) – [in] the new value
- setVectorDouble(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (std::vector< double >) – [in] the new value
- setVectorFloat(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (std::vector< float >) – [in] the new value
- setVectorInt(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (std::vector< int >) – [in] the new value
- setVectorString(identifier, value)
Set the value of a property
If a property with the given identifier cannot be found, a new property with no description is created and inserted.
This will fire a PropertyChangedEvent.
- Parameters
identifier (string) – [in] the property identifier
value (std::vector< std::string >) – [in] the new value
- size()
The number of properties
- swap(other)
swap operator.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyPropertyMap(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (
PropertyMap
) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value:PropertyMap
:param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< rw::core::PropertyMap > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< rw::core::PropertyMap > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype:
PropertyMap
:return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (
PropertyMap
) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyType(*args)
Bases:
object
Represents type of a property
PropertyType has a number of predefined property types. Besides it generates unique id’s for new user defined types
- Bool = 7
bool
- Double = 5
double
- DoubleList = 24
std::vector<double>
- EAA = 14
rw::math::EAA
- Float = 4
float
- Int = 6
int
- IntList = 23
std::vector<int>
- PropertyMap = 0
PropertyMap
- PropertyMapPtr = 1
PropertyMap::Ptr
- PropertyValueBasePtrList = 2
std::vector<rw::core::PropertyValueBase::Ptr>
- Q = 10
rw::math::Q
- QPath = 18
rw::trajectory::QPath
- QPathPtr = 19
rw::trajectory::QPath::Ptr
- Quaternion = 15
rw::math::Quaternion
- RPY = 13
rw::math::RPY
- Rotation2D = 16
rw::math::Rotation2D
- Rotation3D = 12
rw::math::Rotation3D
- String = 3
std::string
- StringList = 22
std::vector<std::string>
- Transform3D = 11
rw::math::Transform3D
- Transform3DPath = 20
rw::trajectory::Transform3DPath
- Transform3DPathPtr = 21
rw::trajectory::Transform3DPath::Ptr
- Unknown = -1
Unknown type
- User = 1024
First user defined type. Returned by first call to PropertyType::getNewID()
- Vector2D = 9
rw::math::Vector2D
- Vector3D = 8
rw::math::Vector3D
- VelocityScrew6D = 17
rw::math::VelocityScrew6D
- __init__(*args)
Overload 1:
brief Constructs PropertyType with type UNKNOWN
Overload 2:
Construct PropertyType with the specified type
- Parameters
id (int) – [in] either one of the predefined types or a user defined type, generated by getNewID().
- getId()
Returns id of the type :rtype: int :return: the id
- static getNewID()
Constructs a new ID for a property type. The ID will be unique :rtype: int :return: the id
- static getType(*args)
Overload 1:
Get the type of a value resolved at compile time. :type value:
PropertyMap
:param value: [in] the value to deduct type for. :rtype:PropertyType
:return: the PropertyType corresponding to the type of the given value.- Overload 2:
rw::core::PropertyMap&)
- Overload 3:
rw::core::PropertyMap&)
- Overload 4:
rw::core::PropertyMap&)
- Overload 5:
rw::core::PropertyMap&)
- Overload 6:
rw::core::PropertyMap&)
- Overload 7:
rw::core::PropertyMap&)
- Overload 8:
rw::core::PropertyMap&)
- Overload 9:
rw::core::PropertyMap&)
- Overload 10:
rw::core::PropertyMap&)
- Overload 11:
rw::core::PropertyMap&)
- Overload 12:
rw::core::PropertyMap&)
- Overload 13:
rw::core::PropertyMap&)
- Overload 14:
rw::core::PropertyMap&)
- Overload 15:
rw::core::PropertyMap&)
- Overload 16:
rw::core::PropertyMap&)
- Overload 17:
rw::core::PropertyMap&)
- Overload 18:
rw::core::PropertyMap&)
- Overload 19:
rw::core::PropertyMap&)
- Overload 20:
rw::core::PropertyMap&)
- Overload 21:
rw::core::PropertyMap&)
- Overload 22:
rw::core::PropertyMap&)
- Overload 23:
rw::core::PropertyMap&)
- property thisown
The membership flag
- sdurw_core.sdurw_core.PropertyType_getNewID()
Constructs a new ID for a property type. The ID will be unique :rtype: int :return: the id
- sdurw_core.sdurw_core.PropertyType_getType(*args)
Overload 1:
Get the type of a value resolved at compile time. :type value:
PropertyMap
:param value: [in] the value to deduct type for. :rtype:PropertyType
:return: the PropertyType corresponding to the type of the given value.- Overload 2:
rw::core::PropertyMap&)
- Overload 3:
rw::core::PropertyMap&)
- Overload 4:
rw::core::PropertyMap&)
- Overload 5:
rw::core::PropertyMap&)
- Overload 6:
rw::core::PropertyMap&)
- Overload 7:
rw::core::PropertyMap&)
- Overload 8:
rw::core::PropertyMap&)
- Overload 9:
rw::core::PropertyMap&)
- Overload 10:
rw::core::PropertyMap&)
- Overload 11:
rw::core::PropertyMap&)
- Overload 12:
rw::core::PropertyMap&)
- Overload 13:
rw::core::PropertyMap&)
- Overload 14:
rw::core::PropertyMap&)
- Overload 15:
rw::core::PropertyMap&)
- Overload 16:
rw::core::PropertyMap&)
- Overload 17:
rw::core::PropertyMap&)
- Overload 18:
rw::core::PropertyMap&)
- Overload 19:
rw::core::PropertyMap&)
- Overload 20:
rw::core::PropertyMap&)
- Overload 21:
rw::core::PropertyMap&)
- Overload 22:
rw::core::PropertyMap&)
- Overload 23:
rw::core::PropertyMap&)
- class sdurw_core.sdurw_core.PropertyValueBase(*args, **kwargs)
Bases:
object
Base class for Property handling
- __init__(*args, **kwargs)
- changedEvent()
get changed event
to add listener use: changedEvent().add(…)
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getType()
Returns the PropertyType :rtype:
PropertyType
:return: the PropertyType
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValueBaseCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getType()
Returns the PropertyType :rtype:
PropertyType
:return: the PropertyType
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValueBasePtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- changedEvent()
get changed event
to add listener use: changedEvent().add(…)
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- cptr()
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getType()
Returns the PropertyType :rtype:
PropertyType
:return: the PropertyType
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValuePropertyMap(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (
PropertyMap
) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value:PropertyMap
:param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype:
PropertyMap
:return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (
PropertyMap
) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValueVector_d(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (std::vector< double >) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: std::vector< double > :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
std::vector< double >
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: std::vector< double > :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (std::vector< double >) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValueVector_i(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (std::vector< int >) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: std::vector< int > :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
std::vector< int >
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: std::vector< int > :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (std::vector< int >) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValueVector_s(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (std::vector< std::string >) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: std::vector< std::string > :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
std::vector< std::string >
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: std::vector< std::string > :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (std::vector< std::string >) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValue_b(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (boolean) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: boolean :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
boolean
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: boolean :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (boolean) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValue_d(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (float) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: float :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
float
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: float :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (float) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValue_f(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (float) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: float :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
float
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: float :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (float) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValue_i(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (int) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: int :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
int
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: int :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (int) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyValue_s(*args)
Bases:
PropertyValueBase
PropertyValue class
The PropertyValue class is a template to support property values of any type.
- __init__(*args)
Overload 1:
Constructs PropertyValue.
Constructs a PropertyValue and tries to auto detect the type.
- Parameters
value (string) – [in] value
Overload 2:
Constructs PropertyValue. :type type:
PropertyType
:param type: [in] type of property :type value: string :param value: [in] value
- clone()
Construct a clone of the property value.
- Return type
- Returns
a clone.
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
string
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: string :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (string) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyVector_d(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (std::vector< double >) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: std::vector< double > :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< std::vector< double > > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< std::vector< double > > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
std::vector< double >
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: std::vector< double > :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (std::vector< double >) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyVector_i(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (std::vector< int >) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: std::vector< int > :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< std::vector< int > > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< std::vector< int > > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
std::vector< int >
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: std::vector< int > :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (std::vector< int >) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.PropertyVector_s(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (std::vector< std::string >) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: std::vector< std::string > :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< std::vector< std::string > > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< std::vector< std::string > > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
std::vector< std::string >
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: std::vector< std::string > :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (std::vector< std::string >) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Property_b(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (boolean) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: boolean :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< bool > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< bool > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
boolean
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: boolean :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (boolean) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Property_d(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (float) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: float :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< double > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< double > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
float
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: float :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (float) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Property_f(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (float) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: float :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< float > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< float > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
float
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: float :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (float) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Property_i(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (int) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: int :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< int > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< int > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
int
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: int :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (int) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.Property_s(*args)
Bases:
PropertyBase
Property class The Property class is a template to support properties of any type. A Property is characterized by a string identifier, string description and a value of the template specified type.
- __init__(*args)
Overload 1:
Constructs Property.
Constructs a Property and tries to auto detect the type.
- Parameters
identifier (string) – [in] identifier
description (string) – [in] description
value (string) – [in] value
Overload 2:
Constructs Property. :type identifier: string :param identifier: [in] identifier :type description: string :param description: [in] description :type type:
PropertyType
:param type: [in] type of property :type value: string :param value: [in] value
- clone()
Construct a clone of the property.
- getPropertyValue(*args)
Overload 1:
returns reference to the property value :rtype: rw::core::PropertyValue< std::string > :return: value
Overload 2:
returns const reference to the property value :rtype: rw::core::PropertyValue< std::string > :return: value
- getValue(*args)
Overload 1:
Returns a reference to the property value.
Notes: Changing the value returned by reference will NOT fire the changed event. Please consider using the setValue function if possible, or fire the event manually on change, by calling changedEvent().fire()
- Return type
string
- Returns
reference to the property value.
Overload 2:
Returns a constant reference to the property value. :rtype: string :return: constant reference to the property value.
- setValue(value)
Sets the property value.
This function will fire the changed event.
- Parameters
value (string) – [in] the new value of the Property
- property thisown
The membership flag
- class sdurw_core.sdurw_core.RobWork
Bases:
object
RobWork instance which holds objects to be shared among multiple plugins
A RobWork instance contains common objects and configuration which may be used by multiple plugins which may originate from different shared libraries.
- __init__()
Creates RobWork instance
- finalize()
finalizes the robwork instance
- static finish()
finalize the robwork instance
- getExtensionRegistry()
get the extension registry :rtype: rw::core::Ptr< rw::core::ExtensionRegistry > :return:
- static getInstance()
returns an RobWork instance
- getLog()
Returns the common log
- getLogPtr()
get a pointer to the common log :rtype:
Ptr
:return:
- getSettings()
get settings of RobWork instance :rtype:
PropertyMap
:return:
- getVersion()
Returns the version of RobWork
- static init(*args)
Overload 1:
initialize robwork
Overload 2:
initialize robwork - including possible command line options
- initialize(*args)
initialize robwork
Reads in its configuration file which specify plugins and so on.
- isInitialized()
Check if RobWork has been initialized. :rtype: boolean :return: true if initialized, false otherwise.
- setExtensionRegistry(extreg)
set extension registry of this instance of robwork
- static setInstance(rw)
sets the robwork instance :type rw:
Ptr
:param rw: [in] the new instance
- setLog(log)
set logger for this instance of RobWork :type log:
Ptr
:param log:
- property thisown
The membership flag
- class sdurw_core.sdurw_core.RobWorkCPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- deref()
The pointer stored in the object.
- getDeref()
Member access operator.
- getVersion()
Returns the version of RobWork
- isInitialized()
Check if RobWork has been initialized. :rtype: boolean :return: true if initialized, false otherwise.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- property thisown
The membership flag
- class sdurw_core.sdurw_core.RobWorkPtr(*args)
Bases:
object
Ptr stores a pointer and optionally takes ownership of the value.
- __init__(*args)
Overload 1:
Default constructor yielding a NULL-pointer.
Overload 2:
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
- cptr()
- deref()
The pointer stored in the object.
- finalize()
finalizes the robwork instance
- finish()
finalize the robwork instance
- getDeref()
Member access operator.
- getExtensionRegistry()
get the extension registry :rtype: rw::core::Ptr< rw::core::ExtensionRegistry > :return:
- getInstance()
returns an RobWork instance
- getLog()
Returns the common log
- getLogPtr()
get a pointer to the common log :rtype:
Ptr
:return:
- getSettings()
get settings of RobWork instance :rtype:
PropertyMap
:return:
- getVersion()
Returns the version of RobWork
- init(*args)
Overload 1:
initialize robwork
Overload 2:
initialize robwork - including possible command line options
- initialize(*args)
initialize robwork
Reads in its configuration file which specify plugins and so on.
- isInitialized()
Check if RobWork has been initialized. :rtype: boolean :return: true if initialized, false otherwise.
- isNull()
checks if the pointer is null :rtype: boolean :return: Returns true if the pointer is null
check if this Ptr has shared ownership or none ownership :rtype: boolean :return: true if Ptr has shared ownership, false if it has no ownership.
- setExtensionRegistry(extreg)
set extension registry of this instance of robwork
- setInstance(rw)
sets the robwork instance :type rw:
Ptr
:param rw: [in] the new instance
- setLog(log)
set logger for this instance of RobWork :type log:
Ptr
:param log:
- property thisown
The membership flag
- sdurw_core.sdurw_core.RobWork_finish()
finalize the robwork instance
- sdurw_core.sdurw_core.RobWork_getInstance()
returns an RobWork instance
- sdurw_core.sdurw_core.RobWork_init(*args)
Overload 1:
initialize robwork
Overload 2:
initialize robwork - including possible command line options
- sdurw_core.sdurw_core.RobWork_setInstance(rw)
sets the robwork instance :type rw:
Ptr
:param rw: [in] the new instance
- class sdurw_core.sdurw_core.StringUtil
Bases:
object
Collection of string manipulation utilities
- __init__()
- static getDirectoryName(path)
The directory part of a path name.
The function simply returns everything up to and including the last slash or backslash. If there is no such slash or backslash, the empty string is returned.
- Parameters
path (string) – [in] The path name.
- Return type
string
- Returns
The directory name for the path.
- static getFileExtension(filename)
The extension of a file name.
The extension is everything that follows the last ‘.’.
The ‘.’ is included in the extension returned, so that if that if the file has no extension, then the empty string can be returned.
- Parameters
filename (string) – [in] The file name.
- Return type
string
- Returns
The file name extension.
- static getFileName(pathAndFileName)
Extract the file name (including extension) from a string containing full name including the directory.
The function simply returns everything efter the last slash or backslash. If there is no such slash or backslash, the original string is returned
- Parameters
pathAndFileName (string) – [in] The path and filename .
- Return type
string
- Returns
The file name.
- static getRelativeDirectoryName(path, dir_name)
The directory part of a path name relative to a root directory.
The function returns everything up to and including the last slash or backslash. If there is no such slash or backslash, the empty string is returned.
- Parameters
path (string) – [in] The path name.
dir_name (string) – [in] The root directory name.
- Return type
string
- Returns
The relative directory name for the path.
- static isAbsoluteFileName(file)
True if the file name file is an absolute file name.
- static patternToRegEx(pattern)
Converts a string pattern with wild card characters * and ? into a regular expression
The format of the regular expression matches std::regex.
- Parameters
pattern (string) – [in] pattern with wild card characters
- Return type
string
- Returns
patterns expressed as regular expression.
- static quote(str)
The string str enclosed in single-quotes.
Use this for quoting of strings in user error messages.
- static ranName(prefix)
creates a name based on a prefix and a random integer between 0xFF and 0xFFFFFF :type prefix: string :param prefix: :rtype: string :return:
- static removeWhiteSpace(str)
Removes space, tab and new line from string
- static replaceBackslash(file)
Replace ‘' with ‘/’ everywhere in the file name file.
- property thisown
The membership flag
- static toDouble(str)
Return (true, val) if str parses as a double with value
val and (false, 0) otherwise.
- static toDoubles(words)
Return (true, vals) if words parses as a sequence of doubles with values
vals and (false, []) otherwise.
- static toInt(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- static toInts(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- static toLong(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- static toLongs(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- static toLower(str)
The lowercase of a string.
- Parameters
str (string) – [in] A string to lowercase.
- Return type
string
- Returns
str converted to lower case.
- static toUInt(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- static toUInts(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- static toULong(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- static toULongs(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- static toUpper(str)
The uppercase of a string.
- Parameters
str (string) – [in] A string to uppercase.
- Return type
string
- Returns
str converted to upper case.
- static words(str)
Split str into words at space borders.
- sdurw_core.sdurw_core.StringUtil_getDirectoryName(path)
The directory part of a path name.
The function simply returns everything up to and including the last slash or backslash. If there is no such slash or backslash, the empty string is returned.
- Parameters
path (string) – [in] The path name.
- Return type
string
- Returns
The directory name for the path.
- sdurw_core.sdurw_core.StringUtil_getFileExtension(filename)
The extension of a file name.
The extension is everything that follows the last ‘.’.
The ‘.’ is included in the extension returned, so that if that if the file has no extension, then the empty string can be returned.
- Parameters
filename (string) – [in] The file name.
- Return type
string
- Returns
The file name extension.
- sdurw_core.sdurw_core.StringUtil_getFileName(pathAndFileName)
Extract the file name (including extension) from a string containing full name including the directory.
The function simply returns everything efter the last slash or backslash. If there is no such slash or backslash, the original string is returned
- Parameters
pathAndFileName (string) – [in] The path and filename .
- Return type
string
- Returns
The file name.
- sdurw_core.sdurw_core.StringUtil_getRelativeDirectoryName(path, dir_name)
The directory part of a path name relative to a root directory.
The function returns everything up to and including the last slash or backslash. If there is no such slash or backslash, the empty string is returned.
- Parameters
path (string) – [in] The path name.
dir_name (string) – [in] The root directory name.
- Return type
string
- Returns
The relative directory name for the path.
- sdurw_core.sdurw_core.StringUtil_isAbsoluteFileName(file)
True if the file name file is an absolute file name.
- sdurw_core.sdurw_core.StringUtil_patternToRegEx(pattern)
Converts a string pattern with wild card characters * and ? into a regular expression
The format of the regular expression matches std::regex.
- Parameters
pattern (string) – [in] pattern with wild card characters
- Return type
string
- Returns
patterns expressed as regular expression.
- sdurw_core.sdurw_core.StringUtil_quote(str)
The string str enclosed in single-quotes.
Use this for quoting of strings in user error messages.
- sdurw_core.sdurw_core.StringUtil_ranName(prefix)
creates a name based on a prefix and a random integer between 0xFF and 0xFFFFFF :type prefix: string :param prefix: :rtype: string :return:
- sdurw_core.sdurw_core.StringUtil_removeWhiteSpace(str)
Removes space, tab and new line from string
- sdurw_core.sdurw_core.StringUtil_replaceBackslash(file)
Replace ‘' with ‘/’ everywhere in the file name file.
- sdurw_core.sdurw_core.StringUtil_toDouble(str)
Return (true, val) if str parses as a double with value
val and (false, 0) otherwise.
- sdurw_core.sdurw_core.StringUtil_toDoubles(words)
Return (true, vals) if words parses as a sequence of doubles with values
vals and (false, []) otherwise.
- sdurw_core.sdurw_core.StringUtil_toInt(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- sdurw_core.sdurw_core.StringUtil_toInts(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- sdurw_core.sdurw_core.StringUtil_toLong(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- sdurw_core.sdurw_core.StringUtil_toLongs(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- sdurw_core.sdurw_core.StringUtil_toLower(str)
The lowercase of a string.
- Parameters
str (string) – [in] A string to lowercase.
- Return type
string
- Returns
str converted to lower case.
- sdurw_core.sdurw_core.StringUtil_toUInt(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- sdurw_core.sdurw_core.StringUtil_toUInts(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- sdurw_core.sdurw_core.StringUtil_toULong(str)
Return (true, val) if str parses as a int with value
val and (false, 0) otherwise.
- sdurw_core.sdurw_core.StringUtil_toULongs(words)
Return (true, vals) if words parses as a sequence of ints with values vals and (false, []) otherwise.
- sdurw_core.sdurw_core.StringUtil_toUpper(str)
The uppercase of a string.
- Parameters
str (string) – [in] A string to uppercase.
- Return type
string
- Returns
str converted to upper case.
- sdurw_core.sdurw_core.StringUtil_words(str)
Split str into words at space borders.
- class sdurw_core.sdurw_core.SwigPyIterator(*args, **kwargs)
Bases:
object
- __init__(*args, **kwargs)
- advance(n)
- copy()
- decr(n=1)
- distance(x)
- equal(x)
- incr(n=1)
- next()
- previous()
- property thisown
The membership flag
- value()
- class sdurw_core.sdurw_core.VecotrVecotrULong(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.VectorComplexDouble(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.VectorExtensionPtr(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.VectorPair_d_d(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.VectorPair_i_i(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.VectorPair_s_s(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.VectorPropertyValueBasePtr(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.complexd(*args)
Bases:
object
- __init__(*args)
- property thisown
The membership flag
- class sdurw_core.sdurw_core.complexf(*args)
Bases:
object
- __init__(*args)
- property thisown
The membership flag
- sdurw_core.sdurw_core.ownedPtr(*args)
Overload 1:
A Ptr that takes ownership over a raw pointer ptr.
Overload 2:
A Ptr that takes ownership over a raw pointer ptr.
Overload 3:
A Ptr that takes ownership over a raw pointer ptr.
Overload 4:
A Ptr that takes ownership over a raw pointer ptr.
Overload 5:
A Ptr that takes ownership over a raw pointer ptr.
Overload 6:
A Ptr that takes ownership over a raw pointer ptr.
Overload 7:
A Ptr that takes ownership over a raw pointer ptr.
Overload 8:
A Ptr that takes ownership over a raw pointer ptr.
Overload 9:
A Ptr that takes ownership over a raw pointer ptr.
- class sdurw_core.sdurw_core.pairBoolVectorDouble(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pairBoolVectorInt(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pairBoolVectorLong(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pairBoolVectorUInt(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pairBoolVectorULong(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_b_d(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_b_i(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_b_l(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_b_ui(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_b_ul(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_d_d(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_f_f(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.pair_ui_ui(*args)
Bases:
object
- __init__(*args)
- property first
- property second
- property thisown
The membership flag
- class sdurw_core.sdurw_core.vector_b(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.vector_c(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.vector_d(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.vector_f(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.vector_i(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()
- class sdurw_core.sdurw_core.vector_l(arg1=None, arg2=None)
Bases:
list
This class is deprecated and is basically a wrapper around a list
- __init__(arg1=None, arg2=None)
- at(i)
- back()
- clear()
Remove all items from list.
- empty()
- front()
- pop_back()
- push_back(elem)
- size()