~ubuntu-branches/ubuntu/utopic/blitz++/utopic

« back to all changes in this revision

Viewing changes to .pc/01_gcc_43_missing_includes.patch/blitz/prettyprint.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2011-04-08 13:51:07 UTC
  • mfrom: (11.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110408135107-rm025yq8bouoaom4
Tags: 1:0.9-12
* debian/control:
  - Standards-Version: 3.9.2 (no changes needed)
  - Build-Depends: texi2html
  - doc package Depends libjs-jquery which provides jquery.js
* Debhelper 8 (control+compat)
* debian/rules:
  - Fix sequence of dh arguments
  - Do not install unneeded *.la file
    Closes: #621305
  - Remove copy of jquery.js which is provided by a link to the
    file provided in libjs-jquery:

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- C++ -*-
 
2
/***************************************************************************
 
3
 * blitz/prettyprint.h      Format object for pretty-printing of
 
4
 *                          array expressions
 
5
 *
 
6
 * $Id: prettyprint.h,v 1.5 2004/03/09 23:23:43 julianc Exp $
 
7
 *
 
8
 * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
 
9
 *
 
10
 * This program is free software; you can redistribute it and/or
 
11
 * modify it under the terms of the GNU General Public License
 
12
 * as published by the Free Software Foundation; either version 2
 
13
 * of the License, or (at your option) any later version.
 
14
 *
 
15
 * This program is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
 * GNU General Public License for more details.
 
19
 *
 
20
 * Suggestions:          blitz-dev@oonumerics.org
 
21
 * Bugs:                 blitz-bugs@oonumerics.org
 
22
 *
 
23
 * For more information, please see the Blitz++ Home Page:
 
24
 *    http://oonumerics.org/blitz/
 
25
 *
 
26
 ***************************************************************************/
 
27
 
 
28
#ifndef BZ_PRETTYPRINT_H
 
29
#define BZ_PRETTYPRINT_H
 
30
 
 
31
BZ_NAMESPACE(blitz)
 
32
 
 
33
class prettyPrintFormat {
 
34
 
 
35
public:
 
36
    prettyPrintFormat(const bool terse = false)
 
37
        : tersePrintingSelected_(terse) 
 
38
    {
 
39
        arrayOperandCounter_ = 0;
 
40
        scalarOperandCounter_ = 0;
 
41
        dumpArrayShapes_ = false;
 
42
    }
 
43
 
 
44
    void setDumpArrayShapesMode()  { dumpArrayShapes_ = true; }
 
45
    char nextArrayOperandSymbol()  
 
46
    { 
 
47
        return static_cast<char>('A' + ((arrayOperandCounter_++) % 26)); 
 
48
    }
 
49
    char nextScalarOperandSymbol() 
 
50
    { 
 
51
        return static_cast<char>('s' + ((scalarOperandCounter_++) % 26)); 
 
52
    }
 
53
 
 
54
    bool tersePrintingSelected() const { return tersePrintingSelected_; }
 
55
    bool dumpArrayShapesMode()   const { return dumpArrayShapes_; }
 
56
 
 
57
private:
 
58
    bool tersePrintingSelected_;
 
59
    bool dumpArrayShapes_;
 
60
    int arrayOperandCounter_;
 
61
    int scalarOperandCounter_;
 
62
};
 
63
 
 
64
BZ_NAMESPACE_END
 
65
 
 
66
#endif // BZ_PRETTYPRINT_H