Removed all using declarations and directives from header files
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
#include <QtCore>
|
||||
#include <QJsonDocument>
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <bitset>
|
||||
#include <limits>
|
||||
|
||||
@@ -20,11 +18,10 @@
|
||||
#include "Tiny/Tiny.hpp"
|
||||
|
||||
using namespace Bloom;
|
||||
using namespace Targets;
|
||||
using namespace Targets::Microchip::Avr;
|
||||
using namespace Avr8Bit;
|
||||
using namespace Bloom::Targets;
|
||||
using namespace Bloom::Targets::Microchip::Avr;
|
||||
using namespace Bloom::Targets::Microchip::Avr::Avr8Bit;
|
||||
using namespace Exceptions;
|
||||
using Avr8Bit::Avr8;
|
||||
|
||||
/**
|
||||
* Initialises the target from config parameters extracted from user's config file.
|
||||
@@ -71,7 +68,7 @@ void Avr8::postPromotionConfigure() {
|
||||
|
||||
void Avr8::loadPartDescription() {
|
||||
auto targetSignature = this->getId();
|
||||
auto partDescription = PartDescriptionFile(
|
||||
auto partDescription = PartDescription::PartDescriptionFile(
|
||||
targetSignature.toHex(),
|
||||
(!this->name.empty()) ? std::optional(this->name) : std::nullopt
|
||||
);
|
||||
|
||||
@@ -19,20 +19,13 @@
|
||||
|
||||
namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
||||
{
|
||||
using namespace Exceptions;
|
||||
using namespace PartDescription;
|
||||
|
||||
using PartDescription::PartDescriptionFile;
|
||||
using DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface;
|
||||
using Targets::TargetRegisterMap;
|
||||
|
||||
class Avr8: public Target
|
||||
{
|
||||
protected:
|
||||
Avr8Interface* avr8Interface;
|
||||
DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* avr8Interface;
|
||||
std::string name = "";
|
||||
std::optional<Family> family;
|
||||
std::optional<PartDescriptionFile> partDescription;
|
||||
std::optional<PartDescription::PartDescriptionFile> partDescription;
|
||||
std::optional<TargetParameters> targetParameters;
|
||||
std::map<std::string, PadDescriptor> padDescriptorsByName;
|
||||
std::map<int, TargetVariant> targetVariantsById;
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
#include "src/Logger/Logger.hpp"
|
||||
#include "src/Application.hpp"
|
||||
|
||||
using namespace Bloom::Targets::Microchip::Avr::Avr8Bit::PartDescription;
|
||||
using namespace Bloom::Targets::Microchip::Avr::Avr8Bit;
|
||||
using namespace Bloom::Targets::Microchip::Avr;
|
||||
using namespace Bloom::Exceptions;
|
||||
|
||||
// TODO: Move this into a resolvePartDescriptionFile() method.
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
|
||||
namespace Bloom::Targets::Microchip::Avr::Avr8Bit::PartDescription
|
||||
{
|
||||
using Avr::TargetSignature;
|
||||
|
||||
/**
|
||||
* An AVR8 part description file is an XML file that describes a particular AVR8 target.
|
||||
* All supported AVR8 targets come with a part description file.
|
||||
@@ -27,7 +25,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::PartDescription
|
||||
* During the build process, all part description files are copied to the distribution directory, ready
|
||||
* to be shipped with the Bloom binary. Alongside these files is a JSON file, containing a mapping of AVR8 target
|
||||
* signatures to part description file paths. Bloom uses this mapping to find a particular part description
|
||||
* file, given a target signature. See directory "bin/Distribution/Resources/TargetPartDescriptions".
|
||||
* file, given a target signature. See directory "build/resources/TargetPartDescriptions".
|
||||
* The copying of the part description files, and the generation of the JSON mapping, is done by a PHP script:
|
||||
* "build/scripts/CopyAvrPartFilesAndCreateMapping.php". This script is invoked via a custom command, at build time.
|
||||
*
|
||||
|
||||
@@ -50,21 +50,23 @@ namespace Bloom::Targets
|
||||
}
|
||||
};
|
||||
|
||||
using TargetRegisterMap = std::map<TargetRegister::IdType , TargetRegister>;
|
||||
using TargetRegisterMap = std::map<TargetRegister::IdType, TargetRegister>;
|
||||
using TargetRegisters = std::vector<TargetRegister>;
|
||||
using TargetRegisterDescriptors = std::vector<TargetRegisterDescriptor>;
|
||||
}
|
||||
|
||||
namespace std {
|
||||
|
||||
using Bloom::Targets::TargetRegisterDescriptor;
|
||||
|
||||
/**
|
||||
* Hashing function for TargetRegisterDescriptor type.
|
||||
*
|
||||
* This is required in order to use TargetRegisterDescriptor as a key in an std::unordered_map (see the BiMap
|
||||
* class)
|
||||
*/
|
||||
template<>
|
||||
class hash<TargetRegisterDescriptor> {
|
||||
class hash<Bloom::Targets::TargetRegisterDescriptor> {
|
||||
public:
|
||||
size_t operator()(const TargetRegisterDescriptor& descriptor) const {
|
||||
size_t operator()(const Bloom::Targets::TargetRegisterDescriptor& descriptor) const {
|
||||
return descriptor.id.value_or(0) + static_cast<size_t>(descriptor.type);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user