Do not globally use namespace std.

This commit is contained in:
lotodore
2007-05-22 22:40:44 +00:00
parent 5744980d36
commit b83c86d887
2 changed files with 18 additions and 18 deletions
+10
View File
@@ -28,6 +28,16 @@
#include <direct.h> #include <direct.h>
#endif #endif
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <fstream>
#include <sys/types.h>
#include <sys/stat.h>
using namespace std;
class QtToolsWrapper; class QtToolsWrapper;
+8 -18
View File
@@ -21,41 +21,31 @@
#define CONFIGFILE_H #define CONFIGFILE_H
#include "tinyxml.h" #include "tinyxml.h"
#include <string>
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <fstream>
#include <vector> #include <vector>
#include <string>
#include <sys/types.h>
#include <sys/stat.h>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
using namespace std;
enum ConfigState { NONEXISTING, OLD }; enum ConfigState { NONEXISTING, OLD };
enum ConfigType { CONFIG_TYPE_INT, CONFIG_TYPE_STRING }; enum ConfigType { CONFIG_TYPE_INT, CONFIG_TYPE_STRING };
class ConfigFile{ class ConfigFile{
public: public:
ConfigFile(int, char **); ConfigFile(int, char **);
~ConfigFile(); ~ConfigFile();
void fillBuffer(); void fillBuffer();
void updateConfig(ConfigState); void updateConfig(ConfigState);
std::string readConfigString(std::string varName); std::string readConfigString(std::string varName);
void writeConfigString(std::string varName, std::string varCont); void writeConfigString(std::string varName, std::string varCont);
int readConfigInt(std::string varName); int readConfigInt(std::string varName);
void writeConfigInt(std::string varName, int varCont); void writeConfigInt(std::string varName, int varCont);
private: private:
@@ -68,8 +58,8 @@ private:
std::string defaultValue; std::string defaultValue;
}; };
vector<ConfigInfo> configList; std::vector<ConfigInfo> configList;
vector<ConfigInfo> configBufferList; std::vector<ConfigInfo> configBufferList;
std::string configFileName; std::string configFileName;
std::string logDir; std::string logDir;