00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "pic14.h"
00022 #include "variable.h"
00023
00024 Variable::Variable( VariableType type, const QString & name )
00025 {
00026 m_type = type;
00027 m_name = name;
00028 }
00029
00030
00031 Variable::Variable()
00032 {
00033 m_type = invalidType;
00034 }
00035
00036
00037 Variable::~Variable()
00038 {
00039 }
00040
00041
00042 void Variable::setPortPinList( const PortPinList & portPinList )
00043 {
00044 m_portPinList = portPinList;
00045 }
00046
00047
00048 bool Variable::isReadable() const
00049 {
00050 switch (m_type)
00051 {
00052 case charType:
00053 case keypadType:
00054 return true;
00055 case sevenSegmentType:
00056 case invalidType:
00057 return false;
00058 }
00059
00060 return false;
00061 }
00062
00063
00064 bool Variable::isWritable() const
00065 {
00066 switch (m_type)
00067 {
00068 case charType:
00069 case sevenSegmentType:
00070 return true;
00071 case keypadType:
00072 case invalidType:
00073 return false;
00074 }
00075
00076 return false;
00077 }
00078
00079