| 1 | //============================================================================ |
| 2 | // |
| 3 | // SSSS tt lll lll |
| 4 | // SS SS tt ll ll |
| 5 | // SS tttttt eeee ll ll aaaa |
| 6 | // SSSS tt ee ee ll ll aa |
| 7 | // SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator" |
| 8 | // SS SS tt ee ll ll aa aa |
| 9 | // SSSS ttt eeeee llll llll aaaaa |
| 10 | // |
| 11 | // Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony |
| 12 | // and the Stella Team |
| 13 | // |
| 14 | // See the file "License.txt" for information on usage and redistribution of |
| 15 | // this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 16 | //============================================================================ |
| 17 | |
| 18 | #ifndef OSYSTEM_UNIX_HXX |
| 19 | #define OSYSTEM_UNIX_HXX |
| 20 | |
| 21 | #include "OSystem.hxx" |
| 22 | |
| 23 | /** |
| 24 | This class defines an OSystem object for UNIX-like OS's (Linux). |
| 25 | It is responsible for completely implementing getBaseDirAndConfig(), |
| 26 | to set the base directory, config file location, and various other |
| 27 | save/load locations. |
| 28 | |
| 29 | @author Stephen Anthony |
| 30 | */ |
| 31 | class OSystemUNIX : public OSystem |
| 32 | { |
| 33 | public: |
| 34 | OSystemUNIX() = default; |
| 35 | virtual ~OSystemUNIX() = default; |
| 36 | |
| 37 | /** |
| 38 | Determine the base directory and main configuration file from the |
| 39 | derived class. It can also use hints, as described below. |
| 40 | |
| 41 | @param basedir The base directory for all configuration files |
| 42 | @param cfgfile The fully qualified pathname of the config file |
| 43 | (including the base directory) |
| 44 | @param savedir The default directory to save various other files |
| 45 | @param loaddir The default directory to load various other files |
| 46 | @param useappdir A hint that the base dir should be set to the |
| 47 | app directory; not all ports can do this, so |
| 48 | they are free to ignore it |
| 49 | @param usedir A hint that the base dir should be set to this |
| 50 | parameter; not all ports can do this, so |
| 51 | they are free to ignore it |
| 52 | */ |
| 53 | void getBaseDirAndConfig(string& basedir, string& cfgfile, |
| 54 | string& savedir, string& loaddir, |
| 55 | bool useappdir, const string& usedir) override; |
| 56 | |
| 57 | private: |
| 58 | // Following constructors and assignment operators not supported |
| 59 | OSystemUNIX(const OSystemUNIX&) = delete; |
| 60 | OSystemUNIX(OSystemUNIX&&) = delete; |
| 61 | OSystemUNIX& operator=(const OSystemUNIX&) = delete; |
| 62 | OSystemUNIX& operator=(OSystemUNIX&&) = delete; |
| 63 | }; |
| 64 | |
| 65 | #endif |
| 66 | |