Functions | |
def | output (s, spos, immediate=0) |
Output string s. More... | |
def | rec_name_n_param (type, tok) |
Records a name and parameters. More... | |
def | start_recording () |
Starts the recording of a name & param part. More... | |
def | is_recording_finished () |
Test if recording is finished. More... | |
def | gather_comment (type, tok, spos) |
Gather comment block. More... | |
def | print_comment (spos) |
Output comment block and empty buffer. More... | |
def | set_state (s) |
def | get_state () |
def | push_state (s) |
def | pop_state () |
def | tok_eater (type, tok, spos, epos, line) |
def | dump (filename) |
def | filter (filename) |
def | filterFile (filename, out=sys.stdout) |
def | preparePath (path) |
def | isNewer (file1, file2) |
def | convert (srcpath, destpath) |
Variables | |
int | OUTSIDE = 0 |
int | BUILD_COMMENT = 1 |
int | BUILD_CLASS_DECL = 2 |
int | BUILD_CLASS_BODY = 3 |
int | BUILD_DEF_DECL = 4 |
int | BUILD_DEF_BODY = 5 |
int | IMPORT = 6 |
int | IMPORT_OP = 7 |
int | IMPORT_APPEND = 8 |
outfile = sys.stdout | |
list | outbuffer = [] |
int | out_row = 0 |
int | out_col = 0 |
string | name = "" |
string | param = "" |
string | doc_string = "" |
int | record_state = 0 |
int | bracket_counter = 0 |
tuple | class_spos = (0,0) |
tuple | def_spos = (0,0) |
tuple | import_spos = (0,0) |
string | import_token = "" |
list | comment_block = [] |
int | comment_finished = 0 |
list | modules = [] |
list | stateStack = [OUTSIDE] |
bool | module_has_docstring = False |
string | protection_level = "public" |
bool | private_member = False |
string | namespace = "" |
bool | filter_file = False |
opts | |
args | |
filename = string.join(args) | |
def | c = convert(args[0],args[1]) |
def pythfilter.convert | ( | srcpath, | |
destpath | |||
) |
Convert a Python source tree into a C+ stub tree. All *.py files in srcpath (including sub-directories) are filtered and written to destpath. If destpath exists, only the files that have been modified are filtered again. Files that were deleted from srcpath are also deleted in destpath if they are still present. The function returns the number of processed *.py files.
References filterFile(), isNewer(), and preparePath().
def pythfilter.dump | ( | filename | ) |
def pythfilter.filter | ( | filename | ) |
References output(), and print_comment().
Referenced by filterFile().
def pythfilter.filterFile | ( | filename, | |
out = sys.stdout |
|||
) |
def pythfilter.gather_comment | ( | type, | |
tok, | |||
spos | |||
) |
def pythfilter.get_state | ( | ) |
Referenced by tok_eater().
def pythfilter.is_recording_finished | ( | ) |
Test if recording is finished.
Referenced by tok_eater().
def pythfilter.isNewer | ( | file1, | |
file2 | |||
) |
Check if file1 is newer than file2. file1 must be an existing file.
Referenced by convert().
def pythfilter.output | ( | s, | |
spos, | |||
immediate = 0 |
|||
) |
Output string s.
'
' may only be at the end of the string (not somewhere in the middle).
In: s - String spos - Startpos
Referenced by filter(), print_comment(), and tok_eater().
def pythfilter.pop_state | ( | ) |
Referenced by tok_eater().
def pythfilter.preparePath | ( | path | ) |
Prepare a path. Checks if the path exists and creates it if it does not exist.
Referenced by convert().
def pythfilter.print_comment | ( | spos | ) |
Output comment block and empty buffer.
References output().
Referenced by filter(), gather_comment(), and tok_eater().
def pythfilter.push_state | ( | s | ) |
Referenced by tok_eater().
def pythfilter.rec_name_n_param | ( | type, | |
tok | |||
) |
Records a name and parameters.
The name is either a class name or a function name. Then the parameter is either the base class or the function parameters. The name is stored in the global variable "name", the parameters in "param". The variable "record_state" holds the current state of this internal state machine. The recording is started by calling start_recording().
In: type, tok
Referenced by tok_eater().
def pythfilter.set_state | ( | s | ) |
Referenced by tok_eater().
def pythfilter.start_recording | ( | ) |
Starts the recording of a name & param part.
The function rec_name_n_param() has to be fed with tokens. After the necessary tokens are fed the name and parameters can be found in the global variables "name" und "param".
Referenced by tok_eater().
def pythfilter.tok_eater | ( | type, | |
tok, | |||
spos, | |||
epos, | |||
line | |||
) |
pythfilter.args |
Referenced by SALOMESDS::PickelizedPyObjServer.checkKeyPresence(), ContainerPyStdOut_write(), SALOMESDS::PickelizedPyObjServer.CreateDftObjFromType(), SALOMESDS::PickelizedPyObjRdExtInitServer.DeepCopyPyObj(), GetCommandFromTemplate(), GetCustomORB(), SALOMESDS::PickelizedPyObjServer.GetPyObjFromPickled(), SALOMESDS::PickelizedPyObjRdExtServer.invokePythonMethodOn(), SALOMESDS::PickelizedPyObjRdWrServer.invokePythonMethodOn(), SALOMESDS::KeyWaiter.KeyWaiter(), main(), SALOMESDS::DataScopeServerTransaction.notifyKey(), ORB_INIT.operator()(), SALOMESDS::PickelizedPyObjServer.Pickelize(), SALOMESDS::DataScopeServerTransaction.pingKey(), SALOME_CPythonHelper.registerToSalomePiDict(), and SALOME_ContainerManager.SystemWithPIDThreadSafe().
int pythfilter.bracket_counter = 0 |
int pythfilter.BUILD_CLASS_BODY = 3 |
int pythfilter.BUILD_CLASS_DECL = 2 |
int pythfilter.BUILD_COMMENT = 1 |
int pythfilter.BUILD_DEF_BODY = 5 |
int pythfilter.BUILD_DEF_DECL = 4 |
Referenced by ContainerPyStdOut_write(), convertString(), PalmCouplingPolicy::InternalDataIdContainer< T_TIME, T_TAG >.InternalDataIdContainer(), CORBA_DATE_CAL_SCHEM.operator[](), CORBA_DEPENDENCY_TYPE.operator[](), CORBA_EXTRAPOLATION_SCHEM.operator[](), CORBA_INTERPOLATION_SCHEM.operator[](), DATE_CAL_SCHEM.operator[](), DEPENDENCY_TYPE.operator[](), EXTRAPOLATION_SCHEM.operator[](), INTERPOLATION_SCHEM.operator[](), and restoreString().
tuple pythfilter.class_spos = (0,0) |
list pythfilter.comment_block = [] |
int pythfilter.comment_finished = 0 |
tuple pythfilter.def_spos = (0,0) |
string pythfilter.doc_string = "" |
pythfilter.filename = string.join(args) |
Referenced by checkifexecutable(), findpathof(), and Logger.Logger().
bool pythfilter.filter_file = False |
int pythfilter.IMPORT = 6 |
int pythfilter.IMPORT_APPEND = 8 |
int pythfilter.IMPORT_OP = 7 |
tuple pythfilter.import_spos = (0,0) |
string pythfilter.import_token = "" |
bool pythfilter.module_has_docstring = False |
list pythfilter.modules = [] |
string pythfilter.name = "" |
Referenced by SALOME_NamingService._Find(), SALOME_ModuleCatalogImpl::Private._parse_xml_file(), GENERIC_DESTRUCTOR.Add(), Launcher::XML_Persistence.addAttr(), Kernel_Utils.AddExtension(), Launcher::XML_Persistence.addNode(), Launcher::XML_Persistence.addNumericalNode(), Launcher::Job.addSpecificParameter(), BuildTree(), HDFascii.ConvertFromHDFToASCII(), create_calcium_port(), create_multiple_calcium_port(), CreateAttributeFromASCII(), CreateDatasetFromASCII(), CreateGroupFromASCII(), ResourcesManager_cpp.DeleteResourceInCatalog(), DESTRUCTOR_OF< TYPE >.DESTRUCTOR_OF(), DumpStudy(), ecp_cd_(), CalciumInterface.ecp_ecriture(), CalciumInterface.ecp_fin(), CalciumInterface.ecp_lecture(), HDFfile.ExistInternalObject(), HDFgroup.ExistInternalObject(), SALOME_NamingService.Find(), SALOMEDSImpl_Study.FindComponent(), SALOME_ModuleCatalogImpl::Private.findComponent(), HDFgroup.GetAllObjects(), SALOME_ModuleCatalogImpl.GetComponent(), SALOME_ModuleCatalogImpl.GetComponentInfo(), SALOME_ContainerManager.GetenvThreadSafe(), SALOME_ContainerManager.GetenvThreadSafeAsString(), SALOME_StudyEditor.getParameterBool(), SALOME_StudyEditor.getParameterInt(), SALOMEDS_IParameters.getProperty(), SALOMEDSImpl_IParameters.getProperty(), SALOME_ResourcesManager.GetResourceDefinition(), SALOME_ResourcesManager_Client.GetResourceDefinition(), ResourcesManager_cpp.GetResourcesDescr(), HDFattrCreate(), HDFattrOpen(), HDFdatasetCreate(), HDFdatasetOpen(), HDFfileCreate(), HDFfileMount(), HDFfileOpen(), HDFfileUmount(), HDFgroupCreate(), HDFgroupOpen(), HDFobject.HDFobject(), HDFobjectIdentify(), HDFobjectType(), HouseKeeping(), SALOME_Trace.Initialize(), SALOMESDS::DataScopeServerBase.listVars(), Salome_file_i.load(), SALOME_LifeCycleCORBA.Load_ParallelComponent(), main(), makeName(), SALOMEDS_SObject_i.Name(), SALOMEDSImpl_Study.Name(), NOTIFICATION_channel(), Num(), Launcher::XML_Persistence.parseUserNode(), SALOME_ResourcesCatalog_Handler.ProcessCluster(), SALOME_ResourcesCatalog_Handler.ProcessMachine(), SALOME_Launcher_Handler.ProcessXmlDocument(), SALOME_ModuleCatalog_Handler.ProcessXmlDocument(), RankInfo(), SALOME_NamingService.ResolveComponent(), SALOME_NamingService.ResolveFirst(), restoreName(), SaveAttributeInASCIIfile(), SaveDatasetInASCIIfile(), SaveGroupInASCIIfile(), SALOMEDS_SObject_i.SetAttrString(), SALOMEDSImpl_SObject.SetAttrString(), SALOMEDS_SObject.SetAttrString(), Engines_Component_i.setContainerName(), SALOME_StudyEditor.setParameterBool(), SALOME_StudyEditor.setParameterInt(), SALOMEDS_IParameters.setProperty(), SALOMEDSImpl_IParameters.setProperty(), SALOME_LifeCycleCORBA.shutdownServers(), Test(), NamingServiceTest.testCreateDirectory(), NamingServiceTest.testResolveFirst(), NamingServiceTest.testResolveFirstRelative(), NamingServiceTest.testResolveFirstUnknown(), NamingServiceTest.testResolveFirstUnknownRelative(), and TraceCollector_WaitForServerReadiness().
string pythfilter.namespace = "" |
pythfilter.opts |
int pythfilter.out_col = 0 |
int pythfilter.out_row = 0 |
list pythfilter.outbuffer = [] |
pythfilter.outfile = sys.stdout |
int pythfilter.OUTSIDE = 0 |
string pythfilter.param = "" |
bool pythfilter.private_member = False |
string pythfilter.protection_level = "public" |
int pythfilter.record_state = 0 |
list pythfilter.stateStack = [OUTSIDE] |