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 thi

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-17 Thread Angus Leeming
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 make it useful then! What about this comm

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.

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 co

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 an

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 Andre Poenitz
On Tue, Jul 16, 2002 at 04:11:50PM +0100, Angus Leeming wrote: > > How large is '(possibly large)'? > > Angus looks at the source... (perhaps André could too ;-)... Oh well... I looked, you know... > Ok, not large. A counter contains an int. Not exactly '(possibly large)', no? ;-) > > And y

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. > > Ho

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 p

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 del

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 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 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-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 sh

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 vi

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 obviou

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:

"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 in