~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Style/Environment/std_environment.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA
  • Date: 2010-04-23 07:09:40 UTC
  • mfrom: (4.1.8 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100423070940-72mjdmdepfgrvo8f
Tags: 1:1.0.7.4-2
Re-upload, former upload failed with wrong diff.gz perhaps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
     list_environment accel, list_environment args);
26
26
  inline friend environment as_environment (const std_environment& env) {
27
27
    return environment ((environment_rep*) env.rep); }
28
 
  inline friend std_environment as_std_environment (const environment& env) {
29
 
    return std_environment ((std_environment_rep*) as_pointer (env)); }
 
28
  inline friend std_environment as_std_environment (const environment& env);
30
29
  inline friend int weak_hash (std_environment env) {
31
30
    return hash ((void*) env.rep); }
32
31
  inline friend bool weak_equal (std_environment env1, std_environment env2) {
83
82
    args->print (prefix * "|o ");
84
83
}
85
84
 
 
85
inline std_environment as_std_environment (const environment& env) {
 
86
    return std_environment ((std_environment_rep*) as_pointer (env)); }
 
87
 
86
88
/******************************************************************************
87
89
* Primitive environments
88
90
******************************************************************************/
135
137
    in (as_std_environment (env)), local (ch), out (in),
136
138
    h (weak_hash (env) ^ weak_hash (ch)) {}
137
139
 
138
 
  void print (ostream& out) { out << "assign_memorizer"; }
 
140
  void print (tm_ostream& out) { out << "assign_memorizer"; }
139
141
  int type () { return MEMORIZE_ASSIGN; }
140
142
  int hash () { return h; }
141
143
  bool equal (memorizer_rep* mem) {
177
179
    in (as_std_environment (env)), local (ch), out (in),
178
180
    h (weak_hash (env) ^ weak_hash (ch)) {}
179
181
 
180
 
  void print (ostream& out) { out << "begin_with_memorizer"; }
 
182
  void print (tm_ostream& out) { out << "begin_with_memorizer"; }
181
183
  int type () { return MEMORIZE_BEGIN_WITH; }
182
184
  int hash () { return h; }
183
185
  bool equal (memorizer_rep* mem) {
225
227
  inline end_with_memorizer_rep (environment env):
226
228
    in (as_std_environment (env)), out (in) {}
227
229
 
228
 
  void print (ostream& out) { out << "end_with_memorizer"; }
 
230
  void print (tm_ostream& out) { out << "end_with_memorizer"; }
229
231
  int type () { return MEMORIZE_END_WITH; }
230
232
  int hash () { return weak_hash (in); }
231
233
  bool equal (memorizer_rep* mem) {
269
271
    in (as_std_environment (env)), local (ch), out (in),
270
272
    h (weak_hash (env) ^ weak_hash (ch)) {}
271
273
 
272
 
  void print (ostream& out) { out << "macro_down_memorizer"; }
 
274
  void print (tm_ostream& out) { out << "macro_down_memorizer"; }
273
275
  int type () { return MEMORIZE_MACRO_DOWN; }
274
276
  int hash () { return h; }
275
277
  bool equal (memorizer_rep* mem) {
294
296
    in (as_std_environment (env)), local (ch), out (in),
295
297
    h (weak_hash (env) ^ weak_hash (as_environment (ch))) {}
296
298
 
297
 
  void print (ostream& out) { out << "macro_redown_memorizer"; }
 
299
  void print (tm_ostream& out) { out << "macro_redown_memorizer"; }
298
300
  int type () { return MEMORIZE_MACRO_DOWN; }
299
301
  int hash () { return h; }
300
302
  bool equal (memorizer_rep* mem) {
357
359
  inline macro_up_memorizer_rep (environment env):
358
360
    in (as_std_environment (env)), out (in) {}
359
361
 
360
 
  void print (ostream& out) { out << "macro_up_memorizer"; }
 
362
  void print (tm_ostream& out) { out << "macro_up_memorizer"; }
361
363
  int type () { return MEMORIZE_MACRO_UP; }
362
364
  int hash () { return weak_hash (in); }
363
365
  bool equal (memorizer_rep* mem) {