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

FBwTimeField.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00006 //---------------------------------------------------------------------------
00007 
00008 #ifndef IbMTimeFieldH
00009 #define IbMTimeFieldH
00010 
00011 //---------------------------------------------------------------------------
00012 
00014 namespace fbwrap
00015 {
00016 
00017 // What are we using from standard libraries
00018 using std::string;
00019 
00021 class FBwTimeField : public FBwField
00022 {
00023     ISC_TIME svalue;
00024     FBwTime value;
00025 protected:
00026     virtual void bCopy(FBwField *fld)
00027     {
00028         value = fld->AsTime();
00029     }
00030     virtual int ByteSize()
00031     {
00032         return sizeof(svalue);
00033     }
00034     virtual void *GetPtr()
00035     {
00036         return &svalue;
00037     }
00038 public:
00039     FBwTimeField(string pname) :
00040             FBwField(pname,masf_time)
00041     {
00042     }
00043     FBwTimeField(const FBwTimeField &f)
00044             : FBwField(f)
00045     {
00046         value = f.value;
00047     }
00048     virtual void BindPtr(char  **p)
00049     {
00050         *p=(char  *)&svalue;
00051     }
00052     virtual void ConvertStoV();
00053     virtual void ConvertVtoS();
00054     virtual FBwTime AsTime() const
00055     {
00056         return value;
00057     }
00058     virtual void SetAsTime(const FBwTime &t)
00059     {
00060         value=t;
00061     }
00062     virtual string AsString();
00063     virtual void SetAsString(const string &s);
00064     std::ostream &DisplayText(std::ostream & o) const;
00065     FBwField *Clone() const
00066     {
00067         return new FBwTimeField(*this);
00068     }
00069     virtual ~FBwTimeField()
00070     {}
00071     virtual short GetLen()
00072     {
00073         return 8;
00074     }
00075 };
00076 
00077 //-------------------------------------------------------------------------
00078 }
00079 #endif

Generated on Fri Jan 31 08:30:02 2003 for fbwrap by doxygen1.2.17