www.pudn.com > 20065291434354190.rar > XStations.cpp
#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 ();
}