2017-10-12 09:02:28 +02:00
|
|
|
#include "ExdDataGenerated.h"
|
2017-10-12 00:07:41 +02:00
|
|
|
#include <boost/make_shared.hpp>
|
|
|
|
|
|
|
|
#include <boost/variant.hpp>
|
|
|
|
|
2017-10-12 09:02:28 +02:00
|
|
|
|
|
|
|
CONSTRUCTORS
|
|
|
|
|
|
|
|
Core::Data::ExdDataGenerated::ExdDataGenerated()
|
2017-10-12 00:07:41 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-10-12 09:02:28 +02:00
|
|
|
Core::Data::ExdDataGenerated::~ExdDataGenerated()
|
2017-10-12 00:07:41 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-10-12 09:02:28 +02:00
|
|
|
xiv::exd::Exd Core::Data::ExdDataGenerated::setupDatAccess( const std::string& name, xiv::exd::Language lang )
|
2017-10-12 00:07:41 +02:00
|
|
|
{
|
|
|
|
auto& cat = m_exd_data->get_category( name );
|
|
|
|
return static_cast< xiv::exd::Exd >( cat.get_data_ln( lang ) );
|
|
|
|
};
|
|
|
|
|
2017-10-12 09:02:28 +02:00
|
|
|
bool Core::Data::ExdDataGenerated::init( const std::string& path )
|
2017-10-12 00:07:41 +02:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
m_data = boost::make_shared< xiv::dat::GameData >( path );
|
|
|
|
m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data );
|
|
|
|
|
|
|
|
SETUPDATACCESS
|
|
|
|
}
|
|
|
|
catch( std::runtime_error )
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
// DIRECT GETTERS
|
|
|
|
DIRECTGETTERS
|
|
|
|
|
|
|
|
|
|
|
|
|