kabc Library: Param.cpp Source File (kabc Library)

| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# Param.cpp

    00001 /*
    00002     libvcard - vCard parsing library for vCard version 3.0
    00003
    00004     Copyright (C) 1998 Rik Hemsley rik@kde.org
    00005
    00006   Permission is hereby granted, free of charge, to any person obtaining a copy
    00007   of this software and associated documentation files (the "Software"), to
    00008   deal in the Software without restriction, including without limitation the
    00009   rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    00010   sell copies of the Software, and to permit persons to whom the Software is
    00011   furnished to do so, subject to the following conditions:
    00012
    00013   The above copyright notice and this permission notice shall be included in
    00014   all copies or substantial portions of the Software.
    00015
    00016   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    00017   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00018   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
    00019   AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
    00020   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
    00021   WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    00022 */
    00023
    00024 #include <VCardParam.h>
    00025
    00026 #include <VCardEntity.h>
    00027
    00028 #include <VCardRToken.h>
    00029
    00030 using namespace VCARD;
    00031
    00032 Param::Param()
    00033     :   Entity(),
    00034         name_(""),
    00035         value_("")
    00036 {
    00037 }
    00038
    00039 Param::Param(const Param & x)
    00040     :   Entity(x),
    00041         name_(x.name_),
    00042         value_(x.value_)
    00043 {
    00044 }
    00045
    00046 Param::Param(const QCString & s)
    00047     :   Entity(s),
    00048         name_(""),
    00049         value_("")
    00050 {
    00051 }
    00052
    00053     Param &
    00054 Param::operator = (Param & x)
    00055 {
    00056     if (*this == x) return *this;
    00057
    00058     Entity::operator = (x);
    00059         name_ = x.name_;
    00060         value_ = x.value_;
    00061
    00062     return *this;
    00063 }
    00064
    00065     Param &
    00066 Param::operator = (const QCString & s)
    00067 {
    00068     Entity::operator = (s);
    00069     return *this;
    00070 }
    00071
    00072     bool
    00073 Param::operator == (Param & x)
    00074 {
    00075     x.parse();
    00076     return false;
    00077 }
    00078
    00079 Param::~Param()
    00080 {
    00081 }
    00082
    00083     void
    00084 Param::_parse()
    00085 {
    00086 }
    00087
    00088     void
    00089 Param::_assemble()
    00090 {
    00091     strRep_ = name_ + "=" + value_;
    00092 }
    00093
    00094 Param::Param(const QCString &name, const QCString &value)
    00095     :   Entity(),
    00096         name_(name),
    00097         value_(value)
    00098 {
    00099     parsed_ = true;
    00100     assembled_ = false;
    00101 }
    00102
    00103     void
    00104 Param::setName(const QCString & name)
    00105 {
    00106     name_ = name;
    00107
    00108         assembled_ = false;
    00109 }
    00110
    00111     void
    00112 Param::setValue(const QCString & value)
    00113 {
    00114     value_ = value;
    00115
    00116         assembled_ = false;
    00117 }
    00118
    00119     QCString
    00120 Param::name()
    00121 {
    00122     return name_;
    00123 }
    00124
    00125     QCString
    00126 Param::value()
    00127 {
    00128     return value_;
    00129 }

This file is part of the documentation for kabc Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:31:30 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003