V-Gears 0
Free Final Fantasy VII engine.
VGearsRSDFileSerializer.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include "VGearsRSDFile.h"
19#include "VGearsSerializer.h"
20#include "common/TypeDefine.h"
21
22namespace VGears{
23
28
29 public:
30
35
39 virtual ~RSDFileSerializer();
40
47 virtual void ImportRSDFile(Ogre::DataStreamPtr &stream, RSDFile* dest);
48
49 protected:
50
56 virtual void ReadFileHeader(Ogre::DataStreamPtr &stream);
57
64 virtual void ParseLine(const String &line, RSDFile* dest);
65
69 static const String TAG_HEADER;
70
74 static const String TAG_POLYGON;
75
79 static const String TAG_MATERIAL;
80
84 static const String TAG_GROUP;
85
90
95
99 static const String PARSE_DELIMITER;
100
101 private:
102
107
112 };
113}
Handles the serialization of RDS files.
Definition: VGearsRSDFileSerializer.h:27
virtual void ParseLine(const String &line, RSDFile *dest)
Parses a line of the RSD file.
Definition: VGearsRSDFileSerializer.cpp:55
static const String TAG_TEXTURE_COUNT
The texture count tag.
Definition: VGearsRSDFileSerializer.h:89
static const String TAG_MATERIAL
The material tag.
Definition: VGearsRSDFileSerializer.h:79
static const String TAG_POLYGON
The polygon tag.
Definition: VGearsRSDFileSerializer.h:74
static const String TAG_GROUP
The group tag.
Definition: VGearsRSDFileSerializer.h:84
static const String TAG_TEXTURE_NAME
The texture name tag.
Definition: VGearsRSDFileSerializer.h:94
bool has_texture_count_
Indicates if the file has a texture count.
Definition: VGearsRSDFileSerializer.h:106
virtual ~RSDFileSerializer()
Destructor.
Definition: VGearsRSDFileSerializer.cpp:41
size_t texture_count_
The texture count (if any).
Definition: VGearsRSDFileSerializer.h:111
virtual void ReadFileHeader(Ogre::DataStreamPtr &stream)
Reads a file header and sets the instance data.
Definition: VGearsRSDFileSerializer.cpp:43
static const String PARSE_DELIMITER
Delimiter for line parsing.
Definition: VGearsRSDFileSerializer.h:99
RSDFileSerializer()
Constructor.
Definition: VGearsRSDFileSerializer.cpp:39
static const String TAG_HEADER
The file header tag.
Definition: VGearsRSDFileSerializer.h:69
virtual void ImportRSDFile(Ogre::DataStreamPtr &stream, RSDFile *dest)
Imports a RSD file.
Definition: VGearsRSDFileSerializer.cpp:115
Handles RDS files.
Definition: VGearsRSDFile.h:36
Handles file serialization.
Definition: VGearsSerializer.h:30
Definition: FF7NameLookup.h:24
Ogre::String String
Definition: TypeDefine.h:37