1616#ifndef LIEF_PE_RESOURCE_VAR_FILE_INFO_H
1717#define LIEF_PE_RESOURCE_VAR_FILE_INFO_H
1818#include < ostream>
19- #include < sstream>
2019#include < cstdint>
2120#include < vector>
2221
2322#include " LIEF/visibility.h"
2423
2524#include " LIEF/Object.hpp"
25+
2626namespace LIEF {
2727namespace PE {
2828
@@ -42,41 +42,57 @@ class LIEF_API ResourceVarFileInfo : public Object {
4242 public:
4343 ResourceVarFileInfo ();
4444 ResourceVarFileInfo (uint16_t type, std::u16string key);
45- ResourceVarFileInfo (const ResourceVarFileInfo&);
46- ResourceVarFileInfo& operator =(const ResourceVarFileInfo&);
47- ~ResourceVarFileInfo () override ;
45+ ResourceVarFileInfo (const ResourceVarFileInfo&) = default ;
46+ ResourceVarFileInfo& operator =(const ResourceVarFileInfo&) = default ;
47+ ~ResourceVarFileInfo () override = default ;
4848
4949 // ! The type of data in the version resource
5050 // ! * ``1`` if it contains text data
5151 // ! * ``0`` if it contains binary data
52- uint16_t type () const ;
52+ uint16_t type () const {
53+ return type_;
54+ }
5355
5456 // ! Signature of the structure:
5557 // ! Must be the unicode string "VarFileInfo"
56- const std::u16string& key () const ;
58+ const std::u16string& key () const {
59+ return key_;
60+ }
5761
5862 // ! List of languages that the application supports
5963 // !
6064 // ! The **least** significant 16-bits must contain a Microsoft language identifier,
6165 // ! and the **most** significant 16-bits must contain the PE::CODE_PAGES
6266 // ! Either **most** or **least** 16-bits can be zero, indicating that the file is language or code page independent.
63- const std::vector<uint32_t >& translations () const ;
64- std::vector<uint32_t >& translations ();
67+ const std::vector<uint32_t >& translations () const {
68+ return translations_;
69+ }
70+
71+ std::vector<uint32_t >& translations () {
72+ return translations_;
73+ }
74+
75+ void type (uint16_t type) {
76+ type_ = type;
77+ }
6578
66- void type (uint16_t type);
79+ void key (std::u16string key) {
80+ key_ = std::move (key);
81+ }
6782
68- void key (const std::u16string& key);
6983 void key (const std::string& key);
7084
71- void translations (const std::vector<uint32_t >& translations);
85+ void translations (std::vector<uint32_t > translations) {
86+ translations_ = std::move (translations);
87+ }
7288
7389 void accept (Visitor& visitor) const override ;
7490
7591
7692 LIEF_API friend std::ostream& operator <<(std::ostream& os, const ResourceVarFileInfo& entry);
7793
7894 private:
79- uint16_t type_ = 0 ;
95+ uint16_t type_ = 0 ;
8096 std::u16string key_;
8197 std::vector<uint32_t > translations_;
8298
0 commit comments