| 1 |
// $Id: b_command.cpp,v 1.5 2003/03/02 04:12:45 fukasawa Exp $ |
| 2 |
|
| 3 |
//============================================================================= |
| 4 |
/** |
| 5 |
* @file b_command.cpp |
| 6 |
* |
| 7 |
* @author Fukasawa Mitsuo |
| 8 |
* |
| 9 |
* |
| 10 |
* Copyright (C) 2001-2004 BEE Co.,Ltd. All rights reserved. |
| 11 |
* |
| 12 |
* This program is free software; you can redistribute it and/or |
| 13 |
* modify it under the terms of the GNU General Public License |
| 14 |
* as published by the Free Software Foundation; either version 2 |
| 15 |
* of the License, or (at your option) any later version. |
| 16 |
* |
| 17 |
* This program is distributed in the hope that it will be useful, |
| 18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
* GNU General Public License for more details. |
| 21 |
* |
| 22 |
* You should have received a copy of the GNU General Public License |
| 23 |
* along with this program; if not, write to the Free Software |
| 24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 25 |
*/ |
| 26 |
//============================================================================= |
| 27 |
|
| 28 |
#define BEE_BUILD_DLL |
| 29 |
|
| 30 |
#include "b_command.h" |
| 31 |
|
| 32 |
//----------------------------------------------------------------------------- |
| 33 |
// Get parameter value by name. |
| 34 |
//----------------------------------------------------------------------------- |
| 35 |
bool b_command::getValue(const string& parname, b_value& retval) |
| 36 |
{ |
| 37 |
for (size_t i = 0; i < m_params.size(); i++) |
| 38 |
{ |
| 39 |
if (m_params[i].m_pname == parname) |
| 40 |
{ // found the parameter |
| 41 |
retval = m_params[i].m_pval; |
| 42 |
return true; |
| 43 |
} |
| 44 |
} |
| 45 |
return false; |
| 46 |
} |
| 47 |
|