| 59 | \*---------------------------------------------------------------------------*/ |
| 60 | |
| 61 | class abort |
| 62 | : |
| 63 | public functionObject |
| 64 | { |
| 65 | public: |
| 66 | |
| 67 | // Public data |
| 68 | |
| 69 | //- Enumeration defining the type of action |
| 70 | enum actionType |
| 71 | { |
| 72 | noWriteNow, //!< stop immediately without writing data |
| 73 | writeNow, //!< write data and stop immediately |
| 74 | nextWrite //!< stop the next time data are written |
| 75 | }; |
| 76 | |
| 77 | private: |
| 78 | |
| 79 | // Private data |
| 80 | |
| 81 | //- Reference to the Time |
| 82 | const Time& time_; |
| 83 | |
| 84 | //- The fully-qualified name of the abort file |
| 85 | fileName abortFile_; |
| 86 | |
| 87 | //- Action type names |
| 88 | static const NamedEnum<actionType, 3> actionTypeNames_; |
| 89 | |
| 90 | //- The type of action |
| 91 | actionType action_; |
| 92 | |
| 93 | |
| 94 | // Private Member Functions |
| 95 | |
| 96 | //- Remove abort file. |
| 97 | void removeFile() const; |
| 98 | |
| 99 | //- Disallow default bitwise copy construct |
| 100 | abort(const abort&); |
| 101 | |
| 102 | //- Disallow default bitwise assignment |
| 103 | void operator=(const abort&); |
| 104 | |
| 105 | |
| 106 | public: |
| 107 | |
| 108 | //- Runtime type information |
| 109 | TypeName("abort"); |
| 110 | |
| 111 | |
| 112 | // Constructors |
| 113 | |
| 114 | //- Construct from Time and dictionary |
| 115 | abort |
| 116 | ( |
| 117 | const word& name, |
| 118 | const Time& runTime, |
no outgoing calls
no test coverage detected