From: André Pönitz Date: Wed, 11 Sep 2002 09:14:57 +0000 (+0000) Subject: add #pragme interface/implementation X-Git-Tag: 1.6.10~18310 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a37064c0ac3b1e67b04a9480852f5c9e701fb4d9;p=features.git add #pragme interface/implementation git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5263 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_autocorrect.C b/src/mathed/math_autocorrect.C index 02e35619e8..c8ba7ca628 100644 --- a/src/mathed/math_autocorrect.C +++ b/src/mathed/math_autocorrect.C @@ -1,3 +1,7 @@ +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "LString.h" diff --git a/src/mathed/math_autocorrect.h b/src/mathed/math_autocorrect.h index 30495d05b0..8a3c75bea1 100644 --- a/src/mathed/math_autocorrect.h +++ b/src/mathed/math_autocorrect.h @@ -1,6 +1,10 @@ #ifndef MATHAUTOCORRECT_H #define MATHAUTOCORRECT_H +#ifdef __GNUG__ +#pragma interface +#endif + class MathAtom; // make "corrections" according to file lib/autocorrect diff --git a/src/mathed/math_diffinset.C b/src/mathed/math_diffinset.C index 92011f9f5e..e0fa73675b 100644 --- a/src/mathed/math_diffinset.C +++ b/src/mathed/math_diffinset.C @@ -1,3 +1,7 @@ +#ifdef __GNUG__ +#pragma implementation +#endif + #include "math_diffinset.h" #include "math_support.h" #include "math_mathmlstream.h" diff --git a/src/mathed/math_diffinset.h b/src/mathed/math_diffinset.h index c526279d3f..707c710a0f 100644 --- a/src/mathed/math_diffinset.h +++ b/src/mathed/math_diffinset.h @@ -2,6 +2,10 @@ #ifndef MATH_DIFFINSET_H #define MATH_DIFFINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + // d f(x)/dx in one block // for interfacing external programs diff --git a/src/mathed/math_diminset.C b/src/mathed/math_diminset.C index 88282f0749..b851b75db9 100644 --- a/src/mathed/math_diminset.C +++ b/src/mathed/math_diminset.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include "math_diminset.h" #include "Lsstream.h" #include "textpainter.h" diff --git a/src/mathed/math_diminset.h b/src/mathed/math_diminset.h index 064807bf49..1c49c04260 100644 --- a/src/mathed/math_diminset.h +++ b/src/mathed/math_diminset.h @@ -2,6 +2,10 @@ #ifndef MATH_DIMINSET_H #define MATH_DIMINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_inset.h" #include "dimension.h" diff --git a/src/mathed/math_ertinset.C b/src/mathed/math_ertinset.C index 9112f9c342..14f6bc7fed 100644 --- a/src/mathed/math_ertinset.C +++ b/src/mathed/math_ertinset.C @@ -1,10 +1,15 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_ertinset.h" #include "math_mathmlstream.h" - #include "support/LOstream.h" + MathInset * MathErtInset::clone() const { return new MathErtInset(*this); diff --git a/src/mathed/math_ertinset.h b/src/mathed/math_ertinset.h index 1f50ce80d5..96614a524f 100644 --- a/src/mathed/math_ertinset.h +++ b/src/mathed/math_ertinset.h @@ -1,6 +1,10 @@ #ifndef MATH_ERTINSET_H #define MATH_ERTINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_textinset.h" // implements support for \parbox diff --git a/src/mathed/math_exfuncinset.C b/src/mathed/math_exfuncinset.C index 4941d3fc7a..93cd53e79f 100644 --- a/src/mathed/math_exfuncinset.C +++ b/src/mathed/math_exfuncinset.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_exfuncinset.h" diff --git a/src/mathed/math_exfuncinset.h b/src/mathed/math_exfuncinset.h index fe240065b8..7a9d13c945 100644 --- a/src/mathed/math_exfuncinset.h +++ b/src/mathed/math_exfuncinset.h @@ -2,6 +2,10 @@ #ifndef MATH_EXFUNCINSET_H #define MATH_EXFUNCINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_nestinset.h" // f(x) in one block (as opposed to 'f','(','x',')' or 'f','x') diff --git a/src/mathed/math_exintinset.C b/src/mathed/math_exintinset.C index 97754e10f2..f39b8ba642 100644 --- a/src/mathed/math_exintinset.C +++ b/src/mathed/math_exintinset.C @@ -1,3 +1,9 @@ + + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_exintinset.h" @@ -9,8 +15,6 @@ #include -using std::endl; - MathExIntInset::MathExIntInset(string const & name) : MathNestInset(4), symbol_(name) @@ -51,13 +55,13 @@ void MathExIntInset::normalize(NormalStream & os) const void MathExIntInset::metrics(MathMetricsInfo &) const { - lyxerr << "should not happen" << endl; + lyxerr << "should not happen\n"; } void MathExIntInset::draw(MathPainterInfo &, int, int) const { - lyxerr << "should not happen" << endl; + lyxerr << "should not happen\n"; } @@ -111,5 +115,5 @@ void MathExIntInset::mathmlize(MathMLStream & os) const void MathExIntInset::write(WriteStream &) const { - lyxerr << "should not happen" << endl; + lyxerr << "should not happen\n"; } diff --git a/src/mathed/math_exintinset.h b/src/mathed/math_exintinset.h index 7c3866df1d..8e44465b7f 100644 --- a/src/mathed/math_exintinset.h +++ b/src/mathed/math_exintinset.h @@ -2,6 +2,10 @@ #ifndef MATH_EXINTINSET_H #define MATH_EXINTINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + // \int_l^u f(x) dx in one block (as opposed to 'f','(','x',')' or 'f','x') // or \sum, \prod... for interfacing external programs diff --git a/src/mathed/math_extern.C b/src/mathed/math_extern.C index ae8a0fee85..4585b1f4e6 100644 --- a/src/mathed/math_extern.C +++ b/src/mathed/math_extern.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + // This file contains most of the magic that extracts "context // information" from the unstructered layout-oriented stuff in an // MathArray. diff --git a/src/mathed/math_extern.h b/src/mathed/math_extern.h index 933129c1a6..9e2f23c8b5 100644 --- a/src/mathed/math_extern.h +++ b/src/mathed/math_extern.h @@ -1,6 +1,10 @@ #ifndef MATH_EXTERN_H #define MATH_EXTERN_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "LString.h" class NormalStream; diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index 0887d0ab94..0795f1411b 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_parser.h" diff --git a/src/mathed/math_factory.h b/src/mathed/math_factory.h index b53efdda64..da5fb9f367 100644 --- a/src/mathed/math_factory.h +++ b/src/mathed/math_factory.h @@ -1,6 +1,10 @@ #ifndef MATH_FACTORY_H #define MATH_FACTORY_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "LString.h" #include "math_atom.h" diff --git a/src/mathed/math_inset.C b/src/mathed/math_inset.C index 1eb8465e99..62cc723c08 100644 --- a/src/mathed/math_inset.C +++ b/src/mathed/math_inset.C @@ -15,14 +15,14 @@ * the GNU General Public Licence version 2 or later. */ +#include + #ifdef __GNUG__ -#pragma implementation +#pragma implementation #endif -#include - -#include "Lsstream.h" #include "math_inset.h" +#include "Lsstream.h" #include "math_scriptinset.h" #include "math_mathmlstream.h" #include "math_cursor.h" @@ -34,9 +34,7 @@ #include "BufferView.h" #include "formulabase.h" - using std::ostream; -using std::vector; int MathInset::height() const @@ -45,14 +43,6 @@ int MathInset::height() const } -ostream & operator<<(ostream & os, MathAtom const & at) -{ - WriteStream wi(os, false, false); - at->write(wi); - return os; -} - - MathInset::size_type MathInset::nargs() const { return 0; @@ -303,6 +293,14 @@ MathArray asArray(string const & str) } +ostream & operator<<(ostream & os, MathAtom const & at) +{ + WriteStream wi(os, false, false); + at->write(wi); + return os; +} + + Dialogs & getDialogs() { return mathcursor->formula()->view()->owner()->getDialogs(); diff --git a/src/mathed/math_inset.h b/src/mathed/math_inset.h index a1b2f2c8da..358a1c564d 100644 --- a/src/mathed/math_inset.h +++ b/src/mathed/math_inset.h @@ -22,12 +22,12 @@ #ifndef MATH_INSET_H #define MATH_INSET_H -#include - #ifdef __GNUG__ #pragma interface #endif +#include + #include "LString.h" #include "frontends/mouse_state.h" #include "math_data.h" diff --git a/src/mathed/math_iterator.C b/src/mathed/math_iterator.C index 0ea30539f4..8f508907e8 100644 --- a/src/mathed/math_iterator.C +++ b/src/mathed/math_iterator.C @@ -1,3 +1,7 @@ +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_iterator.h" diff --git a/src/mathed/math_iterator.h b/src/mathed/math_iterator.h index 15d790ddba..8d71416a66 100644 --- a/src/mathed/math_iterator.h +++ b/src/mathed/math_iterator.h @@ -2,6 +2,10 @@ #ifndef MATH_ITERATOR_H #define MATH_ITERATOR_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_pos.h" #include diff --git a/src/mathed/math_liminset.C b/src/mathed/math_liminset.C index 5c1b1d8a4b..8c9da0db21 100644 --- a/src/mathed/math_liminset.C +++ b/src/mathed/math_liminset.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include "math_liminset.h" #include "math_support.h" #include "math_mathmlstream.h" diff --git a/src/mathed/math_liminset.h b/src/mathed/math_liminset.h index c1ecb90fdb..8ed4ae4c63 100644 --- a/src/mathed/math_liminset.h +++ b/src/mathed/math_liminset.h @@ -2,6 +2,10 @@ #ifndef MATH_LIMINSET_H #define MATH_LIMINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + // lim_{x->x0} f(x) in one block // for interfacing external programs diff --git a/src/mathed/math_mathmlstream.C b/src/mathed/math_mathmlstream.C index 81b1a73ca8..4829f80bf9 100644 --- a/src/mathed/math_mathmlstream.C +++ b/src/mathed/math_mathmlstream.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_mathmlstream.h" diff --git a/src/mathed/math_mathmlstream.h b/src/mathed/math_mathmlstream.h index ebd7c65242..9ed06a5e00 100644 --- a/src/mathed/math_mathmlstream.h +++ b/src/mathed/math_mathmlstream.h @@ -1,6 +1,9 @@ #ifndef MATH_MATHMLSTREAM_H #define MATH_MATHMLSTREAM_H +#ifdef __GNUG__ +#pragma interface +#endif // Please keep all four streams in one file until the interface has // settled. diff --git a/src/mathed/math_metricsinfo.C b/src/mathed/math_metricsinfo.C index 15f2ed82e9..9ffe4fb6fa 100644 --- a/src/mathed/math_metricsinfo.C +++ b/src/mathed/math_metricsinfo.C @@ -1,4 +1,8 @@ +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_metricsinfo.h" diff --git a/src/mathed/math_metricsinfo.h b/src/mathed/math_metricsinfo.h index bd8a46d15b..3dc911b7b6 100644 --- a/src/mathed/math_metricsinfo.h +++ b/src/mathed/math_metricsinfo.h @@ -1,6 +1,10 @@ #ifndef MATH_METRICSINFO_H #define MATH_METRICSINFO_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "lyxfont.h" #include "LString.h" diff --git a/src/mathed/math_parboxinset.C b/src/mathed/math_parboxinset.C index eac138f455..8e0b3b140a 100644 --- a/src/mathed/math_parboxinset.C +++ b/src/mathed/math_parboxinset.C @@ -1,12 +1,14 @@ +#ifdef __GNUG__ +#pragma implementation +#endif + #include "math_parboxinset.h" #include "math_mathmlstream.h" #include "math_streamstr.h" #include "lyxlength.h" #include "debug.h" -using std::vector; - MathParboxInset::MathParboxInset() : lyx_width_(0), tex_width_("0mm"), position_('c') diff --git a/src/mathed/math_parboxinset.h b/src/mathed/math_parboxinset.h index e03bf2de98..56306d50d1 100644 --- a/src/mathed/math_parboxinset.h +++ b/src/mathed/math_parboxinset.h @@ -1,6 +1,10 @@ #ifndef MATH_PARBOXINSET_H #define MATH_PARBOXINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_textinset.h" // implements support for \parbox diff --git a/src/mathed/math_parinset.C b/src/mathed/math_parinset.C index 371d458938..a1b868e955 100644 --- a/src/mathed/math_parinset.C +++ b/src/mathed/math_parinset.C @@ -1,10 +1,15 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_parinset.h" #include "math_mathmlstream.h" - #include "support/LOstream.h" + MathParInset::MathParInset(MathArray const & ar) { cells_[0] = ar; diff --git a/src/mathed/math_parinset.h b/src/mathed/math_parinset.h index e807a5867e..fe6db21be5 100644 --- a/src/mathed/math_parinset.h +++ b/src/mathed/math_parinset.h @@ -1,6 +1,10 @@ #ifndef MATH_PARINSET_H #define MATH_PARINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_hullinset.h" class MathParInset : public MathHullInset { diff --git a/src/mathed/math_pos.C b/src/mathed/math_pos.C index 53162528a7..2dfa32839b 100644 --- a/src/mathed/math_pos.C +++ b/src/mathed/math_pos.C @@ -1,15 +1,16 @@ -#include "config.h" -#include +#ifdef __GNUG__ +#pragma implementation +#endif +#include "config.h" #include "math_pos.h" #include "math_inset.h" #include "debug.h" #include "support/LAssert.h" +#include "support/LOstream.h" -using std::ostream; - MathCursorPos::MathCursorPos() : par_(0), idx_(0), pos_(0) {} @@ -43,7 +44,7 @@ void MathCursorPos::getPos(int & x, int & y) const } -ostream & operator<<(ostream & os, MathCursorPos const & p) +std::ostream & operator<<(std::ostream & os, MathCursorPos const & p) { os << "(par: " << p.par_ << " idx: " << p.idx_ << " pos: " << p.pos_ << ")"; return os; diff --git a/src/mathed/math_pos.h b/src/mathed/math_pos.h index d238fb93f6..806827bcfd 100644 --- a/src/mathed/math_pos.h +++ b/src/mathed/math_pos.h @@ -1,6 +1,10 @@ #ifndef MATH_POS_H #define MATH_POS_H +#ifdef __GNUG__ +#pragma interface +#endif + #include #include "math_data.h" diff --git a/src/mathed/math_replace.h b/src/mathed/math_replace.h index 0aa9d03663..369ab5f510 100644 --- a/src/mathed/math_replace.h +++ b/src/mathed/math_replace.h @@ -1,6 +1,10 @@ #ifndef MATH_REPLACE_H #define MATH_REPLACE_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_data.h" struct ReplaceData { diff --git a/src/mathed/math_streamstr.C b/src/mathed/math_streamstr.C index 71068bceb7..974a7913b8 100644 --- a/src/mathed/math_streamstr.C +++ b/src/mathed/math_streamstr.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_streamstr.h" diff --git a/src/mathed/math_streamstr.h b/src/mathed/math_streamstr.h index 065c7c8c6a..72be3a0ca2 100644 --- a/src/mathed/math_streamstr.h +++ b/src/mathed/math_streamstr.h @@ -1,7 +1,12 @@ // -*- C++ -*- + #ifndef MATH_STREAMSTR_H #define MATH_STREAMSTR_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "LString.h" class WriteStream; diff --git a/src/mathed/math_support.C b/src/mathed/math_support.C index 34896fbaeb..cdaca8d9fc 100644 --- a/src/mathed/math_support.C +++ b/src/mathed/math_support.C @@ -1,6 +1,9 @@ -#include -#include +#ifdef __GNUG__ +#pragma implementation +#endif + +#include #include "math_support.h" #include "lyxfont.h" @@ -15,8 +18,8 @@ #include "commandtags.h" #include "dimension.h" -using std::map; -using std::endl; +#include + using std::max; @@ -318,7 +321,7 @@ named_deco_struct deco_table[] = { }; -map deco_list; +std::map deco_list; // sort the table on startup struct init_deco_table { @@ -338,7 +341,7 @@ static init_deco_table dummy; deco_struct const * search_deco(string const & name) { - map::const_iterator p = deco_list.find(name); + std::map::const_iterator p = deco_list.find(name); return (p == deco_list.end()) ? 0 : &(p->second); } diff --git a/src/mathed/math_support.h b/src/mathed/math_support.h index 76d4a6f4b0..ab974aa237 100644 --- a/src/mathed/math_support.h +++ b/src/mathed/math_support.h @@ -3,6 +3,10 @@ #ifndef MATH_SUPPORT_H #define MATH_SUPPORT_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "LString.h" class MathPainterInfo; diff --git a/src/mathed/math_symbolinset.C b/src/mathed/math_symbolinset.C index 65b36b8b8a..1bacd342c3 100644 --- a/src/mathed/math_symbolinset.C +++ b/src/mathed/math_symbolinset.C @@ -1,3 +1,8 @@ + +#ifdef __GNUG__ +#pragma implementation +#endif + #include #include "math_symbolinset.h" @@ -9,9 +14,6 @@ #include "debug.h" -using std::ostream; - - MathSymbolInset::MathSymbolInset(const latexkeys * l) : sym_(l), h_(0) {} @@ -175,7 +177,7 @@ void MathSymbolInset::write(WriteStream & os) const } -void MathSymbolInset::infoize(ostream & os) const +void MathSymbolInset::infoize(std::ostream & os) const { os << "Symbol: " << name(); } diff --git a/src/mathed/math_symbolinset.h b/src/mathed/math_symbolinset.h index 0c99bbaad2..30fd215e84 100644 --- a/src/mathed/math_symbolinset.h +++ b/src/mathed/math_symbolinset.h @@ -2,6 +2,10 @@ #ifndef MATH_SYMBOLINSET_H #define MATH_SYMBOLINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_diminset.h" struct latexkeys; diff --git a/src/mathed/math_textinset.C b/src/mathed/math_textinset.C index ce30f3f184..97105704f3 100644 --- a/src/mathed/math_textinset.C +++ b/src/mathed/math_textinset.C @@ -1,4 +1,8 @@ +#ifdef __GNUG__ +#pragma implementation +#endif + #include "math_textinset.h" #include "math_metricsinfo.h" #include "debug.h" diff --git a/src/mathed/math_textinset.h b/src/mathed/math_textinset.h index 309d319ce1..db8b391daa 100644 --- a/src/mathed/math_textinset.h +++ b/src/mathed/math_textinset.h @@ -1,6 +1,10 @@ #ifndef MATH_TEXTINSET_H #define MATH_TEXTINSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "math_gridinset.h" // not yet a substitute for the real text inset... diff --git a/src/mathed/preview.C b/src/mathed/preview.C index 3448fce4df..bb404fc79b 100644 --- a/src/mathed/preview.C +++ b/src/mathed/preview.C @@ -1 +1 @@ -// code is currently directly inseide InsetFormula +// code is currently directly inside InsetFormula diff --git a/src/mathed/preview.h b/src/mathed/preview.h index 9ce6b42217..a753649935 100644 --- a/src/mathed/preview.h +++ b/src/mathed/preview.h @@ -1,6 +1,10 @@ #ifndef PREVIEW_H #define PREVIEW_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "LString.h" bool preview(string const & str); diff --git a/src/mathed/ref_inset.h b/src/mathed/ref_inset.h index 91a0b2798d..2a2c89e647 100644 --- a/src/mathed/ref_inset.h +++ b/src/mathed/ref_inset.h @@ -1,6 +1,10 @@ #ifndef REF_INSET_H #define REF_INSET_H +#ifdef __GNUG__ +#pragma interface +#endif + #include "command_inset.h" // for \ref diff --git a/src/mathed/textpainter.C b/src/mathed/textpainter.C index 86c38f8cf1..5f464b5754 100644 --- a/src/mathed/textpainter.C +++ b/src/mathed/textpainter.C @@ -1,5 +1,10 @@ -#include + +#ifdef __GNUG__ +#pragma implementation +#endif + #include "textpainter.h" +#include "support/LOstream.h" TextPainter::TextPainter(int xmax, int ymax) diff --git a/src/mathed/textpainter.h b/src/mathed/textpainter.h index f2a720e8de..9e68911274 100644 --- a/src/mathed/textpainter.h +++ b/src/mathed/textpainter.h @@ -1,6 +1,10 @@ #ifndef TEXTPAINTER_H #define TEXTPAINTER_H +#ifdef __GNUG__ +#pragma interface +#endif + #include #include