diff options
Diffstat (limited to 'src/devices/pic/base/pic_config.cpp')
-rw-r--r-- | src/devices/pic/base/pic_config.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/devices/pic/base/pic_config.cpp b/src/devices/pic/base/pic_config.cpp index 811a38e..6e59d90 100644 --- a/src/devices/pic/base/pic_config.cpp +++ b/src/devices/pic/base/pic_config.cpp @@ -280,30 +280,30 @@ const Pic::Config::Data Pic::Config::DATA[] = { { { 0, 0 }, Fixed, { { 0, 0 } } } }; -TQMap<TQString, Pic::Config::MapData> *Pic::Config::_tqmasks = 0; -TQMap<TQString, Pic::Config::MapData> &Pic::Config::tqmasks() +TQMap<TQString, Pic::Config::MapData> *Pic::Config::_masks = 0; +TQMap<TQString, Pic::Config::MapData> &Pic::Config::masks() { - if ( _tqmasks==0 ) { - _tqmasks = new TQMap<TQString, MapData>; + if ( _masks==0 ) { + _masks = new TQMap<TQString, MapData>; for (uint i=0; DATA[i].tqmask.name; i++) { - (*_tqmasks)[DATA[i].tqmask.name] = MapData(i, -1); + (*_masks)[DATA[i].tqmask.name] = MapData(i, -1); if ( DATA[i].type==MemoryRange ) { for (uint k=0; k<Protection::MAX_NB_BLOCKS; k++) - (*_tqmasks)[TQString("%1_%2").tqarg(DATA[i].tqmask.name).tqarg(k)] = MapData(i, k); + (*_masks)[TQString("%1_%2").tqarg(DATA[i].tqmask.name).tqarg(k)] = MapData(i, k); } } } - return *_tqmasks; + return *_masks; } bool Pic::Config::hasMaskName(const TQString &tqmask) { - return tqmasks().tqcontains(tqmask); + return masks().tqcontains(tqmask); } -TQString Pic::Config::tqmaskLabel(const TQString &tqmask) +TQString Pic::Config::maskLabel(const TQString &tqmask) { - const MapData &mp = tqmasks()[tqmask]; + const MapData &mp = masks()[tqmask]; TQString s = i18n(DATA[mp.index].tqmask.label); if ( mp.block>=0 ) return i18n("%1 for block %2").tqarg(s).tqarg(mp.block); return s; @@ -312,10 +312,10 @@ TQString Pic::Config::tqmaskLabel(const TQString &tqmask) const Pic::Config::Mask *Pic::Config::findMask(const TQString &tqmask, uint *wordIndex) const { for (uint i=0; i<uint(_words.count()); i++) - for (uint k=0; k<uint(_words[i].tqmasks.count()); k++) { - if ( _words[i].tqmasks[k].name==tqmask ) { + for (uint k=0; k<uint(_words[i].masks.count()); k++) { + if ( _words[i].masks[k].name==tqmask ) { if (wordIndex) *wordIndex = i; - return &_words[i].tqmasks[k]; + return &_words[i].masks[k]; } } return 0; @@ -332,7 +332,7 @@ const Pic::Config::Value *Pic::Config::findValue(const TQString &tqmask, const T bool Pic::Config::checkValueName(const TQString &tqmask, const TQString &name) const { - const Data &data = DATA[tqmasks()[tqmask].index]; + const Data &data = DATA[masks()[tqmask].index]; TQString pinRegexp = "[A-Z]+\\d*(/[A-Z]+\\d*)?"; switch (data.type) { case Fixed: break; @@ -381,7 +381,7 @@ bool Pic::Config::checkValueName(const TQString &tqmask, const TQString &name) c TQString Pic::Config::valueLabel(const TQString &tqmask, const TQString &name) { - const Data &data = DATA[tqmasks()[tqmask].index]; + const Data &data = DATA[masks()[tqmask].index]; switch (data.type) { case Fixed: case ValueDouble: @@ -406,7 +406,7 @@ TQString Pic::Config::valueLabel(const TQString &tqmask, const TQString &name) BitValue Pic::Config::Word::usedMask() const { BitValue tqmask = 0x0; - for (uint i=0; i<uint(tqmasks.count()); i++) tqmask |= tqmasks[i].value; + for (uint i=0; i<uint(masks.count()); i++) tqmask |= masks[i].value; return tqmask; } @@ -435,12 +435,12 @@ TQDataStream &Pic::operator >>(TQDataStream &s, Config::Mask &tqmask) TQDataStream &Pic::operator <<(TQDataStream &s, const Config::Word &word) { - s << word.name << word.ignoredCNames << word.wtqmask << word.ptqmask << word.ctqmask << word.bvalue << word.tqmasks; + s << word.name << word.ignoredCNames << word.wtqmask << word.ptqmask << word.ctqmask << word.bvalue << word.masks; return s; } TQDataStream &Pic::operator >>(TQDataStream &s, Config::Word &word) { - s >> word.name >> word.ignoredCNames >> word.wtqmask >> word.ptqmask >> word.ctqmask >> word.bvalue >> word.tqmasks; + s >> word.name >> word.ignoredCNames >> word.wtqmask >> word.ptqmask >> word.ctqmask >> word.bvalue >> word.masks; return s; } |