00001
00002
00003
00004 #if !defined(phone_h)
00005 #define phone_h
00006 #include <string>
00007
00008 using namespace std;
00009
00010
00011
00012
00013 #include "field.h"
00014
00015
00016 class phone : public field
00017 {
00018 public:
00019 phone();
00020 ~phone();
00021 phone(const phone& p);
00022 const phone& operator=(const phone& rhs);
00023 bool operator<(const phone& rhs);
00024 bool operator==(const phone & rhs);
00025
00026 public:
00027 inline string getArea() const
00028 {
00029 return m_area;
00030 }
00031
00032 inline string getPrefix() const
00033 {
00034 return m_prefix;
00035 }
00036
00037 inline string getSuffix() const
00038 {
00039 return m_suffix;
00040 }
00041
00042 inline void setArea(const string& a)
00043 {
00044 m_area = a;
00045 }
00046
00047 inline void setPrefix(const string& p)
00048 {
00049 m_prefix = p;
00050 }
00051
00052 inline void setSuffix(const string& s)
00053 {
00054 m_suffix = s;
00055 }
00056
00057 string ToParse(int fld);
00058 string ToString();
00059 string ToFileFmt();
00060
00061 protected:
00062 void copy(const phone& p);
00063
00064
00065
00066
00067 string m_area;
00068
00069
00070
00071 string m_prefix;
00072
00073
00074
00075 string m_suffix;
00076
00077 private:
00078
00079
00080 };
00081
00082 #endif