property.h.bak
来自「网络socket,IO,线程池」· BAK 代码 · 共 62 行
BAK
62 行
#ifndef _M_PROPERTYSET_2004_7_13_ZHY_H
#define _M_PROPERTYSET_2004_7_13_ZHY_H
#pragma warning(disable:4786)
#include <vector>
#include <string>
#include <map>
using namespace std;
#include "Variant.h"
#include "../Stream/StreamBase.h"
using namespace Stream;
#include "../socket/UdpSocket.h"
using namespace NET;
#include "../socket/TcpSocket.h"
using namespace NET;
typedef multimap<string,CVariant> typeVariantMap;
class CProperty:public typeVariantMap
{
public:
typedef typeVariantMap::iterator iterator;
typedef typeVariantMap::const_iterator const_iterator;
CProperty():typeVariantMap(){}
CProperty(const CProperty& proper):typeVariantMap(proper){}
~CProperty();
string& Appen2String(string& str) const;
CProperty& Add(const string& strKey,int nValue);
CProperty& Add(const string& strKey,float fValue);
CProperty& Add(const string& strKey,const char* szString);
CProperty& Add(const string& strKey,const string& strString);
CProperty& Add(const string& strKey,const CProperty& property);
CProperty& Add(const string& strKey,const CTime& time);
size_t Remove(const string& strKey);
bool HasValue(const string& strKey);
bool HasValueByMulKey(const string& strKey);
// CVariant& get(const string& strKey) throw (MException);
const CVariant& get(const string& strKey) const throw (MException);
void get(const string& strKey,vector<CVariant>& vVariant) throw (MException);
// CVariant& getByMulKey(const string& strKey) throw (MException);
// const CVariant& getByMulKey(const string& strKey) const throw (MException);
// template<typename Socket>
// friend CNetStream<Socket>& operator << (CNetStream<Socket>& outStream,const CProperty& property);
friend void operator << (CNetStream& outStream,const CProperty& property);
friend void operator >> (CNetStream& inStream,CProperty& property);
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?