#pragma once #include #include #include #include #include #include #include "TargetFamily.hpp" #include "TargetMemory.hpp" #include "TargetAddressSpaceDescriptor.hpp" #include "TargetPeripheralDescriptor.hpp" #include "TargetPinoutDescriptor.hpp" #include "TargetVariantDescriptor.hpp" #include "TargetBreakpoint.hpp" namespace Targets { struct TargetDescriptor { std::string name; TargetFamily family; std::string marketId; std::string vendorName; std::map addressSpaceDescriptorsByKey; std::map peripheralDescriptorsByKey; std::map pinoutDescriptorsByKey; std::vector variantDescriptors; BreakpointResources breakpointResources; TargetDescriptor( const std::string& name, TargetFamily family, const std::string& marketId, const std::string& vendorName, std::map&& addressSpaceDescriptorsByKey, std::map&& peripheralDescriptorsByKey, std::map&& pinoutDescriptorsByKey, std::vector&& variantDescriptors, const BreakpointResources& breakpointResources ); TargetDescriptor(const TargetDescriptor& other) = delete; TargetDescriptor& operator = (const TargetDescriptor& other) = delete; TargetDescriptor(TargetDescriptor&& other) noexcept = default; TargetDescriptor& operator = (TargetDescriptor&& other) = default; std::optional> tryGetAddressSpaceDescriptor( const std::string& key ) const; const TargetAddressSpaceDescriptor& getAddressSpaceDescriptor(const std::string& key) const; /** * Returns the descriptor for the first address space that contains the given memory segment. * * @param memorySegmentKey * Key of the memory segment that should be contained within the address space. * * @return */ const TargetAddressSpaceDescriptor& getFirstAddressSpaceDescriptorContainingMemorySegment( const std::string& memorySegmentKey ) const; std::optional> tryGetPeripheralDescriptor( const std::string& key ) const; const TargetPeripheralDescriptor& getPeripheralDescriptor(const std::string& key) const; std::optional> tryGetPinoutDescriptor( const std::string& key ) const; const TargetPinoutDescriptor& getPinoutDescriptor(const std::string& key) const; }; }