Skip to content

Commit

Permalink
Vutils
Browse files Browse the repository at this point in the history
  • Loading branch information
vic4key committed Oct 31, 2023
1 parent 66b5176 commit 7fb2f20
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Test/Sample.Misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,12 @@ DEF_SAMPLE(Misc)

MessageBoxA(nullptr, "This message box just keep for the program running...", "", MB_OK);

// Easy Print
{
auto pids = vu::name_to_pid(ts("explorer.exe"));
auto string = std::ep::stringify_container(pids);
std::tcout << string << std::endl;
}

return vu::VU_OK;
}
2 changes: 2 additions & 0 deletions Vutils.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
<ClInclude Include="3rdparty\UND\include\undname.h" />
<ClInclude Include="3rdparty\WHW\WinHttpWrapper.h" />
<ClInclude Include="include\3rdparty\BI\BigInt.hpp" />
<ClInclude Include="include\3rdparty\EP\include\easyprint.hpp" />
<ClInclude Include="include\3rdparty\NO\include\base\named_operator.hpp" />
<ClInclude Include="include\3rdparty\NO\include\util\io_helpers.hpp" />
<ClInclude Include="include\3rdparty\WHW\Types.h" />
Expand Down Expand Up @@ -399,6 +400,7 @@
<None Include="include\inline\std.inl" />
<None Include="include\inline\types.inl" />
<None Include="include\inline\spechrs.inl" />
<None Include="include\template\easyprint.tpl" />
<None Include="include\template\handle.tpl" />
<None Include="include\template\math.tpl" />
<None Include="include\template\misc.tpl" />
Expand Down
9 changes: 9 additions & 0 deletions Vutils.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
<Filter Include="Third Party Files\TE">
<UniqueIdentifier>{8ca70d61-cc68-42db-ad04-82ef7fe42ab8}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\Third Files\EP">
<UniqueIdentifier>{2009be16-c3de-4f99-905c-176c3f890abe}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\Vutils.h">
Expand Down Expand Up @@ -150,6 +153,9 @@
<ClInclude Include="3rdparty\TE\include\text_encoding_detect.h">
<Filter>Third Party Files\TE</Filter>
</ClInclude>
<ClInclude Include="include\3rdparty\EP\include\easyprint.hpp">
<Filter>Header Files\Third Files\EP</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Vutils.cpp">
Expand Down Expand Up @@ -349,5 +355,8 @@
<None Include="include\template\handle.tpl">
<Filter>Header Files\Template Files</Filter>
</None>
<None Include="include\template\easyprint.tpl">
<Filter>Header Files\Template Files</Filter>
</None>
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions include/3rdparty/EP/README.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
easyprint
https://github.com/hebaishi/easy-cpp-print.git
https://github.com/vn-os/easy-cpp-print.git
Oct 31, 2023
<Unknown>
1 change: 1 addition & 0 deletions include/3rdparty/EP/include/easyprint.hpp
4 changes: 4 additions & 0 deletions include/Vutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ using namespace WinHttpWrapper;

#include "template/nameop.tpl"

// Easy Print

#include "template/easyprint.tpl"

namespace vu
{

Expand Down
38 changes: 38 additions & 0 deletions include/template/easyprint.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* @file easyprint.tpl
* @author Vic P.
* @brief Template for Easy Print
*/

/**
* Easy Print
*/

#pragma once

#define EASY_PRINT_WINDOWS
#include "3rdparty/EP/include/easyprint.hpp"

#include <string>

namespace std { namespace ep {
template <typename T>
std::string stringify_container_A(const T& container)
{
return easyprint::stringify_A(container);
}

template <typename T>
std::wstring stringify_container_W(const T& container)
{
return easyprint::stringify_W(container);
}

}} // std::ep

#ifdef _UNICODE
#define stringify_container stringify_container_W
#else // _UNICODE
#define stringify_container stringify_container_A
#endif // _UNICODE

0 comments on commit 7fb2f20

Please sign in to comment.