Skip to content

Commit ff8def2

Browse files
author
Alex Kovalchuk
committed
Добавьте файлы проекта.
1 parent d66d113 commit ff8def2

15 files changed

+458
-0
lines changed

Threads.sln

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.136
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Threads", "Threads\Threads.vcxproj", "{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Debug|x64.ActiveCfg = Debug|x64
17+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Debug|x64.Build.0 = Debug|x64
18+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Debug|x86.ActiveCfg = Debug|Win32
19+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Debug|x86.Build.0 = Debug|Win32
20+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Release|x64.ActiveCfg = Release|x64
21+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Release|x64.Build.0 = Release|x64
22+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Release|x86.ActiveCfg = Release|Win32
23+
{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {58025A9A-7212-4A81-B1E3-437DDB9D2D5F}
30+
EndGlobalSection
31+
EndGlobal

Threads/Client.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include "pch.h"
2+
#include "Client.h"
3+
4+
5+
Client::Client(Manager* manager)
6+
{
7+
this->manager_ = manager;
8+
}
9+
10+
11+
Client::~Client()
12+
{
13+
}

Threads/Client.h

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
#include "Task.h"
3+
#include "Manager.h"
4+
5+
using namespace space;
6+
7+
class Client
8+
{
9+
protected:
10+
Manager* manager_;
11+
public:
12+
Client(Manager* manager);
13+
~Client();
14+
private:
15+
16+
};
17+

Threads/Manager.cpp

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include "pch.h"
2+
#include "Manager.h"
3+
4+
5+
Manager::Manager()
6+
{
7+
}
8+
9+
10+
Manager::~Manager()
11+
{
12+
}
13+
14+
15+
void Manager::PutToQueue(Task&& task) {
16+
//TODO
17+
}
18+
19+
void Manager::Run() {
20+
//TODO
21+
}
22+
23+
Task* Manager::PopTask() {
24+
return new Task();
25+
}

Threads/Manager.h

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#pragma once
2+
#include <queue>
3+
#include <thread>
4+
#include <mutex>
5+
#include "Operator.h"
6+
#include "Task.h"
7+
8+
class Manager
9+
{
10+
public:
11+
Manager();
12+
~Manager();
13+
void PutToQueue(Task&& task);
14+
void Run();
15+
Task* PopTask();
16+
private:
17+
std::queue<Task> queue_;
18+
};
19+

Threads/Operator.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#include "pch.h"
2+
#include "Operator.h"
3+
4+
5+
Operator::Operator()
6+
{
7+
}
8+
9+
10+
Operator::~Operator()
11+
{
12+
}
13+
14+
void Operator::GetTask() {
15+
16+
}
17+
18+
void Operator::DoTask() {
19+
20+
}
21+
22+
void Operator::Work() {
23+
24+
}

Threads/Operator.h

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#pragma once
2+
class Operator
3+
{
4+
public:
5+
Operator();
6+
~Operator();
7+
void GetTask();
8+
void DoTask();
9+
void Work();
10+
};
11+

Threads/Task.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include "pch.h"
2+
#include "Task.h"
3+
4+
5+
Task::Task()
6+
{
7+
}
8+
9+
10+
Task::~Task()
11+
{
12+
}

Threads/Task.h

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
#include "space.h"
3+
4+
using namespace space;
5+
6+
class Task
7+
{
8+
public:
9+
Task();
10+
~Task();
11+
private:
12+
unsigned int id_;
13+
LevelOfHard level_;
14+
};
15+

Threads/Threads.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Threads.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
2+
//
3+
4+
#include "pch.h"
5+
#include <iostream>
6+
#include "Manager.h"
7+
#include "Client.h"
8+
9+
int main()
10+
{
11+
Manager manager();
12+
Client client();//TODO
13+
14+
for(int i = 0; i<1000000;i++){}
15+
}
16+
17+
// Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки"
18+
// Отладка программы: F5 или меню "Отладка" > "Запустить отладку"
19+
20+
// Советы по началу работы
21+
// 1. В окне обозревателя решений можно добавлять файлы и управлять ими.
22+
// 2. В окне Team Explorer можно подключиться к системе управления версиями.
23+
// 3. В окне "Выходные данные" можно просматривать выходные данные сборки и другие сообщения.
24+
// 4. В окне "Список ошибок" можно просматривать ошибки.
25+
// 5. Последовательно выберите пункты меню "Проект" > "Добавить новый элемент", чтобы создать файлы кода, или "Проект" > "Добавить существующий элемент", чтобы добавить в проект существующие файлы кода.
26+
// 6. Чтобы снова открыть этот проект позже, выберите пункты меню "Файл" > "Открыть" > "Проект" и выберите SLN-файл.

Threads/Threads.vcxproj

+177
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>15.0</VCProjectVersion>
23+
<ProjectGuid>{E55E1D2A-8D88-4C76-936C-69EE3008BB3D}</ProjectGuid>
24+
<Keyword>Win32Proj</Keyword>
25+
<RootNamespace>Threads</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v141</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>Application</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v141</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>Application</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v141</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>Application</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v141</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<LinkIncremental>true</LinkIncremental>
75+
</PropertyGroup>
76+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
77+
<LinkIncremental>true</LinkIncremental>
78+
</PropertyGroup>
79+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
80+
<LinkIncremental>false</LinkIncremental>
81+
</PropertyGroup>
82+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
83+
<LinkIncremental>false</LinkIncremental>
84+
</PropertyGroup>
85+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
86+
<ClCompile>
87+
<PrecompiledHeader>Use</PrecompiledHeader>
88+
<WarningLevel>Level3</WarningLevel>
89+
<Optimization>Disabled</Optimization>
90+
<SDLCheck>true</SDLCheck>
91+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92+
<ConformanceMode>true</ConformanceMode>
93+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
94+
</ClCompile>
95+
<Link>
96+
<SubSystem>Console</SubSystem>
97+
<GenerateDebugInformation>true</GenerateDebugInformation>
98+
</Link>
99+
</ItemDefinitionGroup>
100+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
101+
<ClCompile>
102+
<PrecompiledHeader>Use</PrecompiledHeader>
103+
<WarningLevel>Level3</WarningLevel>
104+
<Optimization>Disabled</Optimization>
105+
<SDLCheck>true</SDLCheck>
106+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107+
<ConformanceMode>true</ConformanceMode>
108+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
109+
</ClCompile>
110+
<Link>
111+
<SubSystem>Console</SubSystem>
112+
<GenerateDebugInformation>true</GenerateDebugInformation>
113+
</Link>
114+
</ItemDefinitionGroup>
115+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
116+
<ClCompile>
117+
<PrecompiledHeader>Use</PrecompiledHeader>
118+
<WarningLevel>Level3</WarningLevel>
119+
<Optimization>MaxSpeed</Optimization>
120+
<FunctionLevelLinking>true</FunctionLevelLinking>
121+
<IntrinsicFunctions>true</IntrinsicFunctions>
122+
<SDLCheck>true</SDLCheck>
123+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124+
<ConformanceMode>true</ConformanceMode>
125+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
126+
</ClCompile>
127+
<Link>
128+
<SubSystem>Console</SubSystem>
129+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
130+
<OptimizeReferences>true</OptimizeReferences>
131+
<GenerateDebugInformation>true</GenerateDebugInformation>
132+
</Link>
133+
</ItemDefinitionGroup>
134+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
135+
<ClCompile>
136+
<PrecompiledHeader>Use</PrecompiledHeader>
137+
<WarningLevel>Level3</WarningLevel>
138+
<Optimization>MaxSpeed</Optimization>
139+
<FunctionLevelLinking>true</FunctionLevelLinking>
140+
<IntrinsicFunctions>true</IntrinsicFunctions>
141+
<SDLCheck>true</SDLCheck>
142+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143+
<ConformanceMode>true</ConformanceMode>
144+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
145+
</ClCompile>
146+
<Link>
147+
<SubSystem>Console</SubSystem>
148+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
149+
<OptimizeReferences>true</OptimizeReferences>
150+
<GenerateDebugInformation>true</GenerateDebugInformation>
151+
</Link>
152+
</ItemDefinitionGroup>
153+
<ItemGroup>
154+
<ClInclude Include="Client.h" />
155+
<ClInclude Include="Manager.h" />
156+
<ClInclude Include="Operator.h" />
157+
<ClInclude Include="pch.h" />
158+
<ClInclude Include="space.h" />
159+
<ClInclude Include="Task.h" />
160+
</ItemGroup>
161+
<ItemGroup>
162+
<ClCompile Include="Client.cpp" />
163+
<ClCompile Include="Manager.cpp" />
164+
<ClCompile Include="Operator.cpp" />
165+
<ClCompile Include="pch.cpp">
166+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
167+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
168+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
169+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
170+
</ClCompile>
171+
<ClCompile Include="Task.cpp" />
172+
<ClCompile Include="Threads.cpp" />
173+
</ItemGroup>
174+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
175+
<ImportGroup Label="ExtensionTargets">
176+
</ImportGroup>
177+
</Project>

0 commit comments

Comments
 (0)