1*9f73e17bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*9f73e17bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*9f73e17bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*9f73e17bSAndrew Rist * distributed with this work for additional information 6*9f73e17bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*9f73e17bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*9f73e17bSAndrew Rist * "License"); you may not use this file except in compliance 9*9f73e17bSAndrew Rist * with the License. You may obtain a copy of the License at 10*9f73e17bSAndrew Rist * 11*9f73e17bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*9f73e17bSAndrew Rist * 13*9f73e17bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*9f73e17bSAndrew Rist * software distributed under the License is distributed on an 15*9f73e17bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*9f73e17bSAndrew Rist * KIND, either express or implied. See the License for the 17*9f73e17bSAndrew Rist * specific language governing permissions and limitations 18*9f73e17bSAndrew Rist * under the License. 19*9f73e17bSAndrew Rist * 20*9f73e17bSAndrew Rist *************************************************************/ 21*9f73e17bSAndrew Rist 22*9f73e17bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include <codemaker/options.hxx> 25cdf0e10cSrcweir 26cdf0e10cSrcweir using namespace rtl; 27cdf0e10cSrcweir Options()28cdf0e10cSrcweirOptions::Options() 29cdf0e10cSrcweir { 30cdf0e10cSrcweir } 31cdf0e10cSrcweir ~Options()32cdf0e10cSrcweirOptions::~Options() 33cdf0e10cSrcweir { 34cdf0e10cSrcweir 35cdf0e10cSrcweir } 36cdf0e10cSrcweir getProgramName() const37cdf0e10cSrcweirconst OString& Options::getProgramName() const 38cdf0e10cSrcweir { 39cdf0e10cSrcweir return m_program; 40cdf0e10cSrcweir } 41cdf0e10cSrcweir isValid(const OString & option)42cdf0e10cSrcweirsal_Bool Options::isValid(const OString& option) 43cdf0e10cSrcweir { 44cdf0e10cSrcweir return (m_options.count(option) > 0); 45cdf0e10cSrcweir } 46cdf0e10cSrcweir getOption(const OString & option)47cdf0e10cSrcweirconst OString Options::getOption(const OString& option) 48cdf0e10cSrcweir throw( IllegalArgument ) 49cdf0e10cSrcweir { 50cdf0e10cSrcweir if (m_options.count(option) > 0) 51cdf0e10cSrcweir { 52cdf0e10cSrcweir return m_options[option]; 53cdf0e10cSrcweir } else 54cdf0e10cSrcweir { 55cdf0e10cSrcweir throw IllegalArgument("Option is not valid or currently not set."); 56cdf0e10cSrcweir } 57cdf0e10cSrcweir } 58cdf0e10cSrcweir getInputFiles()59cdf0e10cSrcweirconst StringVector& Options::getInputFiles() 60cdf0e10cSrcweir { 61cdf0e10cSrcweir return m_inputFiles; 62cdf0e10cSrcweir } 63cdf0e10cSrcweir 64