XStations.cpp
上传用户:yokoluohf
上传日期:2013-02-25
资源大小:769k
文件大小:1k
- #include "stdafx.h"
- #include "XStations.h"
- XStations::XStations()
- {
- }
- XStations::~XStations()
- {
- }
- int XStations::Append (const XStation& obj)
- {
- (*this) [obj.name] = obj;
- return (int)size();
- }
- int XStations::Remove (const XStation& obj)
- {
- iterator pos;
- pos = find(obj.name);
- if (pos != end())
- erase (pos);
- return (int)size();
- }
- XStation* XStations::Find (const CString name)
- {
- if (name.IsEmpty() || name == "")
- return NULL;
- iterator pos;
- pos = find(name);
- if (pos != end())
- return & ((*this) [name]);
- else
- return NULL;
- }
- int XStations::GetCount ()
- {
- return (int) size ();
- }