00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "brisaargument.h"
00029
00030 using namespace BrisaUpnp;
00031
00032 BrisaArgument::BrisaArgument(const QString &name, const QString &direction,
00033 const QString &relatedStateVariable) :
00034 name(name), direction(direction),
00035 relatedStateVariable(relatedStateVariable) {
00036 }
00037
00038 void BrisaArgument::setAttribute(xmlArgument key, const QString &value) {
00039 switch (key) {
00040 case ArgumentName:
00041 this->name = value;
00042 break;
00043 case Direction:
00044 this->direction = value;
00045 break;
00046 case RelatedStateVariable:
00047 this->relatedStateVariable = value;
00048 break;
00049 }
00050 }
00051
00052 QString BrisaArgument::getAttribute(xmlArgument key) const {
00053 switch (key) {
00054 case ArgumentName:
00055 return this->name;
00056 break;
00057 case Direction:
00058 return this->direction;
00059 break;
00060 case RelatedStateVariable:
00061 return this->relatedStateVariable;
00062 break;
00063 default:
00064 return QString();
00065 break;
00066 }
00067 }
00068
00069 void BrisaArgument::clear() {
00070 this->name.clear();
00071 this->direction.clear();
00072 this->relatedStateVariable.clear();
00073 }
00074