38 FileList::FileList() {
56 FileList::FileList(std::istream &in) {
71 istm.open(listFile.
toString().toLatin1().data(), std::ios::in);
86 QString msg =
"File [" + listFile.
toString() +
"] contains no data";
102 void FileList::read(std::istream &in) {
106 bool bHasQuotes =
false;
108 in.getline(buf, 65536);
109 bool isComment =
false;
112 string::size_type loc = s.find(
"\"", 0);
114 if (loc != string::npos) {
126 if(strlen(buf) == 0) {
127 in.getline(buf, 65536);
130 for (
int index = 0; index < (int)strlen(buf); index++) {
131 if (buf[index] ==
'#' || (buf[index] ==
'/' && buf[index+1] ==
'/')) {
135 else if(buf[index] ==
' ') {
144 in.getline(buf, 65536);
150 s = s.
Token(
" \n\r\t\v");
153 s = s.
Token(
" \n\r\t\v,");
156 this->push_back(s.
ToQt());
157 in.getline(buf, 65536);
160 if (this->size() == 0) {
161 string msg =
"Input Stream Empty";
178 ostm.open(outputFileList.
toString().toLatin1().data(), std::ios::out);
197 void FileList::write(std::ostream &out) {
198 for (
int i = 0; i < this->size(); i++) {
199 out << (*this)[i].toString() << endl;
File name manipulation and expansion.
Namespace for the standard library.
IString TrimHead(const std::string &chars)
Trims The input characters from the beginning of the object IString.
IString Token(const IString &separator)
Returns the first token in the IString.
#define _FILEINFO_
Macro for the filename and line number.
QString ToQt() const
Retuns the object string as a QString.
QString toString() const
Returns a QString of the full file name including the file path, excluding the attributes with any Is...
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.
QString FileOpen(const QString &filename)
This error should be used when a file could not be opened.
IString TrimTail(const std::string &chars)
Trims the input characters from the end of the object IString.