添加项目文件。

This commit is contained in:
saturneric 2019-08-13 00:25:03 +08:00
parent 79d7222bbe
commit 72878796c1
18 changed files with 434 additions and 0 deletions

31
Pop Engine.sln Normal file
View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pop Engine", "Pop Engine\Pop Engine.vcxproj", "{05AD07D0-B1E3-4852-9D3C-A8273B29423B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Debug|x64.ActiveCfg = Debug|x64
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Debug|x64.Build.0 = Debug|x64
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Debug|x86.ActiveCfg = Debug|Win32
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Debug|x86.Build.0 = Debug|Win32
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Release|x64.ActiveCfg = Release|x64
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Release|x64.Build.0 = Release|x64
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Release|x86.ActiveCfg = Release|Win32
{05AD07D0-B1E3-4852-9D3C-A8273B29423B}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {841D9ED1-BBBB-41E2-ADCE-EE38756C241D}
EndGlobalSection
EndGlobal

1
Pop Engine/Career.cpp Normal file
View File

@ -0,0 +1 @@
#include "Career.h"

19
Pop Engine/Career.h Normal file
View File

@ -0,0 +1,19 @@
#pragma once
#include <memory>
#include "Production.h"
#include "Need.h"
using namespace std;
class Career
{
public:
private:
shared_ptr<Production> pdt;
shared_ptr<Need> ned;
};

1
Pop Engine/Engine.cpp Normal file
View File

@ -0,0 +1 @@
#include "Engine.h"

17
Pop Engine/Engine.h Normal file
View File

@ -0,0 +1,17 @@
#pragma once
#include <vector>
#include <memory>
#include "Market.h"
using namespace std;
class Engine
{
public:
private:
vector<shared_ptr<Market>> mkts;
};

1
Pop Engine/Market.cpp Normal file
View File

@ -0,0 +1 @@
#include "Market.h"

21
Pop Engine/Market.h Normal file
View File

@ -0,0 +1,21 @@
#pragma once
#include <memory>
#include <vector>
#include "Population.h"
#include "SellProduction.h"
using namespace std;
class Market
{
public:
private:
vector<unique_ptr<SellProduction>> sl_pdts;
vector<unique_ptr<Population>> pops;
vector<shared_ptr<Market>> sub_mkts;
shared_ptr<Market> pae_mkts;
};

1
Pop Engine/Need.cpp Normal file
View File

@ -0,0 +1 @@
#include "Need.h"

19
Pop Engine/Need.h Normal file
View File

@ -0,0 +1,19 @@
#pragma once
#include <memory>
#include <vector>
#include "Production.h"
using namespace std;
class Need
{
public:
private:
vector<shared_ptr<Production>> base_pdts;
vector<shared_ptr<Production>> improve_pdts;
vector<shared_ptr<Production>> high_pdts;
};

20
Pop Engine/Pop Engine.cpp Normal file
View File

@ -0,0 +1,20 @@
// Pop Engine.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
}
// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单
// 调试程序: F5 或调试 >“开始调试”菜单
// 入门使用技巧:
// 1. 使用解决方案资源管理器窗口添加/管理文件
// 2. 使用团队资源管理器窗口连接到源代码管理
// 3. 使用输出窗口查看生成输出和其他消息
// 4. 使用错误列表窗口查看错误
// 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目
// 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件

View File

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{05AD07D0-B1E3-4852-9D3C-A8273B29423B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>PopEngine</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Career.cpp" />
<ClCompile Include="Engine.cpp" />
<ClCompile Include="Market.cpp" />
<ClCompile Include="Need.cpp" />
<ClCompile Include="Pop Engine.cpp" />
<ClCompile Include="Population.cpp" />
<ClCompile Include="Production.cpp" />
<ClCompile Include="SellProduction.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Career.h" />
<ClInclude Include="Engine.h" />
<ClInclude Include="Market.h" />
<ClInclude Include="Need.h" />
<ClInclude Include="Population.h" />
<ClInclude Include="Production.h" />
<ClInclude Include="SellProduction.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Pop Engine.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Career.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Production.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Market.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Engine.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Need.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Population.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="SellProduction.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Career.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Production.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Market.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Engine.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Need.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Population.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="SellProduction.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -0,0 +1 @@
#include "Population.h"

27
Pop Engine/Population.h Normal file
View File

@ -0,0 +1,27 @@
#pragma once
#include <memory>
#include "Career.h"
#include "Market.h"
using namespace std;
class Population
{
public:
void work(void);
void sell(void);
void tax(void);
void buy(void);
void move(void);
void increase(void);
private:
shared_ptr<Career> career;
shared_ptr<Market> market;
float pop;
float money;
};

View File

@ -0,0 +1 @@
#include "Production.h"

18
Pop Engine/Production.h Normal file
View File

@ -0,0 +1,18 @@
#pragma once
#include <memory>
#include <vector>
#include <string>
using namespace std;
class Production
{
public:
private:
vector<shared_ptr<Production>> material;
float value;
string name;
};

View File

@ -0,0 +1 @@
#include "SellProduction.h"

View File

@ -0,0 +1,14 @@
#pragma once
#include "Production.h"
class SellProduction :
public Production
{
public:
private:
float num;
float price;
float need;
shared_ptr<Production> type;
};