mirror of
https://github.com/supleed2/svd2cpp.git
synced 2024-12-22 13:45:50 +00:00
Remove OutputFile include
This commit is contained in:
parent
a88a46a9a9
commit
04dce84fff
|
@ -9,9 +9,8 @@ include_directories(tinyxml2)
|
||||||
|
|
||||||
add_library(ClassBuilder Src/ClassBuilder.cpp)
|
add_library(ClassBuilder Src/ClassBuilder.cpp)
|
||||||
add_library(Builders Src/Builders.cpp)
|
add_library(Builders Src/Builders.cpp)
|
||||||
add_library(OutputFile Src/OutputFile.cpp)
|
|
||||||
add_library(XmlParser Src/XmlParser.cpp)
|
add_library(XmlParser Src/XmlParser.cpp)
|
||||||
add_library(tinyxml2 tinyxml2/tinyxml2.cpp)
|
add_library(tinyxml2 tinyxml2/tinyxml2.cpp)
|
||||||
|
|
||||||
add_executable(svd2cpp Src/main.cpp)
|
add_executable(svd2cpp Src/main.cpp)
|
||||||
target_link_libraries(svd2cpp ClassBuilder Builders OutputFile XmlParser tinyxml2)
|
target_link_libraries(svd2cpp ClassBuilder Builders XmlParser tinyxml2)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cxxopts.hpp>
|
#include <cxxopts.hpp>
|
||||||
#include <XmlParser.hpp>
|
#include <XmlParser.hpp>
|
||||||
#include <ClassBuilder.hpp>
|
#include <ClassBuilder.hpp>
|
||||||
#include <OutputFile.hpp>
|
|
||||||
|
|
||||||
int main(int argc, char** argv){
|
int main(int argc, char** argv){
|
||||||
// Create and configure options for the program
|
// Create and configure options for the program
|
||||||
|
@ -47,6 +47,8 @@ int main(int argc, char** argv){
|
||||||
classBuilder.setupBuilders();
|
classBuilder.setupBuilders();
|
||||||
classBuilder.build();
|
classBuilder.build();
|
||||||
|
|
||||||
OutputFile oFile(outputFile);
|
std::ofstream oFile;
|
||||||
std::cout << (oFile.save(classBuilder.getStream()) ? "Successfuly created " : "Failed to create ") << outputFile << std::endl;
|
oFile.open(outputFile);
|
||||||
|
oFile << classBuilder.getStream().str();
|
||||||
|
oFile.close();
|
||||||
}
|
}
|
Loading…
Reference in a new issue