Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

phone.h

Go to the documentation of this file.
00001 // phone.h
00002 //
00003 
00004 #if !defined(phone_h)
00005 #define phone_h
00006 #include <string>
00007 
00008 using namespace std;
00009 /*
00010  * This maintains all the information for a phone number.
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      * The area code.
00066      */
00067     string  m_area;
00068     /*
00069      * The prefix part of the phone number.
00070      */
00071     string  m_prefix;
00072     /*
00073      * The suffix for the phone number
00074      */
00075     string  m_suffix;
00076 
00077 private:
00078 
00079 
00080 };
00081 
00082 #endif /* phone_h */

Generated on Mon Oct 22 20:18:45 2001 for University People Management System by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001