См. документацию.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 "ReadDir.h"
00029 #include <iostream>
00030
00031 ReadDir::ReadDir(Node* parent,string from, string to, IQType type, string id):TagIQ(parent,from, to, type, id,ReadDir_xmlns) {
00032 #ifdef debug_output
00033 std::cout<<"=======readdir constructor======"<<endl;
00034 #endif
00035
00036
00037
00038
00039 }
00040
00041 void ReadDir::setPath(string path){
00042 if(getType()==Get){
00043
00044
00045 Node* subNode=this->getKind(ReadDir_xmlns);
00046 Node* directory = new Node("directory",subNode,ReadDir_xmlnsDir);
00047 directory->setXMLBody(path);
00048 }
00049 }
00050
00051 string ReadDir::getPath(){
00052
00053 Node* subNode=this->getKind(ReadDir_xmlns);
00054 return subNode->getKind(ReadDir_xmlnsDir)->getXMLBody();
00055 }
00056
00057 void ReadDir::addFilename(string filename){
00058 if(getType()==Result){
00059 Node* subNode=this->getKind(ReadDir_xmlns);
00060 Node* fileNode = new Node("file",subNode);
00061 fileNode->setXMLBody(filename);
00062 }
00063 }
00064
00065 ReadDir::ReadDir(const Node &basedNode):TagIQ(basedNode){
00066 #ifdef debug_output
00067 cout<<"=======readdir constructor copy======"<<endl;
00068 #endif
00069 }
00070
00071 ReadDir::~ReadDir() {
00072
00073 }