[ CLASS ] - Class to operate on namespaces.
More...
[ CLASS ] - Class to operate on namespaces.
import sys
sys.stdout.write(_nameSpace.nameSpace())
sys.stdout.write(_nameSpace.head())
sys.stdout.write(_nameSpace.tail())
◆ __init__()
def mCore.nameSpaceLib.NameSpace.__init__ |
( |
|
self, |
|
|
|
nameSpace = None |
|
) |
| |
◆ nameSpace()
def mCore.nameSpaceLib.NameSpace.nameSpace |
( |
|
self | ) |
|
◆ setNameSpace()
def mCore.nameSpaceLib.NameSpace.setNameSpace |
( |
|
self, |
|
|
|
nameSpace |
|
) |
| |
Set name space.
- Parameters
-
- Returns
- bool - Result.
◆ head()
def mCore.nameSpaceLib.NameSpace.head |
( |
|
self | ) |
|
Get name space portion of the name space.
- Exceptions
-
- Returns
- str - NameSpace portion.
◆ tail()
def mCore.nameSpaceLib.NameSpace.tail |
( |
|
self | ) |
|
Get the tail portion of the name space.
- Exceptions
-
- Returns
- str - Part portion of the name space.
◆ isValid()
def mCore.nameSpaceLib.NameSpace.isValid |
( |
|
cls, |
|
|
|
nameSpace |
|
) |
| |
Determine whether given string is a valid name space.
Whether it has NameSpace.NAME_SPACE_DELIMITER in the given string.
- Parameters
-
cls | [ object | None | in ] - Class object. |
nameSpace | [ str | None | in ] - NameSpace. |
- Exceptions
-
- Returns
- bool - Result.
◆ removeNameSpace()
def mCore.nameSpaceLib.NameSpace.removeNameSpace |
( |
|
cls, |
|
|
|
name |
|
) |
| |
Remove name space from the given name.
- Parameters
-
cls | [ object | None | in ] - Class object. |
name | [ str | None | in ] - Name. |
- Exceptions
-
- Returns
- str - Name without name space.
◆ addNameSpace()
def mCore.nameSpaceLib.NameSpace.addNameSpace |
( |
|
cls, |
|
|
|
nameSpace, |
|
|
|
name, |
|
|
|
removeExisting = True |
|
) |
| |
Add given name space to given name.
- Parameters
-
cls | [ object | None | in ] - Class object. |
nameSpace | [ str | None | in ] - Name space to be added. |
name | [ str | None | in ] - Name. |
removeExisting | [ bool | True | in ] - Remove existing name space from the given name before adding the new one. |
- Exceptions
-
- Returns
- str - Name with name space.
The documentation for this class was generated from the following file: