blitz  Version 1.0.2
prettyprint.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /***************************************************************************
3  * blitz/prettyprint.h Format object for pretty-printing of
4  * array expressions
5  *
6  * $Id$
7  *
8  * Copyright (C) 1997-2011 Todd Veldhuizen <tveldhui@acm.org>
9  *
10  * This file is a part of Blitz.
11  *
12  * Blitz is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License
14  * as published by the Free Software Foundation, either version 3
15  * of the License, or (at your option) any later version.
16  *
17  * Blitz is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with Blitz. If not, see <http://www.gnu.org/licenses/>.
24  *
25  * Suggestions: blitz-devel@lists.sourceforge.net
26  * Bugs: blitz-support@lists.sourceforge.net
27  *
28  * For more information, please see the Blitz++ Home Page:
29  * https://sourceforge.net/projects/blitz/
30  *
31  ***************************************************************************/
32 
33 #ifndef BZ_PRETTYPRINT_H
34 #define BZ_PRETTYPRINT_H
35 
36 #include <blitz/blitz.h>
37 
38 namespace blitz {
39 
41 
42 public:
43  prettyPrintFormat(const bool terse = false)
44  : tersePrintingSelected_(terse)
45  {
48  dumpArrayShapes_ = false;
49  }
50 
53  {
54  return static_cast<char>('A' + ((arrayOperandCounter_++) % 26));
55  }
57  {
58  return static_cast<char>('s' + ((scalarOperandCounter_++) % 26));
59  }
60 
62  bool dumpArrayShapesMode() const { return dumpArrayShapes_; }
63 
64 private:
69 };
70 
71 }
72 
73 #endif // BZ_PRETTYPRINT_H
bool tersePrintingSelected() const
Definition: prettyprint.h:61
char nextArrayOperandSymbol()
Definition: prettyprint.h:52
Definition: array-impl.h:66
int arrayOperandCounter_
Definition: prettyprint.h:67
bool dumpArrayShapes_
Definition: prettyprint.h:66
char nextScalarOperandSymbol()
Definition: prettyprint.h:56
void setDumpArrayShapesMode()
Definition: prettyprint.h:51
prettyPrintFormat(const bool terse=false)
Definition: prettyprint.h:43
bool dumpArrayShapesMode() const
Definition: prettyprint.h:62
bool tersePrintingSelected_
Definition: prettyprint.h:65
int scalarOperandCounter_
Definition: prettyprint.h:68
Definition: prettyprint.h:40