📄 property.h.bak
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -