parent
274ed370af
commit
8410019c50
@ -0,0 +1,132 @@
|
|||||||
|
/**
|
||||||
|
* \file dll_directory.cpp
|
||||||
|
* \brief CDllDirectory
|
||||||
|
* \date 2012-08-18 09:01GMT
|
||||||
|
* \author Jan Boon (Kaetemi)
|
||||||
|
* CDllDirectory
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012 by authors
|
||||||
|
*
|
||||||
|
* This file is part of RYZOM CORE PIPELINE.
|
||||||
|
* RYZOM CORE PIPELINE is free software: you can redistribute it
|
||||||
|
* and/or modify it under the terms of the GNU Affero General Public
|
||||||
|
* License as published by the Free Software Foundation, either
|
||||||
|
* version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* RYZOM CORE PIPELINE is distributed in the hope that it will be
|
||||||
|
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||||
|
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public
|
||||||
|
* License along with RYZOM CORE PIPELINE. If not, see
|
||||||
|
* <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <nel/misc/types_nl.h>
|
||||||
|
#include "dll_directory.h"
|
||||||
|
|
||||||
|
// STL includes
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
// #include <nel/misc/debug.h>
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
// using namespace NLMISC;
|
||||||
|
|
||||||
|
namespace PIPELINE {
|
||||||
|
namespace MAX {
|
||||||
|
|
||||||
|
CDllDirectory::CDllDirectory()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CDllDirectory::~CDllDirectory()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CDllDirectory::getClassName()
|
||||||
|
{
|
||||||
|
return "DllDirectory";
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDllDirectory::toString(std::ostream &ostream, const std::string &pad)
|
||||||
|
{
|
||||||
|
CStorageContainer::toString(ostream, pad);
|
||||||
|
}
|
||||||
|
|
||||||
|
IStorageObject *CDllDirectory::createChunkById(uint16 id, bool container)
|
||||||
|
{
|
||||||
|
if (container)
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case 0x2038: // DllEntry
|
||||||
|
return new CDllEntry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case 0x21C0: // FileVersion
|
||||||
|
return new CStorageValue<uint32>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return CStorageContainer::createChunkById(id, container);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDllDirectory::serialized(TStorageObjectContainer::iterator soit, bool container)
|
||||||
|
{
|
||||||
|
CStorageContainer::serialized(soit, container);
|
||||||
|
}
|
||||||
|
|
||||||
|
CDllEntry::CDllEntry()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CDllEntry::~CDllEntry()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CDllEntry::getClassName()
|
||||||
|
{
|
||||||
|
return "DllEntry";
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDllEntry::toString(std::ostream &ostream, const std::string &pad)
|
||||||
|
{
|
||||||
|
CStorageContainer::toString(ostream, pad);
|
||||||
|
}
|
||||||
|
|
||||||
|
IStorageObject *CDllEntry::createChunkById(uint16 id, bool container)
|
||||||
|
{
|
||||||
|
if (!container)
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case 0x2039: // DllDescription
|
||||||
|
case 0x2037: // DllFilename
|
||||||
|
return new CStorageValue<ucstring>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return CStorageContainer::createChunkById(id, container);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDllEntry::serialized(TStorageObjectContainer::iterator soit, bool container)
|
||||||
|
{
|
||||||
|
CStorageContainer::serialized(soit, container);
|
||||||
|
}
|
||||||
|
|
||||||
|
} /* namespace MAX */
|
||||||
|
} /* namespace PIPELINE */
|
||||||
|
|
||||||
|
/* end of file */
|
@ -0,0 +1,92 @@
|
|||||||
|
/**
|
||||||
|
* \file dll_directory.h
|
||||||
|
* \brief CDllDirectory
|
||||||
|
* \date 2012-08-18 09:01GMT
|
||||||
|
* \author Jan Boon (Kaetemi)
|
||||||
|
* CDllDirectory
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012 by authors
|
||||||
|
*
|
||||||
|
* This file is part of RYZOM CORE PIPELINE.
|
||||||
|
* RYZOM CORE PIPELINE is free software: you can redistribute it
|
||||||
|
* and/or modify it under the terms of the GNU Affero General Public
|
||||||
|
* License as published by the Free Software Foundation, either
|
||||||
|
* version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* RYZOM CORE PIPELINE is distributed in the hope that it will be
|
||||||
|
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||||
|
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public
|
||||||
|
* License along with RYZOM CORE PIPELINE. If not, see
|
||||||
|
* <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef PIPELINE_DLL_DIRECTORY_H
|
||||||
|
#define PIPELINE_DLL_DIRECTORY_H
|
||||||
|
#include <nel/misc/types_nl.h>
|
||||||
|
|
||||||
|
// STL includes
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "storage_object.h"
|
||||||
|
#include "storage_value.h"
|
||||||
|
|
||||||
|
namespace PIPELINE {
|
||||||
|
namespace MAX {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief CDllDirectory
|
||||||
|
* \date 2012-08-18 09:01GMT
|
||||||
|
* \author Jan Boon (Kaetemi)
|
||||||
|
* CDllDirectory
|
||||||
|
*/
|
||||||
|
class CDllDirectory : public CStorageContainer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CDllDirectory();
|
||||||
|
virtual ~CDllDirectory();
|
||||||
|
|
||||||
|
// inherited
|
||||||
|
virtual std::string getClassName();
|
||||||
|
virtual void toString(std::ostream &ostream, const std::string &pad = "");
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual IStorageObject *createChunkById(uint16 id, bool container);
|
||||||
|
virtual void serialized(TStorageObjectContainer::iterator soit, bool container);
|
||||||
|
|
||||||
|
}; /* class CDllDirectory */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief CDllEntry
|
||||||
|
* \date 2012-08-18 09:01GMT
|
||||||
|
* \author Jan Boon (Kaetemi)
|
||||||
|
* CDllDirectory
|
||||||
|
*/
|
||||||
|
class CDllEntry : public CStorageContainer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CDllEntry();
|
||||||
|
virtual ~CDllEntry();
|
||||||
|
|
||||||
|
// inherited
|
||||||
|
virtual std::string getClassName();
|
||||||
|
virtual void toString(std::ostream &ostream, const std::string &pad = "");
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual IStorageObject *createChunkById(uint16 id, bool container);
|
||||||
|
virtual void serialized(TStorageObjectContainer::iterator soit, bool container);
|
||||||
|
|
||||||
|
}; /* class CDllDirectory */
|
||||||
|
|
||||||
|
} /* namespace MAX */
|
||||||
|
} /* namespace PIPELINE */
|
||||||
|
|
||||||
|
#endif /* #ifndef PIPELINE_DLL_DIRECTORY_H */
|
||||||
|
|
||||||
|
/* end of file */
|
Loading…
Reference in New Issue