Renamed method, and added first test to cli
This commit is contained in:
@@ -89,7 +89,7 @@ std::string ModuleDataFormatter::FormatBlocks(
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
Block ModuleDataFormatter::StringToBlock(
|
||||
Block ModuleDataFormatter::DecodeFormat(
|
||||
const std::string& str,
|
||||
const Configuration::IOBASE_FORMAT base
|
||||
) {
|
||||
@@ -163,7 +163,7 @@ Block ModuleDataFormatter::StringToBlock(
|
||||
return b;
|
||||
}
|
||||
|
||||
std::vector<Block> ModuleDataFormatter::StringToBlocks(
|
||||
std::vector<Block> ModuleDataFormatter::DecodeFormatMultiblock(
|
||||
const std::string& str,
|
||||
const Configuration::IOBASE_FORMAT base
|
||||
) {
|
||||
@@ -194,7 +194,7 @@ std::vector<Block> ModuleDataFormatter::StringToBlocks(
|
||||
|
||||
const std::string subs = str.substr(i, blockWidth);
|
||||
|
||||
Block newBlock = StringToBlock(
|
||||
Block newBlock = DecodeFormat(
|
||||
subs,
|
||||
base
|
||||
);
|
||||
@@ -221,7 +221,7 @@ std::vector<Block> ModuleDataFormatter::StringToBlocks(
|
||||
i - blockStart
|
||||
);
|
||||
|
||||
Block newBlock = StringToBlock(
|
||||
Block newBlock = DecodeFormat(
|
||||
subs,
|
||||
base
|
||||
);
|
||||
|
@@ -27,7 +27,7 @@ int main(int argc, char* const* argv) {
|
||||
std::cout << "Formatted: " << formattedBlocks << std::endl << std::endl;
|
||||
|
||||
const std::vector<Block> retrievedBlocks =
|
||||
ModuleDataFormatter::StringToBlocks(
|
||||
ModuleDataFormatter::DecodeFormatMultiblock(
|
||||
formattedBlocks,
|
||||
Configuration::iobaseFormat
|
||||
);
|
||||
@@ -90,7 +90,7 @@ int main(int argc, char* const* argv) {
|
||||
*/
|
||||
|
||||
std::cout
|
||||
<< ModuleDataFormatter::StringToBlock(
|
||||
<< ModuleDataFormatter::DecodeFormat(
|
||||
ModuleDataFormatter::FormatBlock(
|
||||
ModulePrepareKey::GetKey(),
|
||||
Configuration::iobaseFormat
|
||||
|
Reference in New Issue
Block a user