/*
 * The UDS Collection
 * Copyright (C) 2000, 2001  Julian v. Bock
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *	(See file COPYING for more information)
 */

#ifndef _uds_uds_hh
#define _uds_uds_hh


namespace uds
{

typedef unsigned char uds_flags_t;
extern uds_flags_t flags;

enum
{
	/// search for memory leaks. this flag can not be changed at runtime.
	leak_check			= 0x1,	
	/// force core dumps when an uds exception is thrown
	force_core_dumps	= 0x2,	
	/// create zombie objects
	summon_zombies		= 0x4,	
	/// log memory (de)allocations
	log_allocs			= 0x8,	
	/// rename uds core dumps
	rename_cores		= 0x10,	
	/// generate always a backtrace when an uds exception is thrown
	std_backtraces		= 0x20	
};


class Version_t
{
public:
	/// major version number
	unsigned	vmaj;
	/// minor version number
	unsigned	vmin;
	/// patch level
	unsigned	vpat;
	
	Version_t( const char* v );
	Version_t( unsigned _vmaj, unsigned _vmin, unsigned _vpat );
	
	bool
	operator < ( const Version_t& rhs );
};

/** \return the current version */
Version_t
Version();

}

#endif // _uds_sentinel_hh
