| 3030 | } |
| 3031 | |
| 3032 | int OPS_save() |
| 3033 | { |
| 3034 | if (cmds == 0) return 0; |
| 3035 | // make sure at least one other argument to contain type of system |
| 3036 | if (OPS_GetNumRemainingInputArgs() < 1) { |
| 3037 | opserr << "WARNING save no commit tag - want save commitTag?"; |
| 3038 | return -1; |
| 3039 | } |
| 3040 | |
| 3041 | // check argv[1] for commitTag |
| 3042 | int commitTag; |
| 3043 | int numdata = 1; |
| 3044 | if (OPS_GetIntInput(&numdata, &commitTag) < 0) { |
| 3045 | opserr << "WARNING - save could not read commitTag " << endln; |
| 3046 | return -1; |
| 3047 | } |
| 3048 | |
| 3049 | FE_Datastore* theDatabase = cmds->getDatabase(); |
| 3050 | if (theDatabase == 0) { |
| 3051 | opserr << "WARNING: save - no database has been constructed\n"; |
| 3052 | return -1; |
| 3053 | } |
| 3054 | |
| 3055 | if (theDatabase->commitState(commitTag) < 0) { |
| 3056 | opserr << "WARNING - database failed to commitState \n"; |
| 3057 | return -1; |
| 3058 | } |
| 3059 | |
| 3060 | return 0; |
| 3061 | } |
| 3062 | |
| 3063 | int OPS_restore() |
| 3064 | { |
no test coverage detected