//----------------------------------------------------
/**
	\file		ctk/inc/pdef.h
	\ingroup	old
	\ingroup	all

	\brief	Definice struktury parametru aplikace
			<<< ALL >>>
			
	\author	ConTeK s.r.o., Ing. Vladimir Kastner
	\version	01.01
	\date	12.01.2007
*/
//----------------------------------------------------

#ifndef _PDEF_H_
#define _PDEF_H_

#include <ctktypes.h>
#include <datadef.h>

//----------------------------------------------------
/**
	\brief	Obecna makra
*/
//----------------------------------------------------

#define DF_ADD( _name1, _name2 ) \
	_name1##_##_name2

//----------------------------------------------------
/*
	\brief	Definice vyctovych typu
*/
//----------------------------------------------------
/*
#define RS( _name, _length, _text ) \
	nm_##_name,

#define RSP( _name, _text ) \
	nm_##_name,

#define DFT_ENUM8( _name, ... ) \
	typedef enum { \
		__VA_ARGS__ \
		max_##_name \
	} tp_##_name;

#include <pdfapp.h>
*/

//----------------------------------------------------
/**
	\brief	Definice indexu
*/
//----------------------------------------------------

#define RS( _name, _length, _text ) \
	idx_##_name,

#define RSP( _name, _text ) \
	idx_##_name,

#define DFT_ENUM8( _name, ... ) \
	__VA_ARGS__

#define DF_RS( ... ) \
	__VA_ARGS__

#define DF_FLT32( _name, _desc, _unit, \
	_prec, _scale, _access, _options, \
	_default, _min, _max, _step ) \
	idx_##_name,

#define DF_ENUM8( _name, _desc, _type, _default ) \
	idx_##_name,

#define DF_STRUCT( _name, _desc, _type ) \
	idx_##_name,

#define DF_ARRAY( _param, _count ) \
	_param

#define DFT_CMDB

#define DFT_CMD \
	DF_ADD

#define DFT_CMDE

#define DFT_STR( _name, _param, ... ) \
	DFT_CMD( _name, _param )

#define D_RPT1( _name, _param1, ... ) \
	DFT_STR( _name, _param1 ) \
	DFT_CMDE

#define D_RPT2( _name, _param1, _param2, ... ) \
	DFT_STR( _name, _param1 ) \
	D_RPT1( _name, _param2 )

#define D_RPT3( _name, _param1, _param2, _param3, ... ) \
	DFT_STR( _name, _param1 ) \
	D_RPT2( _name, _param2, _param3 )

#define D_RPT4( _name, _param1, _param2, _param3, _param4, ... ) \
	DFT_STR( _name, _param1 ) \
	D_RPT3( _name, _param2, _param3, _param4, __VA_ARGS__ )

#define D_RPT5( _name, _param1, _param2, _param3, _param4, _param5, ... ) \
	DFT_STR( _name, _param1 ) \
	D_RPT4( _name, _param2, _param3, _param4, _param5, __VA_ARGS__ )

#define D_RPT6( _name, _param1, _param2, _param3, _param4, _param5, _param6, ... ) \
	DFT_STR( _name, _param1 ) \
	D_RPT5( _name, _param2, _param3, _param4, _param5, _param6, __VA_ARGS__ )

#define D_RPT7( _name, _param1, _param2, _param3, _param4, _param5, _param6, _param7, ... ) \
	DFT_STR( _name, _param1 ) \
	D_RPT6( _name, _param2, _param3, _param4, _param5, _param6, _param7, __VA_ARGS__ )

#define DFT_STRUCT1 D_RPT1
#define DFT_STRUCT2 D_RPT2
#define DFT_STRUCT3 D_RPT3
#define DFT_STRUCT4 D_RPT4
#define DFT_STRUCT5 D_RPT5
#define DFT_STRUCT6 D_RPT6
#define DFT_STRUCT7 D_RPT7



//#define DFT_STRUCT( _name, ... ) \
//	__VA_ARGS__

#define DF_V( _param ) \
	_param

#define DF_VAR( _param ) \
	_param

typedef enum {
	#include <pdfapp.h> 
	max_index
} enum_index;


//----------------------------------------------------
/*
	\brief	Defince typu
*/
//----------------------------------------------------
/*
#define DF_FLT32( _name, _desc, _unit, \
	_prec, _scale, _access, _options, \
	_default, _min, _max, _step ) \
	float_t _name

#define DF_ENUM8( _name, _desc, _type, _default ) \
	tp_##_type _name

#define DF_ARRAY( _param, _count ) \
	_param##[_count ]

#define DF_V( _param ) \
	_param;

#define DF_STRUCT( _name, _desc, _type ) \
	tp_##_type _name

#define DFT_STRUCT( _name, __VA_ARGS__ ) \
	typedef struct _tp_##_name { \
		__VA_ARGS__ \
	} tp_##_name;

#include "pdfapp.h"
*/

//----------------------------------------------------
/*
	\brief	Zpristupneni popisovace typu
*/
//----------------------------------------------------
/*
#define DFT_ENUM8( _name, ... ) \
	extern const DATADESC_ENUM8 PCONST pp_##_name;

#include "pdfapp.h"
*/

//----------------------------------------------------
/*
	\brief	Zpristupneni narodnostni varianty
*/
//----------------------------------------------------
/*
#define RSP( _name, ... ) \
	extern const RSLNGDESC rstrln_##_name;

#define DF_LNG( _text ) \
	_text

#include "pdfapp.h"
*/


#endif // _PDEF_H_

