GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
generate_swig_interfaces.SwigModuleGenerator Class Reference

A helper class for generating SWIG interface files. More...

Inheritance diagram for generate_swig_interfaces.SwigModuleGenerator:

Public Member Functions

def __init__ (self, moduleName, outFile)
 Init SwigModuleGenerator. More...
 
def __enter__ (self)
 
def __exit__ (self, exc_type, exc_value, traceback)
 
def addSwigModuleHeadline (self, directors=False, comment='')
 Adds a line naming a module and enabling directors feature for inheritance in python (disabled by default) More...
 
def addSwigFeatureDirector (self, cClassName, comment='')
 Adds a line enabling director feature for a C/C++ class. More...
 
def addSwigInclude (self, cHeader, comment='')
 Adds a line for including C/C++ header file. More...
 
def addSwigImport (self, swigIFace, comment='')
 Adds a line for importing SWIG interface file. More...
 
def addSwigIgnore (self, identifier, comment='')
 Adds a line instructing SWIG to ignore the matching identifie. More...
 
def addSwigRename (self, identifier, newName, comment='')
 Adds a line instructing SWIG to rename the matching identifie. More...
 
def addSwigUnignore (self, identifier)
 Adds a line instructing SWIG to unignore the matching identifie. More...
 
def addSwigIgnoreAll (self)
 Adds a line instructing SWIG to ignore everything, but templates. More...
 
def addSwigUnignoreAll (self)
 Adds a line instructing SWIG to unignore everything. More...
 
def addSwigEnableUnderCaseConvert (self)
 
def addSwigTemplate (self, tSpec, newName)
 Adds a template specification tSpec and renames it as newName. More...
 
def addCppInclude (self, cHeader, comment='')
 Adds a line for usual including C/C++ header file. More...
 
def addAutoGenWarning (self)
 Adds a comment line telling that this file was generated automatically. More...
 
def write (self, code)
 Writes code into output stream os. More...
 

Public Attributes

 name
 
 outFile
 
 os
 

Detailed Description

A helper class for generating SWIG interface files.

Constructor & Destructor Documentation

◆ __init__()

def generate_swig_interfaces.SwigModuleGenerator.__init__ (   self,
  moduleName,
  outFile 
)

Init SwigModuleGenerator.

Parameters
moduleNamestring, name of the SWIG module
outFilestring, output file

Member Function Documentation

◆ __enter__()

def generate_swig_interfaces.SwigModuleGenerator.__enter__ (   self)

◆ __exit__()

def generate_swig_interfaces.SwigModuleGenerator.__exit__ (   self,
  exc_type,
  exc_value,
  traceback 
)

◆ addAutoGenWarning()

def generate_swig_interfaces.SwigModuleGenerator.addAutoGenWarning (   self)

Adds a comment line telling that this file was generated automatically.

◆ addCppInclude()

def generate_swig_interfaces.SwigModuleGenerator.addCppInclude (   self,
  cHeader,
  comment = '' 
)

Adds a line for usual including C/C++ header file.

◆ addSwigEnableUnderCaseConvert()

def generate_swig_interfaces.SwigModuleGenerator.addSwigEnableUnderCaseConvert (   self)

◆ addSwigFeatureDirector()

def generate_swig_interfaces.SwigModuleGenerator.addSwigFeatureDirector (   self,
  cClassName,
  comment = '' 
)

Adds a line enabling director feature for a C/C++ class.

◆ addSwigIgnore()

def generate_swig_interfaces.SwigModuleGenerator.addSwigIgnore (   self,
  identifier,
  comment = '' 
)

Adds a line instructing SWIG to ignore the matching identifie.

◆ addSwigIgnoreAll()

def generate_swig_interfaces.SwigModuleGenerator.addSwigIgnoreAll (   self)

Adds a line instructing SWIG to ignore everything, but templates.

Unignoring templates does not work well in SWIG. Can be used for fine-grained control over what is wrapped

◆ addSwigImport()

def generate_swig_interfaces.SwigModuleGenerator.addSwigImport (   self,
  swigIFace,
  comment = '' 
)

Adds a line for importing SWIG interface file.

import statement notifies SWIG about class(es) covered in another module

◆ addSwigInclude()

def generate_swig_interfaces.SwigModuleGenerator.addSwigInclude (   self,
  cHeader,
  comment = '' 
)

Adds a line for including C/C++ header file.

include statement makes SWIG to include the header into generated C/C++ file code AND to process it

◆ addSwigModuleHeadline()

def generate_swig_interfaces.SwigModuleGenerator.addSwigModuleHeadline (   self,
  directors = False,
  comment = '' 
)

Adds a line naming a module and enabling directors feature for inheritance in python (disabled by default)

◆ addSwigRename()

def generate_swig_interfaces.SwigModuleGenerator.addSwigRename (   self,
  identifier,
  newName,
  comment = '' 
)

Adds a line instructing SWIG to rename the matching identifie.

◆ addSwigTemplate()

def generate_swig_interfaces.SwigModuleGenerator.addSwigTemplate (   self,
  tSpec,
  newName 
)

Adds a template specification tSpec and renames it as newName.

◆ addSwigUnignore()

def generate_swig_interfaces.SwigModuleGenerator.addSwigUnignore (   self,
  identifier 
)

Adds a line instructing SWIG to unignore the matching identifie.

◆ addSwigUnignoreAll()

def generate_swig_interfaces.SwigModuleGenerator.addSwigUnignoreAll (   self)

Adds a line instructing SWIG to unignore everything.

◆ write()

def generate_swig_interfaces.SwigModuleGenerator.write (   self,
  code 
)

Writes code into output stream os.

Member Data Documentation

◆ name

generate_swig_interfaces.SwigModuleGenerator.name

◆ os

generate_swig_interfaces.SwigModuleGenerator.os

◆ outFile

generate_swig_interfaces.SwigModuleGenerator.outFile

The documentation for this class was generated from the following file: