summaryrefslogtreecommitdiff
path: root/project2/ice/buildClient.cpp
blob: f4543738f409c5a48ec1a29ee79e074e442e9c0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <pch.hpp>
#include "buildClient.h"
#include "slice2Task.h"
#include "slice2Rows.h"

BuildClient::BuildClient(const std::filesystem::path & slice, const IceCompile::Deps & dep) :
	SliceCompile(slice, dep)
{
}

void
BuildClient::Headers(FILE * out) const
{
	fprintf(out, "#include <iceTask.h>\n");
	fprintf(out, "#include <iceRows.h>\n");
}

unsigned int
BuildClient::Body(FILE * out, Slice::UnitPtr u) const
{
	Slice2Task taskBuilder(out);
	Slice2Rows rowsBuilder(out);
	u->visit(&taskBuilder, false);
	u->visit(&rowsBuilder, false);

	return taskBuilder.Components() + rowsBuilder.Components();
}

std::filesystem::path
BuildClient::OutputName(const std::string & type) const
{
	return slice.filename().replace_extension(".client" + type);
}