lzq 2025-06-04 14:50:22 +08:00
parent 54ead7178c
commit a9c0db165f
10 changed files with 49 additions and 13 deletions

9
.gitignore vendored 100644
View File

@ -0,0 +1,9 @@
################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################
/.idea
/.vs/transferServiceExe
/packages/jsoncpp.redist.0.6.0.1
/transfer.53341EF3/x64
/x64/Debug

View File

@ -1,5 +1,5 @@
#include "NetSocket.h" #include "NetSocket.h"
#include "include\json\json.h" #include "json/json.h"
#pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "ws2_32.lib")

View File

@ -259,7 +259,7 @@ Value::CZString::CZString(const CZString& other) {
storage_.length_ = other.storage_.length_; storage_.length_ = other.storage_.length_;
} }
Value::CZString::CZString(CZString&& other) noexcept Value::CZString::CZString(CZString&& other)
: cstr_(other.cstr_), index_(other.index_) { : cstr_(other.cstr_), index_(other.index_) {
other.cstr_ = nullptr; other.cstr_ = nullptr;
} }
@ -285,7 +285,7 @@ Value::CZString& Value::CZString::operator=(const CZString& other) {
return *this; return *this;
} }
Value::CZString& Value::CZString::operator=(CZString&& other) noexcept { Value::CZString& Value::CZString::operator=(CZString&& other) {
cstr_ = other.cstr_; cstr_ = other.cstr_;
index_ = other.index_; index_ = other.index_;
other.cstr_ = nullptr; other.cstr_ = nullptr;
@ -433,7 +433,7 @@ Value::Value(const Value& other) {
dupMeta(other); dupMeta(other);
} }
Value::Value(Value&& other) noexcept { Value::Value(Value&& other) {
initBasic(nullValue); initBasic(nullValue);
swap(other); swap(other);
} }
@ -448,7 +448,7 @@ Value& Value::operator=(const Value& other) {
return *this; return *this;
} }
Value& Value::operator=(Value&& other) noexcept { Value& Value::operator=(Value&& other) {
other.swap(*this); other.swap(*this);
return *this; return *this;
} }
@ -1374,7 +1374,7 @@ bool Value::isObject() const { return type() == objectValue; }
Value::Comments::Comments(const Comments& that) Value::Comments::Comments(const Comments& that)
: ptr_{cloneUnique(that.ptr_)} {} : ptr_{cloneUnique(that.ptr_)} {}
Value::Comments::Comments(Comments&& that) noexcept Value::Comments::Comments(Comments&& that)
: ptr_{std::move(that.ptr_)} {} : ptr_{std::move(that.ptr_)} {}
Value::Comments& Value::Comments::operator=(const Comments& that) { Value::Comments& Value::Comments::operator=(const Comments& that) {
@ -1382,7 +1382,7 @@ Value::Comments& Value::Comments::operator=(const Comments& that) {
return *this; return *this;
} }
Value::Comments& Value::Comments::operator=(Comments&& that) noexcept { Value::Comments& Value::Comments::operator=(Comments&& that) {
ptr_ = std::move(that.ptr_); ptr_ = std::move(that.ptr_);
return *this; return *this;
} }

Binary file not shown.

Binary file not shown.

4
packages.config 100644
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="jsoncpp.redist" version="0.6.0.1" targetFramework="native" />
</packages>

View File

@ -3,11 +3,15 @@
#include "stdafx.h" #include "stdafx.h"
#include "transferServiceExe.h" #include "transferServiceExe.h"
#include "include\json\json.h" #include "json/json.h"
int _tmain(int argc, CHAR* argv[]) int _tmain(int argc, CHAR* argv[])
{ {
printf("start transferServiceExe\n"); printf("start transferServiceExe\n");
if (argc <= 1) {
printf("exit \n");
return 1;
}
for (int i = 0; i < argc; i++){ for (int i = 0; i < argc; i++){
printf("%s ", argv[i]); printf("%s ", argv[i]);

View File

@ -22,31 +22,32 @@
<ProjectGuid>{53341EF3-3941-4560-97CD-CE734ABCD2A2}</ProjectGuid> <ProjectGuid>{53341EF3-3941-4560-97CD-CE734ABCD2A2}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>transferServiceExe</RootNamespace> <RootNamespace>transferServiceExe</RootNamespace>
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
@ -71,6 +72,8 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);D:\jsoncpp\include;D:\HCNetSDK\CH-HCNetSDKV6.1.9.48_build20230410_win64\头文件</IncludePath>
<LibraryPath>D:\jsoncpp\dist\bin\Debug;D:\jsoncpp\dist\lib\Debug;$(LibraryPath)</LibraryPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
@ -78,6 +81,9 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Label="Vcpkg">
<VcpkgEnabled>false</VcpkgEnabled>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>
@ -107,7 +113,7 @@
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>%(AdditionalDependencies);jsoncpp.lib;HCNetSDK.lib</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -172,8 +178,16 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="json_valueiterator.inl" /> <None Include="json_valueiterator.inl" />
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
<Import Project="packages\jsoncpp.redist.0.6.0.1\build\native\jsoncpp.redist.targets" Condition="Exists('packages\jsoncpp.redist.0.6.0.1\build\native\jsoncpp.redist.targets')" />
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\jsoncpp.redist.0.6.0.1\build\native\jsoncpp.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\jsoncpp.redist.0.6.0.1\build\native\jsoncpp.redist.targets'))" />
</Target>
</Project> </Project>

View File

@ -82,5 +82,6 @@
<None Include="json_valueiterator.inl"> <None Include="json_valueiterator.inl">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</None> </None>
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>