commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r6513 - in trunk/gnue-reports/src/adapters/filters: . Char Char/base Cha


From: btami
Subject: r6513 - in trunk/gnue-reports/src/adapters/filters: . Char Char/base Char/base/CHObjects Char/esc-p Char/pcl5 Char/text
Date: Tue, 19 Oct 2004 06:32:17 -0500 (CDT)

Author: btami
Date: 2004-10-19 06:32:15 -0500 (Tue, 19 Oct 2004)
New Revision: 6513

Added:
   trunk/gnue-reports/src/adapters/filters/Char/
   trunk/gnue-reports/src/adapters/filters/Char/__init__.py
   trunk/gnue-reports/src/adapters/filters/Char/base/
   trunk/gnue-reports/src/adapters/filters/Char/base/Adapter.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHDetail.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupFooter.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupHeader.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHLabel.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHObject.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageFooter.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageHeader.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHSummaryPage.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHTitlePage.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/__init__.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHParser.py
   trunk/gnue-reports/src/adapters/filters/Char/base/CHReport.py
   trunk/gnue-reports/src/adapters/filters/Char/base/Writer.py
   trunk/gnue-reports/src/adapters/filters/Char/base/__init__.py
   trunk/gnue-reports/src/adapters/filters/Char/esc-p/
   trunk/gnue-reports/src/adapters/filters/Char/esc-p/Adapter.py
   trunk/gnue-reports/src/adapters/filters/Char/esc-p/Writer.py
   trunk/gnue-reports/src/adapters/filters/Char/esc-p/__init__.py
   trunk/gnue-reports/src/adapters/filters/Char/pcl5/
   trunk/gnue-reports/src/adapters/filters/Char/pcl5/Adapter.py
   trunk/gnue-reports/src/adapters/filters/Char/pcl5/Writer.py
   trunk/gnue-reports/src/adapters/filters/Char/pcl5/__init__.py
   trunk/gnue-reports/src/adapters/filters/Char/text/
   trunk/gnue-reports/src/adapters/filters/Char/text/Adapter.py
   trunk/gnue-reports/src/adapters/filters/Char/text/Writer.py
   trunk/gnue-reports/src/adapters/filters/Char/text/__init__.py
Log:
started a char based layout filer

Added: trunk/gnue-reports/src/adapters/filters/Char/__init__.py
===================================================================

Added: trunk/gnue-reports/src/adapters/filters/Char/base/Adapter.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/Adapter.py        
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/Adapter.py        
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,83 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# Adapter.py
+#
+# DESCRIPTION:
+# Class that contains the base filter adapter for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+from gnue.reports.base.GROutputAdapter import TransformAdapter as Base
+from gnue.common.apps import GDebug
+from CHParser import loadFile
+
+
+class CharError(Exception):
+  pass
+
+class TransformAdapter(Base):
+  def open(self):
+    # We need a temp file
+    self.input, self.infile = self.createTempFile()
+    return self.input
+
+  def close(self):
+
+    # We are finished with the intermediate file, so
+    # close in order for sablotron to be able to open it.
+    self.input.close()
+
+    if not hasattr(self,'writer'):
+      raise 'No writer object defined! Please define a default.'
+
+    # Get a file for output from the destination adapter.
+    self.writer.output = self.destination.getOutputHandle()
+
+    report = loadFile(self.infile)
+
+    print report.dumpXML()
+
+    self.parse(report)
+    
+#    infile.close()
+
+    try:
+      mimetype = self.parameters['mimetype']
+    except:
+      mimetype = self.MIMETYPE
+
+
+    # Let the destination adapter do its thing
+    self.destination.close(mimetype=mimetype)
+
+    # clean up our temp files
+    self.deleteTempFile(self.infile)
+
+
+  def parse(self, report):
+    self.writer.initialize(report)
+    
+    report.process(self.writer)
+    
+    self.writer.finalize()

Added: trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHDetail.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHDetail.py     
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHDetail.py     
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,48 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHDetail.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHDetail']
+
+from CHObject import CHObject, CHBand
+
+class CHDetail(CHObject, CHBand): 
+  def __init__(self, parent=None, type='CHDetail'):
+    CHObject.__init__(self, parent, type=type)
+    CHBand.__init__(self)
+
+  def process(self, writer):
+    for child in self._children:
+      child.process(writer, self)
+
+    if self.height > self.y+1:
+      writer.newLine(self.height-self.y-1)
+
+    self.resetBand()
+ 
\ No newline at end of file

Added: 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupFooter.py
===================================================================
--- 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupFooter.py    
    2004-10-19 11:29:32 UTC (rev 6512)
+++ 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupFooter.py    
    2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,47 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHGroupFooter.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHGroupFooter']
+
+from CHObject import CHObject, CHBand
+
+class CHGroupFooter(CHObject, CHBand): 
+  def __init__(self, parent=None, type='CHGroupFooter'):
+    CHObject.__init__(self, parent, type=type)
+    CHBand.__init__(self)
+
+  def process(self, writer):
+    for child in self._children:
+      child.process(writer, self)
+
+    if self.height > self.y+1:
+      writer.newLine(self.height-self.y-1)
+
+    self.resetBand()

Added: 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupHeader.py
===================================================================
--- 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupHeader.py    
    2004-10-19 11:29:32 UTC (rev 6512)
+++ 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHGroupHeader.py    
    2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,47 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHGroupHeader.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHGroupHeader']
+
+from CHObject import CHObject, CHBand
+
+class CHGroupHeader(CHObject, CHBand): 
+  def __init__(self, parent=None, type='CHGroupHeader'):
+    CHObject.__init__(self, parent, type=type)
+    CHBand.__init__(self)
+
+  def process(self, writer):
+    for child in self._children:
+      child.process(writer, self)
+
+    if self.height > self.y+1:
+      writer.newLine(self.height-self.y-1)
+
+    self.resetBand()

Added: trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHLabel.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHLabel.py      
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHLabel.py      
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,42 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHLabel.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHLabel']
+
+from CHObject import CHObject
+
+class CHLabel(CHObject): 
+  def __init__(self, parent=None, type='CHLabel'):
+    CHObject.__init__(self, parent, type=type)
+
+  def process(self, writer, band):
+    writer.render(self.getChildrenAsContent(), self.x, self.y, self.width, 
band,
+                  align=self.align, condensed=self.condensed, bold=self.bold,
+                  italic=self.italic, underline=self.underline)

Added: trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHObject.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHObject.py     
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHObject.py     
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,49 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHObject.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHObject', 'CHBand']
+
+from gnue.common.definitions.GObjects import GObj
+
+
+class CHObject(GObj): 
+  def __init__(self, parent=None, type='CHObject'):
+    GObj.__init__(self, parent, type=type)
+
+
+class CHBand: 
+  def __init__(self):
+    self.x = -1
+    self.y = -1
+
+  def resetBand(self):
+    self.x = -1
+    self.y = -1
+

Added: 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageFooter.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageFooter.py 
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageFooter.py 
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,52 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHPageFooter.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHPageFooter']
+
+from CHObject import CHObject, CHBand
+
+
+class CHPageFooter(CHObject, CHBand): 
+  def __init__(self, parent=None, type='CHPageFooter'):
+    CHObject.__init__(self, parent, type=type)
+    CHBand.__init__(self)
+
+  def process(self, writer):
+    writer.pageFooterDone = True
+    if writer.currLine < writer.reportHeight - self.height:
+      writer.newLine(writer.reportHeight - self.height - writer.currLine)
+
+    for child in self._children:
+      child.process(writer, self)
+
+    if self.height > self.y+1:
+      writer.newLine(self.height-self.y-1)
+
+    self.resetBand()

Added: 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageHeader.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageHeader.py 
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHPageHeader.py 
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,49 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHPageHeader.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHPageHeader']
+
+from CHObject import CHObject, CHBand
+
+
+class CHPageHeader(CHObject, CHBand): 
+  def __init__(self, parent=None, type='CHPageHeader'):
+    CHObject.__init__(self, parent, type=type)
+    CHBand.__init__(self)
+
+  def process(self, writer):
+    writer.pageHeaderDone = True
+    for child in self._children:
+      child.process(writer, self)
+
+    if self.height > self.y+1:
+      writer.newLine(self.height-self.y-1)
+
+    self.resetBand()

Added: 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHSummaryPage.py
===================================================================
--- 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHSummaryPage.py    
    2004-10-19 11:29:32 UTC (rev 6512)
+++ 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHSummaryPage.py    
    2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,53 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHSummaryPage.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHSummaryPage']
+
+from CHObject import CHObject, CHBand
+
+class CHSummaryPage(CHObject, CHBand): 
+  def __init__(self, parent=None, type='CHSummaryPage'):
+    CHObject.__init__(self, parent, type=type)
+    CHBand.__init__(self)
+
+
+  def process(self, writer):
+    if writer.PageFooter and (not writer.pageFooterDone):
+      writer.PageFooter.process(writer)
+    elif writer.currLine < writer.reportHeight:
+      writer.newLine(writer.reportHeight - writer.currLine)
+    writer.newPage()
+
+      
+    writer.pageHeaderDone = True
+    writer.pageFooterDone = True
+
+    for child in self._children:
+      child.process(writer, self)

Added: 
trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHTitlePage.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHTitlePage.py  
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/CHTitlePage.py  
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,48 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHTitlePage.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHTitlePage']
+
+from CHObject import CHObject, CHBand
+
+class CHTitlePage(CHObject, CHBand): 
+  def __init__(self, parent=None, type='CHTitlePage'):
+    CHObject.__init__(self, parent, type=type)
+    CHBand.__init__(self)
+
+
+  def process(self, writer):
+    writer.pageHeaderDone = True
+    writer.pageFooterDone = True
+    
+    for child in self._children:
+      child.process(writer, self)
+
+    writer.newPage()

Added: trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/__init__.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/__init__.py     
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHObjects/__init__.py     
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,38 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHObjects/__init__.py
+#
+# DESCRIPTION:
+# Classes related to the banded layout
+#
+# NOTES:
+#
+
+from CHDetail import CHDetail
+from CHGroupHeader import CHGroupHeader
+from CHGroupFooter import CHGroupFooter
+from CHLabel import CHLabel
+from CHObject import CHObject
+from CHPageFooter import CHPageFooter
+from CHPageHeader import CHPageHeader
+from CHSummaryPage import CHSummaryPage
+from CHTitlePage import CHTitlePage

Added: trunk/gnue-reports/src/adapters/filters/Char/base/CHParser.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHParser.py       
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHParser.py       
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,240 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# Parser.py
+#
+# DESCRIPTION:
+# Class that contains a SAX-based xml processor for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['loadFile', 'xmlReportHandler', 'getXMLelements']
+
+from gnue.common.datasources import GDataSource
+from gnue.common.formatting import GTypecast
+from gnue.common.definitions import GParser
+from gnue.common.logic import GTrigger
+import copy, types
+
+
+
+
+########
+########  Please keep this file neat !!!
+########
+
+
+
+
+#######################################################
+# This method loads a report from an XML file and returns
+# a Report object.  If initialize is 1 (default), then
+# the report is initialized and ready to go.
+#######################################################
+
+def loadFile(buffer, connections=None, initialize=0):
+  return GParser.loadXMLObject (buffer, xmlReportHandler, 'CHReport', 'report',
+           initialize, attributes={})
+
+
+
+xmlElements = None
+
+
+def getXMLelements():
+
+  global xmlElements
+
+  import CHObjects
+  import CHReport
+
+  if xmlElements == None:
+
+    #
+    #
+    xmlElements = {
+      'report':       {
+         'BaseClass': CHReport.CHReport,
+         'Required': 1,
+         'SingleInstance': 1,
+         'Attributes':  {
+            'width': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The width of the report in text columns.' },
+            'height': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The height of the report in text rows. ' },
+            'description':       {
+               'Typecast': GTypecast.text }
+          },
+         'ParentTags':  None
+      },
+  
+      'titlepage':    {
+         'BaseClass': CHObjects.CHTitlePage,
+         'SingleInstance': 1,
+         'ParentTags':  ('report',)
+      },
+
+      'summarypage':    {
+         'BaseClass': CHObjects.CHSummaryPage,
+         'SingleInstance': 1,
+         'ParentTags':  ('report',)
+      },
+
+      'pageheader':    {
+         'BaseClass': CHObjects.CHPageHeader,
+         'Attributes': {
+            'height': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The height of the page header in text rows. ' }
+          },
+         'SingleInstance': 1,
+         'ParentTags':  ('report',)
+      },
+
+      'pagefooter':    {
+         'BaseClass': CHObjects.CHPageFooter,
+         'Attributes': {
+            'height': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The height of the page footer in text rows. ' },
+          },
+         'SingleInstance': 1,
+         'ParentTags':  ('report',)
+      },
+
+      'groupheader':    {
+         'BaseClass': CHObjects.CHGroupHeader,
+         'Attributes': {
+            'height': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The height of the group header in text rows. ' 
},
+          },
+         'ParentTags':  ('report',)
+      },
+
+      'groupfooter':    {
+         'BaseClass': CHObjects.CHGroupFooter,
+         'Attributes': {
+            'height': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The height of the group footer in text rows. ' 
},
+          },
+         'ParentTags':  ('report',)
+      },
+
+      'detail':    {
+         'BaseClass': CHObjects.CHDetail,
+         'Attributes': {
+            'height': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The height of the group footer in text rows. ' 
},
+          },
+         'SingleInstance': 1,
+         'ParentTags':  ('report',)
+      },
+
+      'label':    {
+         'BaseClass': CHObjects.CHLabel,
+         'MixedContent': True,
+         'KeepWhitespace': True,
+         'Attributes': {
+            'align': {
+               'Typecast': GTypecast.name,
+               'ValueSet': {
+                  'left': {'Label': _('Left')},
+                  'right': {'Label': _('Right')},
+                  'center': {'Label': _('Centered')} },
+               'Default': "left",
+               'Description': 'The justification of the label. Can be one of '
+                              'the following: {left}, {right}, or {center}. '},
+            'condensed': {
+               'Typecast': GTypecast.boolean,
+               'Default': False,
+               'Description': 'TODO '},
+            'bold': {
+               'Typecast': GTypecast.boolean,
+               'Default': False,
+               'Description': 'TODO '},
+            'italic': {
+               'Typecast': GTypecast.boolean,
+               'Default': False,
+               'Description': 'TODO '},
+            'underline': {
+               'Typecast': GTypecast.boolean,
+               'Default': False,
+               'Description': 'TODO '},
+            'width': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The width of the label in text columns.' },
+            'height': {
+               'Required': False,
+               'Typecast': GTypecast.whole,
+               'Description': 'The height of the label in text rows. ' },
+            'x': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The column starting position of the label. 
Based upon leftmost column of report being 0.' },
+            'y': {
+               'Required': True,
+               'Typecast': GTypecast.whole,
+               'Description': 'The row starting position of the label. Based 
upon the top row of the report being 0.' }
+          },
+         'ParentTags':  ('titlepage',
+                         'summarypage',
+                         'pageheader',
+                         'pagefooter',
+                         'groupheader',
+                         'groupfooter',
+                         'detail',)
+      },
+
+    }
+
+    
+  return GParser.buildImportableTags('report',xmlElements)
+
+
+#######################################################
+#
+# xmlReportHandler
+#
+# This class is called by the XML parser to
+# process the xml file.
+#
+#######################################################
+
+class xmlReportHandler (GParser.xmlHandler):
+  def __init__(self):
+    GParser.xmlHandler.__init__(self)
+
+    self.xmlElements = getXMLelements()

Added: trunk/gnue-reports/src/adapters/filters/Char/base/CHReport.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/CHReport.py       
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/CHReport.py       
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,64 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2000-2004 Free Software Foundation
+#
+# FILE:
+# CHReport.py
+#
+# DESCRIPTION:
+# Class that contains xml objects for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+__all__ = ['CHReport']
+
+
+from gnue.common.definitions.GObjects import GObj
+from gnue.common.definitions.GRootObj import GRootObj
+from gnue.common.apps import GDebug
+import CHParser
+
+
+class CHReport(GRootObj, GObj): 
+  def __init__(self, parent=None):
+    GRootObj.__init__(self, 'report', CHParser.getXMLelements, CHParser)
+    GObj.__init__(self, parent, type='CHReport')
+
+
+  def process(self, writer):
+    writer.PageHeader = self.findChildOfType('CHPageHeader')
+    writer.PageFooter = self.findChildOfType('CHPageFooter')
+
+    TitlePage = self.findChildOfType('CHTitlePage')
+    if TitlePage:
+      TitlePage.process(writer)
+
+    for child in self._children:
+      if child._type in ('CHDetail', 'CHGroupHeader', 'CHGroupFooter'):
+        child.process(writer)
+
+    SummaryPage = self.findChildOfType('CHSummaryPage')
+    if SummaryPage:
+      SummaryPage.process(writer)
+
+    if writer.PageFooter and (not writer.pageFooterDone):
+      writer.PageFooter.process(writer)
+    writer.newPage()

Added: trunk/gnue-reports/src/adapters/filters/Char/base/Writer.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/base/Writer.py 2004-10-19 
11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/base/Writer.py 2004-10-19 
11:32:15 UTC (rev 6513)
@@ -0,0 +1,118 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# BaseWriter.py
+#
+# DESCRIPTION:
+#
+# NOTES:
+#
+
+__all__ = ['BaseWriter']
+
+class BaseWriter:
+
+  def initialize(self, report):
+    self.reportHeight = report.height
+    self.reportWidth  = report.width
+
+    self.pageNumber = 1
+    self.currLine = 0
+    
+    self.pageHeaderDone = False
+    self.pageFooterDone = False
+
+    self.output.write(self.reset())
+
+
+  def finalize(self):
+    self.output.write(self.reset())
+
+
+  def render(self, object, x, y, width, band,
+                  align=False, condensed=False, bold=False,
+                  italic=False, underline=False):
+
+    # go to correct position in current band if needed...
+    if y > band.y:
+      self.newLine(y-band.y)
+      band.y = y
+      band.x = -1
+
+    if x > band.x:
+      self.output.write((x-band.x)*' ')
+
+
+    # start style
+    if condensed:
+      self.output.write(self.beginCondensed())
+    if bold:
+      self.output.write(self.beginBold())
+    if italic:
+      self.output.write(self.beginItalic())
+    if underline:
+      self.output.write(self.beginUnderline())
+
+
+    self.output.write(object)
+
+
+    # end style
+    if condensed:
+      self.output.write(self.endCondensed())
+    if bold:
+      self.output.write(self.endBold())
+    if italic:
+      self.output.write(self.endItalic())
+    if underline:
+      self.output.write(self.endUnderline())
+
+
+    # go to correct position in current band if needed...
+    if width > len(object):
+      self.output.write((width-len(object))*' ')
+      
+    band.x = x + width
+
+
+  def newPage(self):
+    self.pageNumber += 1
+    self.output.write('\n  ' + 8*('%s' % 'o---------'))
+    self.currLine = 0
+    self.pageHeaderDone = False
+    self.pageFooterDone = False
+
+
+  def newLine(self, n=1):
+    if self.PageFooter and (not self.pageFooterDone):
+      if self.currLine + 1 > self.reportHeight - self.PageFooter.height:
+        self.PageFooter.process(self)
+
+    if self.currLine + 1 > self.reportHeight:
+      self.newPage()
+
+    if self.PageHeader and (not self.pageHeaderDone):
+      self.PageHeader.process(self)
+
+    for i in range(n):
+      self.output.write('\n')
+      self.currLine += 1
+      self.output.write(str(self.currLine).rjust(2))

Added: trunk/gnue-reports/src/adapters/filters/Char/base/__init__.py
===================================================================

Added: trunk/gnue-reports/src/adapters/filters/Char/esc-p/Adapter.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/esc-p/Adapter.py       
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/esc-p/Adapter.py       
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,38 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# Adapter.py
+#
+# DESCRIPTION:
+# Class that contains the base filter adapter for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+from gnue.reports.adapters.filters.Char.base.Adapter import TransformAdapter 
as Base
+from Writer import Writer
+
+
+class TransformAdapter(Base):
+  def __init__(self, *args, **parms):
+    Base.__init__(self, *args, **parms)
+    self.writer = Writer()

Added: trunk/gnue-reports/src/adapters/filters/Char/esc-p/Writer.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/esc-p/Writer.py        
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/esc-p/Writer.py        
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,79 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# text/Writer.py
+#
+# DESCRIPTION:
+#
+# NOTES:
+#
+
+__all__ = ['Writer']
+
+from gnue.reports.adapters.filters.Char.base.Writer import *
+
+
+class Writer(BaseWriter):
+  def __init__(self):
+    self.__condensed = 0
+    self.__bold = 0
+    self.__italic = 0
+    self.__underline = 0
+
+  def reset(self):
+    return "\x1B@"
+
+  def beginCondensed(self):
+    self.__condensed = 1
+    return self.__setPrintMode()
+
+  def endCondensed(self):
+    self.__condensed = 0
+    return self.__setPrintMode()
+
+  def beginBold(self):
+    self.__bold = 1
+    return self.__setPrintMode()
+
+  def endBold(self):
+    self.__bold = 0
+    return self.__setPrintMode()
+
+  def beginItalic(self):
+    self.__italic = 1
+    return self.__setPrintMode()
+
+  def endItalic(self):
+    self.__italic = 0
+    return self.__setPrintMode()
+
+  def beginUnderline(self):
+    self.__underline = 1
+    return self.__setPrintMode()
+
+  def endUnderline(self):
+    self.__underline = 0
+    return self.__setPrintMode()
+
+  def __setPrintMode(self):
+    return "\x1B!" + chr(self.__condensed * 4 | self.__bold * 8 | \
+                         self.__italic * 64 | self.__underline * 128)
+

Added: trunk/gnue-reports/src/adapters/filters/Char/esc-p/__init__.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/esc-p/__init__.py      
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/esc-p/__init__.py      
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1 @@
+from Adapter import *

Added: trunk/gnue-reports/src/adapters/filters/Char/pcl5/Adapter.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/pcl5/Adapter.py        
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/pcl5/Adapter.py        
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,38 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# Adapter.py
+#
+# DESCRIPTION:
+# Class that contains the base filter adapter for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+from gnue.reports.adapters.filters.Char.base.Adapter import TransformAdapter 
as Base
+from Writer import Writer
+
+
+class TransformAdapter(Base):
+  def __init__(self, *args, **parms):
+    Base.__init__(self, *args, **parms)
+    self.writer = Writer()

Added: trunk/gnue-reports/src/adapters/filters/Char/pcl5/Writer.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/pcl5/Writer.py 2004-10-19 
11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/pcl5/Writer.py 2004-10-19 
11:32:15 UTC (rev 6513)
@@ -0,0 +1,65 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# text/Writer.py
+#
+# DESCRIPTION:
+#
+# NOTES:
+#
+
+__all__ = ['Writer']
+
+from gnue.reports.adapters.filters.Char.base.Writer import *
+
+
+class Writer(BaseWriter):
+  def __init__(self):
+    pass
+
+  def reset(self):
+    return ""
+
+  def beginCondensed(self):
+    return ""
+
+  def endCondensed(self):
+    return ""
+
+  def beginBold(self):
+    return ""
+
+  def endBold(self):
+    return ""
+
+  def beginItalic(self):
+    return ""
+
+  def endItalic(self):
+    return ""
+
+  def beginUnderline(self):
+    return ""
+
+  def endUnderline(self):
+    return ""
+
+

Added: trunk/gnue-reports/src/adapters/filters/Char/pcl5/__init__.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/pcl5/__init__.py       
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/pcl5/__init__.py       
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1 @@
+from Adapter import *

Added: trunk/gnue-reports/src/adapters/filters/Char/text/Adapter.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/text/Adapter.py        
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/text/Adapter.py        
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1,38 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# Adapter.py
+#
+# DESCRIPTION:
+# Class that contains the base filter adapter for GNUe Reports'
+# "Char" markup.
+#
+# NOTES:
+#
+
+from gnue.reports.adapters.filters.Char.base.Adapter import TransformAdapter 
as Base
+from Writer import Writer
+
+
+class TransformAdapter(Base):
+  def __init__(self, *args, **parms):
+    Base.__init__(self, *args, **parms)
+    self.writer = Writer()

Added: trunk/gnue-reports/src/adapters/filters/Char/text/Writer.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/text/Writer.py 2004-10-19 
11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/text/Writer.py 2004-10-19 
11:32:15 UTC (rev 6513)
@@ -0,0 +1,65 @@
+#
+# This file is part of GNU Enterprise.
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright 2003-2004 Free Software Foundation
+#
+# FILE:
+# text/Writer.py
+#
+# DESCRIPTION:
+#
+# NOTES:
+#
+
+__all__ = ['Writer']
+
+from gnue.reports.adapters.filters.Char.base.Writer import *
+
+
+class Writer(BaseWriter):
+  def __init__(self):
+    pass
+
+  def reset(self):
+    return ""
+
+  def beginCondensed(self):
+    return ""
+
+  def endCondensed(self):
+    return ""
+
+  def beginBold(self):
+    return ""
+
+  def endBold(self):
+    return ""
+
+  def beginItalic(self):
+    return ""
+
+  def endItalic(self):
+    return ""
+
+  def beginUnderline(self):
+    return ""
+
+  def endUnderline(self):
+    return ""
+
+

Added: trunk/gnue-reports/src/adapters/filters/Char/text/__init__.py
===================================================================
--- trunk/gnue-reports/src/adapters/filters/Char/text/__init__.py       
2004-10-19 11:29:32 UTC (rev 6512)
+++ trunk/gnue-reports/src/adapters/filters/Char/text/__init__.py       
2004-10-19 11:32:15 UTC (rev 6513)
@@ -0,0 +1 @@
+from Adapter import *





reply via email to

[Prev in Thread] Current Thread [Next in Thread]