
//
// Include file for ..\dbsrc\/idxrel.s schema file.
//
// Automatically generated: Generator Revison $Rev$
//

#ifndef __idxrel_H_
#define __idxrel_H_

#include <diamond/diarel.h>
#include <diamond/utils.h>

#include "idxrel_s.h"
//
// Declaration of class for Index
//
typedef struct _Index_idxStr0 {
	uniqueType	id;
	char	name[128];
} _Index_idxStr0;


class Index : 
		public diaRel,
		public IndexStr,
		public _Strings_IndexStr
{
public:
	static const char* relName;

	inline virtual operator void*() const { return (void*)((IndexStr*)this); }
	inline virtual operator char*() const { return (char*)((IndexStr*)this); }
	inline virtual char* theData(void) const { return (char*)((IndexStr*)this); }
	inline virtual long getDataLength(void) const { return 152; };
	inline virtual pKeyType getKey(const long _db_keyNum=0) const;
	static const bool uniqueFields[1];
	bool isUnique(const long _db_keyNum) const
	{
		if (_db_keyNum==-1)
			return false;
		else
			return uniqueFields[_db_keyNum];
	}

	static const long keyLengths[1];
	inline virtual long getKeyLength(const long _db_keyNum) const
	{
		if (_db_keyNum==-1)
			return 0;
		else
			return keyLengths[_db_keyNum];
	}

	virtual long compare(const pKeyType _db_key, const long _db_keyNum=0) const;
	Index();
	Index(pKeyType _db_newKey, long _db_keyNum);
	Index& operator=(const Index& X);
	void commonInit(void);
	void setKey(const pKeyType _db_newKey, const long _db_keyNum=0);
	long getUnique(void) const { return id; }
	bool hasUnique(void) const { return true; }
	void setUnique(const long uniq) {  id = uniq; }
	long numStrings(void) const { return 5; }
	_db_strStruct strArray[5];
	dbData* getString(const long num) const { return strArray[num].theString; }
	long* getLong(const long num) const { return strArray[num].theLong; }
	const _db_strStruct* getArray(void) const { return strArray;}
	operator dbError();
	const char* verStr(void) const { return "$Id: Idxrel.h,v 1.2 2001/04/21 11:46:48 georgetasker Exp $"; }
};
//
// Declaration of class for File
//
typedef struct _File_idxStr0 {
	uniqueType	id;
} _File_idxStr0;

typedef struct _File_idxStr1 {
	long	fk_index;
	uniqueType	id;
} _File_idxStr1;


class File : 
		public diaRel,
		public FileStr
{
public:
	static const char* relName;

	inline virtual operator void*() const { return (void*)((FileStr*)this); }
	inline virtual operator char*() const { return (char*)((FileStr*)this); }
	inline virtual char* theData(void) const { return (char*)((FileStr*)this); }
	inline virtual long getDataLength(void) const { return 258; };
	inline virtual pKeyType getKey(const long _db_keyNum=0) const;
	static const bool uniqueFields[2];
	bool isUnique(const long _db_keyNum) const
	{
		if (_db_keyNum==-1)
			return false;
		else
			return uniqueFields[_db_keyNum];
	}

	static const long keyLengths[2];
	inline virtual long getKeyLength(const long _db_keyNum) const
	{
		if (_db_keyNum==-1)
			return 0;
		else
			return keyLengths[_db_keyNum];
	}

	virtual long compare(const pKeyType _db_key, const long _db_keyNum=0) const;
	File();
	File(pKeyType _db_newKey, long _db_keyNum);
	File& operator=(const File& X);
	void commonInit(void);
	void setKey(const pKeyType _db_newKey, const long _db_keyNum=0);
	long getUnique(void) const { return id; }
	bool hasUnique(void) const { return true; }
	void setUnique(const long uniq) {  id = uniq; }
	long numStrings(void) const { return 0; }
	const _db_strStruct* getArray(void) const { return 0;}
	operator dbError();
	const char* verStr(void) const { return "$Id: Idxrel.h,v 1.2 2001/04/21 11:46:48 georgetasker Exp $"; }
};
//
// Declaration of class for Item
//
typedef struct _Item_idxStr0 {
	long	type;
	uniqueType	id;
	char	context[32];
	char	name[32];
} _Item_idxStr0;

typedef struct _Item_idxStr1 {
	long	fk_index;
	uniqueType	id;
} _Item_idxStr1;

typedef struct _Item_idxStr2 {
	long	type;
	uniqueType	id;
} _Item_idxStr2;


class Item : 
		public diaRel,
		public ItemStr,
		public _Strings_ItemStr
{
public:
	static const char* relName;

	inline virtual operator void*() const { return (void*)((ItemStr*)this); }
	inline virtual operator char*() const { return (char*)((ItemStr*)this); }
	inline virtual char* theData(void) const { return (char*)((ItemStr*)this); }
	inline virtual long getDataLength(void) const { return 92; };
	inline virtual pKeyType getKey(const long _db_keyNum=0) const;
	static const bool uniqueFields[3];
	bool isUnique(const long _db_keyNum) const
	{
		if (_db_keyNum==-1)
			return false;
		else
			return uniqueFields[_db_keyNum];
	}

	static const long keyLengths[3];
	inline virtual long getKeyLength(const long _db_keyNum) const
	{
		if (_db_keyNum==-1)
			return 0;
		else
			return keyLengths[_db_keyNum];
	}

	virtual long compare(const pKeyType _db_key, const long _db_keyNum=0) const;
	Item();
	Item(pKeyType _db_newKey, long _db_keyNum);
	Item& operator=(const Item& X);
	void commonInit(void);
	void setKey(const pKeyType _db_newKey, const long _db_keyNum=0);
	long getUnique(void) const { return id; }
	bool hasUnique(void) const { return true; }
	void setUnique(const long uniq) {  id = uniq; }
	long numStrings(void) const { return 1; }
	_db_strStruct strArray[1];
	dbData* getString(const long num) const { return strArray[num].theString; }
	long* getLong(const long num) const { return strArray[num].theLong; }
	const _db_strStruct* getArray(void) const { return strArray;}
	operator dbError();
	const char* verStr(void) const { return "$Id: Idxrel.h,v 1.2 2001/04/21 11:46:48 georgetasker Exp $"; }
};

#endif
