summaryrefslogtreecommitdiffstats
path: root/src/coff/base/coff_object.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/coff/base/coff_object.h
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/coff/base/coff_object.h')
-rw-r--r--src/coff/base/coff_object.h108
1 files changed, 54 insertions, 54 deletions
diff --git a/src/coff/base/coff_object.h b/src/coff/base/coff_object.h
index 8b98129..fccb744 100644
--- a/src/coff/base/coff_object.h
+++ b/src/coff/base/coff_object.h
@@ -15,7 +15,7 @@
namespace Coff
{
//----------------------------------------------------------------------------
-extern bool getName(const QByteArray &data, uint &offset, uint nbChars, uint stringTableOffset, Log::Base &log, QString &name);
+extern bool getName(const TQByteArray &data, uint &offset, uint nbChars, uint stringTableOffset, Log::Base &log, TQString &name);
extern int disassemble(long int opcode, long int opcode2, int org, Pic::Architecture architecture, char *buffer, size_t sizeof_buffer);
BEGIN_DECLARE_ENUM(OptHeaderFormat)
@@ -59,7 +59,7 @@ class AuxSymbol : public BaseSymbol
{
public:
virtual bool isAuxSymbol() const { return true; }
- static AuxSymbol *factory(const Object &object, AuxSymbolType type, const QByteArray &data,
+ static AuxSymbol *factory(const Object &object, AuxSymbolType type, const TQByteArray &data,
uint offset, uint stringTableOffset, Log::Base &log);
public:
@@ -70,42 +70,42 @@ public:
class AuxSymbolDirect : public AuxSymbol
{
public:
- AuxSymbolDirect(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
+ AuxSymbolDirect(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
virtual AuxSymbolType type() const { return AuxSymbolType::Direct; }
private:
uchar _command;
- QString _string;
+ TQString _string;
};
class AuxSymbolFile : public AuxSymbol
{
public:
- AuxSymbolFile(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
+ AuxSymbolFile(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
virtual AuxSymbolType type() const { return AuxSymbolType::File; }
- QString filename() const { return _filename; }
+ TQString filename() const { return _filename; }
uint line() const { return _line; }
private:
uint _line;
- QString _filename;
+ TQString _filename;
};
class AuxSymbolIdentifier : public AuxSymbol
{
public:
- AuxSymbolIdentifier(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
+ AuxSymbolIdentifier(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
virtual AuxSymbolType type() const { return AuxSymbolType::Identifier; }
- QString string() const { return _string; }
+ TQString string() const { return _string; }
private:
- QString _string;
+ TQString _string;
};
class AuxSymbolSection : public AuxSymbol
{
public:
- AuxSymbolSection(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
+ AuxSymbolSection(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset, Log::Base &log);
virtual AuxSymbolType type() const { return AuxSymbolType::Section; }
private:
@@ -157,12 +157,12 @@ END_DECLARE_ENUM(SymbolDerivedType, SymbolDerivedTypeData)
class Symbol : public BaseSymbol
{
public:
- Symbol(const Object &object, const QByteArray &data, uint offset, uint stringTableOffset,
- const QString &lastFilename, Log::Base &log);
+ Symbol(const Object &object, const TQByteArray &data, uint offset, uint stringTableOffset,
+ const TQString &lastFilename, Log::Base &log);
virtual bool isAuxSymbol() const { return false; }
- QString name() const { return _name; }
- QString filename() const { return _filename; }
- const QValueVector<AuxSymbol *> &auxSymbols() const { return _aux; }
+ TQString name() const { return _name; }
+ TQString filename() const { return _filename; }
+ const TQValueVector<AuxSymbol *> &auxSymbols() const { return _aux; }
SymbolClass symbolClass() const { return _sclass; }
SymbolSectionType sectionType() const;
SymbolType type() const { return _type; }
@@ -171,19 +171,19 @@ public:
uint section() const { Q_ASSERT( sectionType()==SymbolSectionType::InsideSection ); return _section; }
private:
- QString _name, _filename;
+ TQString _name, _filename;
uint _value, _section;
SymbolClass _sclass;
SymbolType _type;
SymbolDerivedType _dtype;
- QValueVector<AuxSymbol *> _aux;
+ TQValueVector<AuxSymbol *> _aux;
};
//----------------------------------------------------------------------------
class Relocation : public Element
{
public:
- Relocation(const Object &object, const Section &section, const QByteArray &data,
+ Relocation(const Object &object, const Section &section, const TQByteArray &data,
uint offset, Log::Base &log);
private:
@@ -196,10 +196,10 @@ private:
class CodeLine : public Element
{
public:
- CodeLine(const Object &object, const Section &section, const QByteArray &data,
- uint offset, const QString &lastFilename, Log::Base &log);
+ CodeLine(const Object &object, const Section &section, const TQByteArray &data,
+ uint offset, const TQString &lastFilename, Log::Base &log);
const Section &section() const { return _section; }
- QString filename() const { return _filename; }
+ TQString filename() const { return _filename; }
uint line() const { return _line; }
Address address() const { return _address; }
const Symbol *symbol() const { return _symbol; }
@@ -208,7 +208,7 @@ private:
const Section &_section;
uint _line;
Address _address;
- QString _filename;
+ TQString _filename;
const Symbol *_symbol;
};
@@ -223,29 +223,29 @@ public:
class InstructionData {
public:
BitValue value;
- QString opcode, disasm;
+ TQString opcode, disasm;
};
public:
- Section(const Device::Data &device, const Object &object, const QByteArray &data, uint offset,
+ Section(const Device::Data &device, const Object &object, const TQByteArray &data, uint offset,
uint stringTableOffset, Log::Base &log);
~Section();
SectionType type() const;
- QString name() const { return _name; }
+ TQString name() const { return _name; }
Address address() const { return _address; }
uint size() const { return _size; }
uint flags() const { return _flags; }
- const QMap<Address, InstructionData> &instructions() const { return _instructions; }
- const QValueVector<Relocation *> &relocations() const { return _relocations; }
- const QValueVector<CodeLine *> &lines() const { return _lines; }
+ const TQMap<Address, InstructionData> &instructions() const { return _instructions; }
+ const TQValueVector<Relocation *> &relocations() const { return _relocations; }
+ const TQValueVector<CodeLine *> &lines() const { return _lines; }
private:
- QString _name;
+ TQString _name;
Address _address;
uint _size, _flags;
- QMap<Address, InstructionData> _instructions;
- QValueVector<Relocation *> _relocations;
- QValueVector<CodeLine *> _lines;
+ TQMap<Address, InstructionData> _instructions;
+ TQValueVector<Relocation *> _relocations;
+ TQValueVector<CodeLine *> _lines;
enum Flag { FText = 0x00020, FData = 0x00040, FBSS = 0x00080, FDataRom = 0x00100,
FAbs = 0x01000, FShared = 0x02000, FOverlay = 0x04000, FAccess = 0x08000,
@@ -266,33 +266,33 @@ public:
uint optHeaderMagic() const { return _optHeaderMagic; }
uint nbSymbols() const { return _symbols.count(); }
const BaseSymbol *symbol(uint i) const { return _symbols[i]; }
- const Symbol *symbol(const QString &name) const { return (_msymbols.contains(name) ? _msymbols[name] : 0); }
+ const Symbol *symbol(const TQString &name) const { return (_msymbols.tqcontains(name) ? _msymbols[name] : 0); }
uint nbSections() const { return _sections.count(); }
const Section *section(uint i) const { return _sections[i]; }
- const QStringList &filenames() const { return _filenames; }
- const QMap<QString, Address> &variables() const { return _variables; }
- QString variableName(Address address) const;
+ const TQStringList &filenames() const { return _filenames; }
+ const TQMap<TQString, Address> &variables() const { return _variables; }
+ TQString variableName(Address address) const;
enum Flag { RelocationStripped = 0x0001, Executable = 0x0002, LineNumberStripped = 0x0004,
SymbolStripped = 0x0080, Extended18 = 0x4000, Generic = 0x8000 };
- Q_DECLARE_FLAGS(Flags, Flag)
+ TQ_DECLARE_FLAGS(Flags, Flag)
protected:
- Q_UINT32 _optHeaderMagic;
+ TQ_UINT32 _optHeaderMagic;
OptHeaderFormat _optHeaderFormat;
const Device::Data *_device;
uint _nbSections, _nbSymbols, _symbolOffset;
Flags _flags;
- QValueVector<BaseSymbol *> _symbols;
- QMap<QString, Symbol *> _msymbols; // name -> Symbol *
- QValueVector<Section *> _sections;
- QStringList _filenames;
- QMap<QString, Address> _variables; // name -> address
-
- virtual bool parseHeader(const QByteArray &data, uint &offset, Log::Base &log);
- virtual bool parseOptionnalHeader(const QByteArray &data, uint &offset, Log::Base &log);
+ TQValueVector<BaseSymbol *> _symbols;
+ TQMap<TQString, Symbol *> _msymbols; // name -> Symbol *
+ TQValueVector<Section *> _sections;
+ TQStringList _filenames;
+ TQMap<TQString, Address> _variables; // name -> address
+
+ virtual bool parseHeader(const TQByteArray &data, uint &offset, Log::Base &log);
+ virtual bool parseOptionnalHeader(const TQByteArray &data, uint &offset, Log::Base &log);
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(Object::Flags)
+TQ_DECLARE_OPERATORS_FOR_FLAGS(Object::Flags)
} // namespace
@@ -304,18 +304,18 @@ class RegisterNameData
{
public:
RegisterNameData() {}
- RegisterNameData(const QString &label, const Register::TypeData &data) : _label(label), _data(data) {}
- QString label() const { return _label; }
+ RegisterNameData(const TQString &label, const Register::TypeData &data) : _label(label), _data(data) {}
+ TQString label() const { return _label; }
const Register::TypeData &data() const { return _data; }
bool operator <(const RegisterNameData &rnd) const { return _label<rnd._label; };
private:
- QString _label;
+ TQString _label;
Register::TypeData _data;
};
-extern QValueVector<RegisterNameData> sfrList(const Pic::Data &data);
-extern QValueVector<RegisterNameData> gprList(const Pic::Data &data, const Coff::Object *coff);
-extern QValueVector<RegisterNameData> variableList(const Pic::Data &data, const Coff::Object &coff);
+extern TQValueVector<RegisterNameData> sfrList(const Pic::Data &data);
+extern TQValueVector<RegisterNameData> gprList(const Pic::Data &data, const Coff::Object *coff);
+extern TQValueVector<RegisterNameData> variableList(const Pic::Data &data, const Coff::Object &coff);
} // namespace