From f4b191f0ea396b58465bfba40749977780a3af58 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 11 Feb 2009 05:29:41 +0000 Subject: Just removing some things that are cluttering up the source tree. --- src/old/confpair.h | 81 ------------------------------------------------------ 1 file changed, 81 deletions(-) delete mode 100644 src/old/confpair.h (limited to 'src/old/confpair.h') diff --git a/src/old/confpair.h b/src/old/confpair.h deleted file mode 100644 index 56eb06e..0000000 --- a/src/old/confpair.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef CONF_PAIR_H -#define CONF_PAIR_H - -#include -#include -#include -#include "confpairbase.h" - -/** - * - */ -template -class ConfPair : public ConfPairBase -{ -public: - ConfPair( const std::string &sName ) : - sName( sName ) - { } - - virtual ~ConfPair() - { } - - T &value() - { - return tValue; - } - - const std::string &name() - { - return sName; - } - - virtual void setFromString( const std::string &sStr ) - { - std::stringstream(sStr) >> tValue; - } - - virtual std::string getAsString() - { - std::stringstream tmp; - tmp << tValue; - return tmp.str(); - } - -private: - std::string sName; - T tValue; -}; - -template<> -void ConfPair::setFromString( const std::string &sStr ) -{ - tValue = sStr; -} - -template<> -std::string ConfPair::getAsString() -{ - return tValue; -} - -template<> -void ConfPair::setFromString( const std::string &sStr ) -{ - if( !strcasecmp( sStr.c_str(), "true" ) || - !strcasecmp( sStr.c_str(), "yes" ) || - !strcasecmp( sStr.c_str(), "on" ) ) - tValue = true; - else - tValue = false; -} - -template<> -std::string ConfPair::getAsString() -{ - if( tValue == true ) - return "True"; - return "False"; -} - -#endif -- cgit v1.2.3