/*****************************************************************************
 * $LastChangedDate: 2009-11-22 22:39:11 -0500 (Sun, 22 Nov 2009) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Functions that extend ConfBin.
 *//*
 * LEGAL:   COPYRIGHT (C) 2008 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef GLUE_CONF_BIN_EXT_HH
#define GLUE_CONF_BIN_EXT_HH 1

#include "base/conf_bin.hh"
using namespace base;
#include "math/module.hh"
#include "math/matrix.hh"
using namespace math;

namespace glue {

// glue/conf.hh has GetConfDirectoryName()

ConfBin&
GetConfBin( void );  // binary .cfg

bool
ReadConfBin( ConfBin& confBin, const string& key, fp& out );

INLINE bool
ReadConfBin( ConfBin& confBin, const string& key, double& out )
{
    return confBin.Read( key, out );
}

bool
ReadConfBin( ConfBin& confBin, const string& key, Vector3& v );

bool
ReadConfBin( ConfBin& confBin, const string& key, Matrix& matrix /*OUT*/ );

INLINE bool
WriteConfBin( ConfBin& confBin, const string& key, const fp& in )
{
    return confBin.Write( key, in );
}

bool
WriteConfBin( ConfBin& confBin, const string& key, const Vector3& v );

bool
WriteConfBin( ConfBin& confBin, const string& key, const Matrix& matrix );

} // namespace glue

#endif // GLUE_CONF_BIN_EXT_HH
