gensrc.utilities.outputfile.OutputFile Class Reference
Inheritance diagram for gensrc.utilities.outputfile.OutputFile:
Collaboration diagram for gensrc.utilities.outputfile.OutputFile:

Public Member Functions

def printCopyright (self, copyright)
 public interface More...
 
def printHeader (self)
 
def close (self)
 
def __init__ (self, addin, fileName, copyright, buffer, printHeader=True)
 private member functions More...
 

Public Attributes

 addin_
 
 fileName_
 
 fileNameTemp_
 
 outFile_
 

Static Public Attributes

 TRIM_WHITESPACE = re.compile(r'^ *', re.M)
 class variables
 
string HEADER
 
string UPDATE_MSG = '%-100s %10s'
 
string STUBFILE_NAME
 

Detailed Description

Represent a file which gets overwritten only when its contents change.

Constructor & Destructor Documentation

◆ __init__()

def gensrc.utilities.outputfile.OutputFile.__init__ (   self,
  addin,
  fileName,
  copyright,
  buffer,
  printHeader = True 
)

private member functions

Open file and write header.

Member Function Documentation

◆ close()

def gensrc.utilities.outputfile.OutputFile.close (   self)
Close temp file and overwrite original if they are different.

◆ printCopyright()

def gensrc.utilities.outputfile.OutputFile.printCopyright (   self,
  copyright 
)

public interface

Print the copyright message relevant for this source code file.

◆ printHeader()

def gensrc.utilities.outputfile.OutputFile.printHeader (   self)
Print the gensrc comment header for this source code file.

Member Data Documentation

◆ HEADER

string gensrc.utilities.outputfile.OutputFile.HEADER
static
Initial value:
= """\
// This file was generated automatically by %s. If you edit this file
// manually then your changes will be lost the next time gensrc runs.\n\n"""

◆ STUBFILE_NAME

string gensrc.utilities.outputfile.OutputFile.STUBFILE_NAME
static
Initial value:
= """\
// This source code file was generated from the following stub:
// %s\n\n"""

The documentation for this class was generated from the following file:
  • outputfile.py