1 #include <SimanIO_Document.hxx>
5 SimanIO_Document::SimanIO_Document()
9 void SimanIO_Document::SetName(const char* theName)
14 const char* SimanIO_Document::Name() const
16 return myName.c_str();
19 void SimanIO_Document::AddFile(const bool isResult, const char* theURL,
20 const AutomaticProcessing theProc, const FileState theState)
22 SimanIO_File aFile = {theURL, isResult, theProc, theState};
26 void SimanIO_Document::AddFile(const SimanIO_File& theFile)
28 myFiles.push_back(theFile);
31 const SimanIO_File& SimanIO_Document::File(const int theId) const
33 DocumentFiles::const_iterator aFIter = myFiles.begin();
34 for(; aFIter != myFiles.end(); aFIter++) {
35 if (aFIter->id == theId)
38 static SimanIO_File anEmpty;
42 //////////////////////////// Iterator methods /////////////////////////
43 SimanIO_Document::FilesIterator::FilesIterator(/*const*/ SimanIO_Document& theDocument)
45 myIter = theDocument.myFiles.begin();
46 myEnd = theDocument.myFiles.end();
49 void SimanIO_Document::FilesIterator::Next()
54 bool SimanIO_Document::FilesIterator::More()
56 return myIter != myEnd;
58 const bool SimanIO_Document::FilesIterator::IsResult()
60 return myIter->result;
63 const char* SimanIO_Document::FilesIterator::URL()
65 return myIter->url.c_str();
68 void SimanIO_Document::FilesIterator::SetURL(const char* theURL)
71 //myIter->url(theURL);
72 //std::string test = "abc";
76 const AutomaticProcessing SimanIO_Document::FilesIterator::GetProcessing()
81 const FileState SimanIO_Document::FilesIterator::GetState()
86 const int SimanIO_Document::FilesIterator::Id()