TextBinValue.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <kmdcodec.h>
00025
00026 #include <VCardTextBinValue.h>
00027 #include <VCardValue.h>
00028
00029 using namespace VCARD;
00030
00031 TextBinValue::TextBinValue()
00032 : Value()
00033 {
00034 }
00035
00036 TextBinValue::TextBinValue(const TextBinValue & x)
00037 : Value(x)
00038 {
00039 mIsBinary_ = x.mIsBinary_;
00040 mData_ = x.mData_;
00041 mUrl_ = x.mUrl_;
00042 }
00043
00044 TextBinValue::TextBinValue(const QCString & s)
00045 : Value(s)
00046 {
00047 }
00048
00049 TextBinValue &
00050 TextBinValue::operator = (TextBinValue & x)
00051 {
00052 if (*this == x) return *this;
00053
00054 mIsBinary_ = x.mIsBinary_;
00055 mData_ = x.mData_;
00056 mUrl_ = x.mUrl_;
00057
00058 Value::operator = (x);
00059 return *this;
00060 }
00061
00062 TextBinValue &
00063 TextBinValue::operator = (const QCString & s)
00064 {
00065 Value::operator = (s);
00066 return *this;
00067 }
00068
00069 bool
00070 TextBinValue::operator == (TextBinValue & x)
00071 {
00072 x.parse();
00073
00074 if ( mIsBinary_ != x.mIsBinary_ ) return false;
00075 if ( mData_ != x.mData_ ) return false;
00076 if ( mUrl_ != x.mUrl_ ) return false;
00077
00078 return true;
00079 }
00080
00081 TextBinValue::~TextBinValue()
00082 {
00083 }
00084
00085 TextBinValue *
00086 TextBinValue::clone()
00087 {
00088 return new TextBinValue( *this );
00089 }
00090
00091 void
00092 TextBinValue::_parse()
00093 {
00094 }
00095
00096 void
00097 TextBinValue::_assemble()
00098 {
00099 if ( mIsBinary_ ) {
00100 strRep_ = KCodecs::base64Encode( mData_ );
00101 } else
00102 strRep_ = mUrl_.utf8();
00103 }
00104
This file is part of the documentation for kdelibs Version 3.1.4.