[prev in list] [next in list] [prev in thread] [next in thread]
List: kvm-interest
Subject: Re: Database creation...
From: Brill Pappin <brill.lists () JMONKEY ! COM>
Date: 1999-11-23 15:25:20
[Download RAW message or body]
Thats exactly what I was looking for...
As for the Type ID, I think a better question would be, does it have to be unique... \
does it use the creatorID and the Type id to make it unique.
I suspect that it at least has to be unique for an application when the same \
creatorID will be used for all its DBs.
When I first tried to use a DB, I tried 0 ( I didn't know the type represented a 4 \
char string) and it seemed to work... though the app didn't actualy do anything with \
it, so I can't say for sure.
- Brill Pappin
www.jmonkey.com
On Mon, 22 Nov 1999 16:25:34 +0000, Damon at play <dhd@EXNET.COM> wrote:
> Brill Pappin wrote:
> >
> > Anyone have a good algorithm for doing the conversion?
>
> Is this what you want?
>
> /**Type ID of this app as an ASCII String. */
> public static final String getTypeID() { return("MYID"); }
>
> /**Type ID of this app as an int. */
> public static final int getTypeIDint()
> {
> final String typeID = getTypeID();
> return(
> (typeID.charAt(0) << 24) +
> (typeID.charAt(1) << 16) +
> (typeID.charAt(2) << 8) +
> (typeID.charAt(3) ));
> }
>
> My remaining query is: is the choice of type ID completely arbitrary, or
> are there any special cases (eg 0)?
>
> Damon
> --
> Work: dhd@exnet.com http://www.exnet.com/
> Idle: d@hd.org http://d.hd.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic