| 66 | |
| 67 | |
| 68 | int |
| 69 | DatabaseStream::write(Vector &data) |
| 70 | { |
| 71 | if (descriptionDone == false) { |
| 72 | descriptionDone = true; |
| 73 | this->open(); |
| 74 | } |
| 75 | |
| 76 | int result = 0; |
| 77 | |
| 78 | if (data.Size() == numColumns) |
| 79 | if (theDatabase != 0) |
| 80 | result = theDatabase->insertData(tableName, columns, commitTag, data); |
| 81 | else { |
| 82 | opserr << "DatabaseStream::write() - database has not been set\n"; |
| 83 | return -1; |
| 84 | } |
| 85 | else { |
| 86 | opserr << "DatabaseStream::write() - Vector not of correct size or open() has not been called\n" << numColumns << " " << data.Size() << endln; |
| 87 | return -1; |
| 88 | } |
| 89 | |
| 90 | commitTag++; |
| 91 | |
| 92 | return result; |
| 93 | } |
| 94 | |
| 95 | |
| 96 | int |
nothing calls this directly
no test coverage detected