[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gzz] 13th, 14th (jvk)
From: |
Tuomas Lukka |
Subject: |
Re: [Gzz] 13th, 14th (jvk) |
Date: |
Wed, 14 Aug 2002 21:29:45 +0300 |
User-agent: |
Mutt/1.4i |
> We have many libraries with debug variables
Note: he's talking only about the C++ libraries - the Java classes have
their dbg variables that can be accessed by name from the command line
already.
> The low-level interface could be something like
>
> namespace Debug {
> int& getInt(const char *name);
> int& setInt(const char *name, int val);
>
> std::vector<const char *> getVarNames();
>
> int& registerInt(const char *name, int *var);
> }
Hmm... was going to say something about "const char *" -> std::string,
but here we're dealing only with constant strings so this should be ok.
Why is setInt() returning int&? int for previous value might be ok but...
Also, does getInt() have to return a reference either?
Or possibly only have
int& var(const char *name);
> - where could the library be placed in cvs?
gfx/libutil.
> - should it be only for debug variables or is there more
> general use for it?
Let's KISS it for now.
> - what kind of conventions should be used for naming the
> variables?
Probably "libpaper::texgen" or something.
Possibly namespace, object names?
> - is there any need for more structure in the set of variables?
That can be done inside the strings, let's not go overboard with
this thing ;)
> - is there anything special that need to be taken into account
> when writing the jni interface?
I don't think so.
Tuomas