Re: Counters work

2002-07-26 Thread Martin Vermeer
On Wed, Jul 17, 2002 at 11:25:26AM +0100, Angus Leeming wrote: On Tuesday 16 July 2002 9:12 pm, Martin Vermeer wrote: Let me make this perfectly clear: this just compiles. And looks beautiful (doesn't it?). And is believed to be politically correct. Thanks... I'm slowly getting this C++

Re: "Counters" work

2002-07-26 Thread Martin Vermeer
On Wed, Jul 17, 2002 at 11:25:26AM +0100, Angus Leeming wrote: > On Tuesday 16 July 2002 9:12 pm, Martin Vermeer wrote: > > Let me make this perfectly clear: this just compiles. And looks > > beautiful (doesn't it?). And is believed to be politically correct. > > Thanks... I'm slowly getting

Re: Counters work

2002-07-22 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes: | On Tuesday 16 July 2002 9:12 pm, Martin Vermeer wrote: Let me make this perfectly clear: this just compiles. And looks beautiful (doesn't it?). And is believed to be politically correct. Thanks... I'm slowly getting this C++ philosophy :-) | ;-) Well

Re: "Counters" work

2002-07-22 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Tuesday 16 July 2002 9:12 pm, Martin Vermeer wrote: >> Let me make this perfectly clear: this just compiles. And looks >> beautiful (doesn't it?). And is believed to be politically correct. >> Thanks... I'm slowly getting this C++ philosophy :-) > |

Re: Counters work

2002-07-16 Thread Martin Vermeer
On Mon, Jul 15, 2002 at 05:57:01PM +0100, Angus Leeming wrote: ... Do you really need to make char Counters::hebrewCounter(int n) a class method? It doesn't use any class variables. I'd suggest, in the .C file only: namespace { char Counters::hebrewCounter(int n) { ... }

Re: Counters work

2002-07-16 Thread Angus Leeming
On Tuesday 16 July 2002 12:48 pm, Martin Vermeer wrote: On Mon, Jul 15, 2002 at 05:57:01PM +0100, Angus Leeming wrote: ... Do you really need to make char Counters::hebrewCounter(int n) a class method? It doesn't use any class variables. I'd suggest, in the .C file only: namespace

Re: Counters work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: One more suggestion: naked pointers are evil. Naked pointers in an STL container are doubly evil. Wrap that pointer in a boost::shared_ptr. Memory is automatically delete-d as the list goes out of scope. Why are pointers used

Re: Counters work

2002-07-16 Thread Angus Leeming
On Tuesday 16 July 2002 3:58 pm, Andre Poenitz wrote: On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: One more suggestion: naked pointers are evil. Naked pointers in an STL container are doubly evil. Wrap that pointer in a boost::shared_ptr. Memory is automatically delete-d

Re: Counters work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: You mean you'd prefer to pass around (possibly large) structs? Seems a little excessive. Anyway, if you prefer that then this will probably also be fine Martin. How large is '(possibly large)'? And yes, I prefer things over

Re: Counters work

2002-07-16 Thread Angus Leeming
On Tuesday 16 July 2002 4:22 pm, Andre Poenitz wrote: On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: You mean you'd prefer to pass around (possibly large) structs? Seems a little excessive. Anyway, if you prefer that then this will probably also be fine Martin. How large

Re: Counters work

2002-07-16 Thread Martin Vermeer
On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: On Tuesday 16 July 2002 3:58 pm, Andre Poenitz wrote: On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: One more suggestion: naked pointers are evil. Naked pointers in an STL container are doubly evil. Wrap

Re: Counters work

2002-07-16 Thread Martin Vermeer
On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: On Tuesday 16 July 2002 3:58 pm, Andre Poenitz wrote: On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: One more suggestion: naked pointers are evil. Naked pointers in an STL container are doubly evil. Wrap

Re: Counters work

2002-07-16 Thread Duncan Simpson
stuff snipped One more suggestion: naked pointers are evil. Naked pointers in an STL container are doubly evil. Wrap that pointer in a boost::shared_ptr. Memory is automatically delete-d as the list goes out of scope. IMHO wasting cycles mainating reference counts when I know the lifetime of

Re: Counters work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 10:43:50PM +0300, Martin Vermeer wrote: counterList[newc] = new Counter; I assume this means the d'tor Counters::~Counters() can go? I did not understand what this was good for anyway. Assuming 'Counter' is a name for a thing, and 'CounterList' a name of a

Re: Counters work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 05:07:23PM +0100, Duncan Simpson wrote: In my experience if you do not know who has a reference to an object and what the scope of those references are the code is almost certaintly wrong anyway. Heavy STL users might not be so lucky but that may be just my prejudice. I

Re: "Counters" work

2002-07-16 Thread Martin Vermeer
On Mon, Jul 15, 2002 at 05:57:01PM +0100, Angus Leeming wrote: ... > Do you really need to make char Counters::hebrewCounter(int n) a class > method? It doesn't use any class variables. > > I'd suggest, in the .C file only: > > namespace { > > char Counters::hebrewCounter(int n) > { >

Re: "Counters" work

2002-07-16 Thread Angus Leeming
On Tuesday 16 July 2002 12:48 pm, Martin Vermeer wrote: > On Mon, Jul 15, 2002 at 05:57:01PM +0100, Angus Leeming wrote: > > ... > > > Do you really need to make char Counters::hebrewCounter(int n) a class > > method? It doesn't use any class variables. > > > > I'd suggest, in the .C file only: >

Re: "Counters" work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: > One more suggestion: naked pointers are evil. Naked pointers in an STL > container are doubly evil. Wrap that pointer in a boost::shared_ptr. Memory > is automatically delete-d as the list goes out of scope. Why are pointers used

Re: "Counters" work

2002-07-16 Thread Angus Leeming
On Tuesday 16 July 2002 3:58 pm, Andre Poenitz wrote: > On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: > > One more suggestion: naked pointers are evil. Naked pointers in an STL > > container are doubly evil. Wrap that pointer in a boost::shared_ptr. > > Memory is automatically

Re: "Counters" work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: > You mean you'd prefer to pass around (possibly large) structs? Seems a little > excessive. Anyway, if you prefer that then this will probably also be fine > Martin. How large is '(possibly large)'? And yes, I prefer things over

Re: "Counters" work

2002-07-16 Thread Angus Leeming
On Tuesday 16 July 2002 4:22 pm, Andre Poenitz wrote: > On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: > > You mean you'd prefer to pass around (possibly large) structs? Seems a > > little excessive. Anyway, if you prefer that then this will probably also > > be fine Martin. > >

Re: "Counters" work

2002-07-16 Thread Martin Vermeer
On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: > On Tuesday 16 July 2002 3:58 pm, Andre Poenitz wrote: > > On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: > > > One more suggestion: naked pointers are evil. Naked pointers in an STL > > > container are doubly evil.

Re: "Counters" work

2002-07-16 Thread Martin Vermeer
On Tue, Jul 16, 2002 at 03:51:05PM +0100, Angus Leeming wrote: > On Tuesday 16 July 2002 3:58 pm, Andre Poenitz wrote: > > On Tue, Jul 16, 2002 at 03:29:12PM +0100, Angus Leeming wrote: > > > One more suggestion: naked pointers are evil. Naked pointers in an STL > > > container are doubly evil.

Re: "Counters" work

2002-07-16 Thread Duncan Simpson
> >One more suggestion: naked pointers are evil. Naked pointers in an STL >container are doubly evil. Wrap that pointer in a boost::shared_ptr. Memory >is automatically delete-d as the list goes out of scope. IMHO wasting cycles mainating reference counts when I know the lifetime of an item

Re: "Counters" work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 10:43:50PM +0300, Martin Vermeer wrote: > > counterList[newc] = new Counter; > > I assume this means the d'tor Counters::~Counters() can go? I did not understand what this was good for anyway. Assuming 'Counter' is a name for a thing, and 'CounterList' a name of a

Re: "Counters" work

2002-07-16 Thread Andre Poenitz
On Tue, Jul 16, 2002 at 05:07:23PM +0100, Duncan Simpson wrote: > In my experience if you do not know who has a reference to an object and what > the scope of those references are the code is almost certaintly wrong anyway. > Heavy STL users might not be so lucky but that may be just my

Re: Counters work

2002-07-15 Thread Martin Vermeer
On Tue, Jul 02, 2002 at 11:12:01AM +0200, Jean-Marc Lasgouttes wrote: Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin Attached the patch representing my work on the counters.[hC] Martin classes, with a view to using them in short title insets. There is obviously too much

Re: Counters work

2002-07-15 Thread Angus Leeming
On Monday 15 July 2002 5:57 pm, Martin Vermeer wrote: On Tue, Jul 02, 2002 at 11:12:01AM +0200, Jean-Marc Lasgouttes wrote: Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin Attached the patch representing my work on the counters.[hC] Martin classes, with a view to using them in

Re: Counters work

2002-07-15 Thread Martin Vermeer
On Mon, Jul 15, 2002 at 05:57:01PM +0100, Angus Leeming wrote: OK, next try... attached. 2002-07-15[EMAIL PROTECTED] * counters.[Ch]: Fleshed out in preparation for taking over counters functionality from text2. Compiles, untested. Martin This should work, allowing

Re: "Counters" work

2002-07-15 Thread Martin Vermeer
On Tue, Jul 02, 2002 at 11:12:01AM +0200, Jean-Marc Lasgouttes wrote: > > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> Attached the patch representing my work on the counters.[hC] > Martin> classes, with a view to using them in short title insets. > > There is

Re: "Counters" work

2002-07-15 Thread Angus Leeming
On Monday 15 July 2002 5:57 pm, Martin Vermeer wrote: > On Tue, Jul 02, 2002 at 11:12:01AM +0200, Jean-Marc Lasgouttes wrote: > > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > > > Martin> Attached the patch representing my work on the counters.[hC] > > Martin> classes, with a

Re: "Counters" work

2002-07-15 Thread Martin Vermeer
On Mon, Jul 15, 2002 at 05:57:01PM +0100, Angus Leeming wrote: > > OK, next try... attached. > > > > 2002-07-15<[EMAIL PROTECTED]> > > > > * counters.[Ch]: Fleshed out in preparation for taking over > > counters functionality from text2. Compiles, untested. > > > > Martin > > This

Re: Counters work

2002-07-02 Thread Jean-Marc Lasgouttes
Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin Attached the patch representing my work on the counters.[hC] Martin classes, with a view to using them in short title insets. There is obviously too much hardcoding in numberlabel(). What you should do is like what latex does: when you

Re: "Counters" work

2002-07-02 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> Attached the patch representing my work on the counters.[hC] Martin> classes, with a view to using them in short title insets. There is obviously too much hardcoding in numberlabel(). What you should do is like what latex

Counters work

2002-06-25 Thread Martin Vermeer
Attached the patch representing my work on the counters.[hC] classes, with a view to using them in short title insets. Currently these classes don't actually do anything yet; next (inbetween holidays) I will have to look at actually creating these insets for sectioning headers (cf. my earlier

"Counters" work

2002-06-25 Thread Martin Vermeer
Attached the patch representing my work on the counters.[hC] classes, with a view to using them in short title insets. Currently these classes don't actually do anything yet; next (inbetween holidays) I will have to look at actually creating these insets for sectioning headers (cf. my earlier