⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stdincpp.h

📁 网络流量采集及分析软件
💻 H
字号:
/*!\file stdincpp.h    Copyright 2003-2004 Fraunhofer Institute for Open Communication Systems (FOKUS),                        Berlin, Germany    This file is part of Network Measurement and Accounting System (NETMATE).    NETMATE 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.    NETMATE 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 software; if not, write to the Free Software     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA     Description:    Include this file (stdincpp) in every .h file.\n    This .h file includes all the C++ standard include    files such as  map, string and others    $Id: stdincpp.h,v 1.2 2006/07/06 03:20:48 s_zander Exp $*/#ifndef __STDINCPP_H#define __STDINCPP_Hextern "C" {#include "stdinc.h"}#include <iostream>#include <fstream>#include <sstream>#include <string>#include <vector>#include <deque>#include <map>#include <multimap.h>#include <hash_map.h>#include <ext/hash_map>#include <list>#include <algorithm>#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 0))#include <locale>#endif#include <cctype>#include <memory>#include <set>#include <bitset>#include <iomanip.h>#include <streambuf.h>using namespace std;// definition of 'safeDelete' and 'safeDeleteArr' as // a safer replacement for delete and delete []// Put an assert to check if x is NULL, this is to catch// program "logic" errors early. Even though delete works // fine with NULL by using assert you are actually catching // "bad code" very early// Defining saveDelete using templatestemplate <class T>inline void saveDelete(T& x) {     assert(x != NULL);     delete x;     x = NULL;}template <class T*>inline void saveDelete(T*& x) {     assert(x != NULL);     delete x;     x = NULL;}// For delete array template <class T>inline void saveDeleteArr(T& x) {     assert(x != NULL);     delete [] x;     x = NULL;}// tolower (string)#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 0))struct ToLower {     private:    std::locale loc;  public:    ToLower ()         : loc(std::locale("C")) {;}        char operator() (char c)  { return std::tolower(c,loc); } };#else struct ToLower {    ToLower () {;}    char operator() (char c)  { return std::tolower(c); }  private:  };#endif#endif // __STDINCPP_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -