00001 /************************************************************************* 00002 * 00003 * The Contents of this file are made available subject to 00004 * the terms of GNU Lesser General Public License Version 2.1. 00005 * 00006 * 00007 * GNU Lesser General Public License Version 2.1 00008 * ============================================= 00009 * Copyright 2005 by Kohei Yoshida. 00010 * 1039 Kingsway Dr., Apex, NC 27502, USA 00011 * 00012 * This library is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU Lesser General Public 00014 * License version 2.1, as published by the Free Software Foundation. 00015 * 00016 * This library is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this library; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00024 * MA 02111-1307 USA 00025 * 00026 ************************************************************************/ 00027 00028 #include "option.hxx" 00029 00030 namespace scsolver { 00031 00036 struct OptionDataImpl 00037 { 00038 OptionDataImpl() : 00039 VarPositive(true), 00040 VarInteger(false), 00041 ModelType(OPTMODELTYPE_LP) 00042 { 00043 } 00044 00045 ~OptionDataImpl() throw() {} 00046 00047 bool VarPositive:1; 00048 bool VarInteger:1; 00049 OptModelType ModelType; 00050 }; 00051 00052 //----------------------------------------------------------------- 00053 00054 OptionData::OptionData() : m_pImpl( new OptionDataImpl ) 00055 { 00056 } 00057 00058 OptionData::~OptionData() throw() 00059 { 00060 } 00061 00062 void OptionData::setVarPositive( bool b ) 00063 { 00064 m_pImpl->VarPositive = b; 00065 } 00066 00067 bool OptionData::getVarPositive() const 00068 { 00069 return m_pImpl->VarPositive; 00070 } 00071 00072 void OptionData::setVarInteger( bool b ) 00073 { 00074 m_pImpl->VarInteger = b; 00075 } 00076 00077 bool OptionData::getVarInteger() const 00078 { 00079 return m_pImpl->VarInteger; 00080 } 00081 00082 void OptionData::setModelType( OptModelType type ) 00083 { 00084 m_pImpl->ModelType = type; 00085 } 00086 00087 OptModelType OptionData::getModelType() const 00088 { 00089 return m_pImpl->ModelType; 00090 } 00091 00092 }
1.5.3