#391 closed enhancement (fixed)
config file NULL value syntax
| Reported by: | jhoblitt | Owned by: | eugene |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | IPP SDRS | Version: | unspecified |
| Severity: | minor | Keywords: | |
| Cc: |
Description
How are NULL, NAN, or INF values declared?
Change History (9)
comment:1 by , 21 years ago
| dependson: | → 317 |
|---|
comment:2 by , 21 years ago
comment:3 by , 21 years ago
I forgot to add that a possible alternative is to reserve a couple of bits in
psMetadataType to indicate this information.
comment:4 by , 21 years ago
| Status: | new → assigned |
|---|
I prefer the option of bits, or bit values, in psMetadataType. For any data
type except the primitives, the values NAN, POSINF, NEGINF are meaningless. It
might make sense to define these special values as bits associated with the
primitive type range (and possibly even part of PS_TYPE). eg:
PS_TYPE_S8 0x0000
PS_TYPE_S16 0x0001
PS_TYPE_S32 0x0002
..
PS_TYPE_C64 0x000d
PS_TYPE_BOOL 0x000e
PS_TYPE_NULL 0x0010
PS_TYPE_NAN 0x0020
PS_TYPE_POSINF 0x0040
PS_TYPE_NEGINF 0x0080
..
comment:5 by , 21 years ago
I'm not sure that I follow your proposal... psType no longer has any
relationship with psMetadataItem. What am I missing?
comment:6 by , 21 years ago
Did we settle on adding a 'psMetadataFlags flags' field to psMetadataItem?
comment:7 by , 21 years ago
Per our conversation I've added PS_META_NULL to psMetadataFlags in the SDRS.
typedef enum { /< option flags for psMetadata functions
PS_META_DEFAULT = 0, /< default behavior (0x0000) for use
in mode above
PS_META_REPLACE = 0x1000000 /< allow entry to be replaced
PS_META_DUPLICATE_OK = 0x2000000 /< allow duplicate entries
PS_META_NULL = 0x4000000 /< psMetadataItem.data is a NULL
value} psMetadataFlags;
comment:8 by , 21 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
I've added a section about Configuration file 'Null values' to the SDRS.
comment:9 by , 21 years ago
| blocked: | → 317 |
|---|---|
| dependson: | 317 |

psMetadataItem will have to be modified to indicate if a char* or int is 'NULL'.
I'd like to propose a change similar to this:
typedef enum {
}
psMetadataState;
typedef struct psMetadataItem
{
char *name; /< Name of metadata item.
}
psMetadataItem;
psMetadataState isn't a great name but it seemed less confusing then something
like psMetaMetadata.