Annotation of nono/lib/mainapp.h, revision 1.1.1.2

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2018 [email protected]
                      4: //
                      5: 
                      6: #pragma once
                      7: 
1.1.1.2 ! root        8: #include "config.h"
1.1       root        9: #include "debugger.h"
                     10: #include "logger.h"
1.1.1.2 ! root       11: #include "vm_luna.h"
        !            12: #include "vm_x68k.h"
1.1       root       13: 
1.1.1.2 ! root       14: // 起動時の引数処理などを行う。
        !            15: class MainApp
1.1       root       16: {
1.1.1.2 ! root       17:  public:
        !            18:        // 初期化
        !            19:        bool Init(bool is_cli_, int ac, char *av[]);
1.1       root       20: 
1.1.1.2 ! root       21:        // VM 実行開始
        !            22:        bool Start();
1.1       root       23: 
1.1.1.2 ! root       24:        std::string SearchFile(const std::string& name) const;
        !            25: 
        !            26:        // vmtype (VMTYPE_*) を返す。
        !            27:        // (Config が持っているのは文字列)
        !            28:        vmtype_t GetVMType() const { return vmtype; }
        !            29: 
        !            30:  public:
        !            31:        // -A: ホストファイル名 (とりあえず)
        !            32:        const char *host_file = NULL;
        !            33: 
        !            34:        // -b: ブレークポイント
        !            35:        uint32 debug_breakaddr = 0;
        !            36: 
        !            37:        // -B: ベンチマークモード
        !            38:        int benchmark_mode = 0;
        !            39: 
        !            40:        // -c: VM ディレクトリ
        !            41:        std::string vmdir {};
        !            42:        const std::string& GetVMDir() const { return vmdir; }
        !            43: 
        !            44:        // -C: ログをコンソールに出力
        !            45:        bool log_to_console = false;
        !            46: 
        !            47:        // -d: 起動時にデバッガで停止
        !            48:        bool debug_on_start = false;
        !            49: 
        !            50:        // -D: コンソールをデバッガで使う
        !            51:        bool debug_on_console = false;
        !            52: 
        !            53:        // -f: 高速モード (XXX 設定ファイルと含めて見直すこと)
        !            54:        bool fast_mode = false;
        !            55: 
        !            56:        // --fontsize: フォントサイズ指定値 (値は fontsize_t ではない)
        !            57:        int  fontsize = 0;
        !            58: 
        !            59:        // -L: ログ指定文字列
        !            60:        char logopt[256] {};
        !            61: 
        !            62:        // -M: モニタ名
        !            63:        std::string monitor_opt {};
        !            64: 
        !            65:        // -s,--scale: 画面スケール
        !            66:        double screen_scale = 0.0;
        !            67: 
        !            68:        // --show-config: 設定内容を表示
        !            69:        bool show_config {};
        !            70: 
        !            71:        // -V: パラメータ指定
        !            72:        std::vector<std::string> config_options;
        !            73: 
        !            74:        // -X: Human68k 実行ファイル名と引数
        !            75:        const char *human68k_file = NULL;
        !            76:        char human68k_arg[256] {};
        !            77: 
        !            78:  private:
        !            79:        // ヘルプメッセージを表示する
        !            80:        void ShowHelp(bool all) const;
        !            81: 
        !            82:        // バージョンを表示する
        !            83:        void ShowVersion() const;
        !            84: 
        !            85:        // 引数を処理する
        !            86:        bool ParseOpt(int ac, char *av[]);
        !            87: 
        !            88:        // -L オプションを処理する
        !            89:        bool ParseLogopt();
        !            90: 
        !            91:        // CLI/GUI 区別
        !            92:        bool IsCLI() const { return  is_cli; }
        !            93:        bool IsGUI() const { return !is_cli; }
        !            94:        bool is_cli;
        !            95: 
        !            96:        // VM 種別
        !            97:        vmtype_t vmtype {};
        !            98: };
        !            99: 
        !           100: // グローバルインスタンス
        !           101: extern MainApp gMainApp;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.