Simon Strandgaard
4/28/2005 6:07:00 PM
On 4/28/05, Eric Mahurin <eric_mahurin@yahoo.com> wrote:
> --- Simon Strandgaard <neoneye@gmail.com> wrote:
[snip]
> > Yeah, I don't have neither insert nor delete.
> > I didn't needed it when I made the lib. I though about it,
> > but couldn't decide how to approach this problem.
>
> So that the number of methods doesn't blow up, I decided to
> have my "get" and "put" methods take a flags argument to
> provide many functions:
>
> forward/reverse
> move/hold
> read(return original value)/ignore(return length)
> scan or replace vs. delete or insert
>
> Last I counted, I have 12 get functions and 10 put functions
> (all of which can operator on individual elements or a
> string/array of them). The base class will base all of these
> on 4 primitives (getdelete before/after and insert
> before/after), but most classes will want to override most of
> it.
Watch out not putting too much behavior in a single function :-)
Can you paste some of your code? I'd like to see it.
--
Simon Strandgaard