int main(int argc, char* argv[]) { //for (int i = 0; i < argc; i++){ // cout << "argv[" << i << "] = " << argv[i] << endl; //} ArgumentsParser(argc, argv); }
/* static */const ArgumentsParser MakedictExecutor::getArgumentsParser() { std::unordered_map<std::string, OptionSpec> optionSpecs; optionSpecs["o"] = OptionSpec::keyValueOption("format", "2", "output format version: 2/4/combined"); optionSpecs["t"] = OptionSpec::keyValueOption("mode", "off", "code point table switch: on/off/auto"); const std::vector<ArgumentSpec> argumentSpecs = { ArgumentSpec::singleArgument("src_dict", "source dictionary file"), ArgumentSpec::singleArgument("dest_dict", "output dictionary file") }; return ArgumentsParser(std::move(optionSpecs), std::move(argumentSpecs)); }
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // // SOFTWARE. // // ================================================================================ // // ------------------------------------------------ // App.cpp // ------------------------------------------------ // Defines the entry point for the application. #include <ArgumentsParser.h> extern ArgumentsParser m_Parser = ArgumentsParser(); #include "Common.h" #include "RayTracerCS.h" typedef RayTracerCS RayTracer; // Global Variables HWND g_hWnd = NULL; // Main window RayTracer* g_pRayTracer = NULL; // RT application Scene* g_pScene = NULL; // Scene data // Functions int InitApp(); // Initialize raytracer application. int InitWindow(); // Initialize window properties. void UpdateWindowTitle(); // Update Window Title. template<class T> int Run( T* pApp ); // Message loop