Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / 3d / pipeline_max / class_data.cpp
blob05c3688d34b711864aaf85f76642fb2513839acc
1 /**
2 * \file class_data.cpp
3 * \brief CClassData
4 * \date 2012-08-18 19:24GMT
5 * \author Jan Boon (Kaetemi)
6 * CClassData
7 */
9 /*
10 * Copyright (C) 2012 by authors
12 * This file is part of RYZOM CORE PIPELINE.
13 * RYZOM CORE PIPELINE is free software: you can redistribute it
14 * and/or modify it under the terms of the GNU Affero General Public
15 * License as published by the Free Software Foundation, either
16 * version 3 of the License, or (at your option) any later version.
18 * RYZOM CORE PIPELINE is distributed in the hope that it will be
19 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Affero General Public License for more details.
23 * You should have received a copy of the GNU Affero General Public
24 * License along with RYZOM CORE PIPELINE. If not, see
25 * <http://www.gnu.org/licenses/>.
28 #include <nel/misc/types_nl.h>
29 #include "class_data.h"
31 // STL includes
33 // NeL includes
34 // #include <nel/misc/debug.h>
36 // Project includes
38 using namespace std;
39 // using namespace NLMISC;
41 namespace PIPELINE {
42 namespace MAX {
44 ////////////////////////////////////////////////////////////////////////
45 ////////////////////////////////////////////////////////////////////////
46 ////////////////////////////////////////////////////////////////////////
48 CClassData::CClassData()
53 CClassData::~CClassData()
58 std::string CClassData::className() const
60 return "ClassData";
63 void CClassData::toString(std::ostream &ostream, const std::string &pad) const
65 CStorageContainer::toString(ostream, pad);
68 void CClassData::parse(uint16 version, uint filter)
70 CStorageContainer::parse(version);
73 void CClassData::clean()
75 CStorageContainer::clean();
78 void CClassData::build(uint16 version, uint filter)
80 CStorageContainer::build(version);
83 void CClassData::disown()
85 CStorageContainer::disown();
88 IStorageObject *CClassData::createChunkById(uint16 id, bool container)
90 if (container)
92 switch (id)
94 case 0x2100: // ClassDataEntry
95 return new CClassDataEntry();
98 return CStorageContainer::createChunkById(id, container);
101 ////////////////////////////////////////////////////////////////////////
102 ////////////////////////////////////////////////////////////////////////
103 ////////////////////////////////////////////////////////////////////////
105 CClassDataEntry::CClassDataEntry()
110 CClassDataEntry::~CClassDataEntry()
115 std::string CClassDataEntry::className() const
117 return "ClassDataEntry";
120 void CClassDataEntry::toString(std::ostream &ostream, const std::string &pad) const
122 CStorageContainer::toString(ostream, pad);
125 void CClassDataEntry::parse(uint16 version, uint filter)
127 CStorageContainer::parse(version);
130 void CClassDataEntry::clean()
132 CStorageContainer::clean();
135 void CClassDataEntry::build(uint16 version, uint filter)
137 CStorageContainer::build(version);
140 void CClassDataEntry::disown()
142 CStorageContainer::disown();
145 IStorageObject *CClassDataEntry::createChunkById(uint16 id, bool container)
147 if (!container)
149 switch (id)
151 case 0x2110: // ClassDataHeader
152 return new CClassDataHeader();
155 switch (id)
157 case 0x2120: // ClassDataBody: Depends on the ClassDataHeader: TODO
158 return CStorageContainer::createChunkById(id, container);
160 return CStorageContainer::createChunkById(id, container);
163 ////////////////////////////////////////////////////////////////////////
164 ////////////////////////////////////////////////////////////////////////
165 ////////////////////////////////////////////////////////////////////////
167 CClassDataHeader::CClassDataHeader()
172 CClassDataHeader::~CClassDataHeader()
177 std::string CClassDataHeader::className() const
179 return "ClassDataHeader";
182 void CClassDataHeader::serial(NLMISC::IStream &stream)
184 stream.serial(ClassID);
185 stream.serial(SuperClassID);
188 void CClassDataHeader::toString(std::ostream &ostream, const std::string &pad) const
190 ostream << "(" << className() << ") { ";
191 ostream << "\n" << pad << "ClassID: " << NLMISC::toString(ClassID);
192 ostream << "\n" << pad << "SuperClassID: " << SuperClassID;
193 ostream << " } ";
196 ////////////////////////////////////////////////////////////////////////
197 ////////////////////////////////////////////////////////////////////////
198 ////////////////////////////////////////////////////////////////////////
200 } /* namespace MAX */
201 } /* namespace PIPELINE */
203 /* end of file */