File indexing completed on 2024-04-14 05:36:27
0001 /*************************************************************************** 0002 * Copyright (C) 2004-2005 by Daniel Clarke daniel.jc@gmail.com * 0003 * Copyright (C) 2005 by David Saxton * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 0019 ***************************************************************************/ 0020 0021 #include "pic14.h" 0022 #include "variable.h" 0023 0024 Variable::Variable( VariableType type, const QString & name ) 0025 { 0026 m_type = type; 0027 m_name = name; 0028 } 0029 0030 0031 Variable::Variable() 0032 { 0033 m_type = invalidType; 0034 } 0035 0036 0037 Variable::~Variable() 0038 { 0039 } 0040 0041 0042 void Variable::setPortPinList( const PortPinList & portPinList ) 0043 { 0044 m_portPinList = portPinList; 0045 } 0046 0047 0048 bool Variable::isReadable() const 0049 { 0050 switch (m_type) 0051 { 0052 case charType: 0053 case keypadType: 0054 return true; 0055 case sevenSegmentType: 0056 case invalidType: 0057 return false; 0058 } 0059 0060 return false; 0061 } 0062 0063 0064 bool Variable::isWritable() const 0065 { 0066 switch (m_type) 0067 { 0068 case charType: 0069 case sevenSegmentType: 0070 return true; 0071 case keypadType: 0072 case invalidType: 0073 return false; 0074 } 0075 0076 return false; 0077 } 0078 0079