~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to ddd/ThemeM.C

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: ThemeM.C,v 1.8 2000/12/19 00:23:41 zeller Exp $ -*- C++ -*-
 
1
// $Id$ -*- C++ -*-
2
2
// Theme Manager
3
3
 
4
4
// Copyright (C) 2000 Universitaet Passau, Germany.
27
27
// or send a mail to the DDD developers <ddd@gnu.org>.
28
28
 
29
29
char ThemeManager_rcsid[] = 
30
 
    "$Id: ThemeM.C,v 1.8 2000/12/19 00:23:41 zeller Exp $";
31
 
 
32
 
#ifdef __GNUG__
33
 
#pragma implementation
34
 
#endif
 
30
    "$Id$";
35
31
 
36
32
#include "ThemeM.h"
37
33
#include "string-fun.h"
38
34
 
39
 
#include <iostream.h>
 
35
#include <iostream>
40
36
 
41
37
#ifndef LOG_THEMES
42
38
#define LOG_THEMES 0
75
71
        strip_space(theme);
76
72
        strip_space(s);
77
73
 
78
 
        if (theme == "")
 
74
        if (theme.empty())
79
75
            continue;
80
 
        if (s == "")
 
76
        if (s.empty())
81
77
            s = "*";
82
78
 
83
79
        bool active = true;
94
90
    delete[] subs;
95
91
}
96
92
 
97
 
ostream& operator<<(ostream& os, const ThemeManager& t)
 
93
std::ostream& operator<<(std::ostream& os, const ThemeManager& t)
98
94
{
99
95
    for (StringThemePatternAssocIter i(t.map); i.ok(); i = i.next())
100
96
    {
107
103
}
108
104
 
109
105
// Get list of themes for an expression
110
 
StringArray ThemeManager::themes(const string& expr)
 
106
StringArray ThemeManager::themes(const string& expr) const
111
107
{
112
108
    StringArray ret;
113
109
 
118
114
    }
119
115
 
120
116
#if LOG_THEMES
121
 
    clog << "Themes of " << expr << ":";
 
117
    std::clog << "Themes of " << expr << ":";
122
118
    for (int j = 0; j < ret.size(); j++)
123
 
        clog << " " << ret[j];
124
 
    clog << "\n";
 
119
        std::clog << " " << ret[j];
 
120
    std::clog << "\n";
125
121
#endif
126
122
 
127
123
    return ret;
128
124
}
129
125
 
130
126
// Get all themes
131
 
StringArray ThemeManager::themes()
 
127
StringArray ThemeManager::themes() const
132
128
{
133
129
    StringArray ret;
134
130