use smart pointer for m_imp
This commit is contained in:
parent
d57726081c
commit
262a92f130
96 changed files with 237 additions and 345 deletions
|
@ -46,7 +46,6 @@ TExpression::TExpression()
|
||||||
|
|
||||||
TExpression::~TExpression()
|
TExpression::~TExpression()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
|
@ -1319,7 +1319,6 @@ Grammar::Grammar()
|
||||||
|
|
||||||
Grammar::~Grammar()
|
Grammar::~Grammar()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Grammar::addPattern(Pattern *pattern)
|
void Grammar::addPattern(Pattern *pattern)
|
||||||
|
|
|
@ -92,7 +92,6 @@ Parser::Parser(const Grammar *grammar)
|
||||||
|
|
||||||
Parser::~Parser()
|
Parser::~Parser()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|
|
@ -785,13 +785,12 @@ void UsageImp::resetValues()
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
Usage::Usage(string progName)
|
Usage::Usage(string progName)
|
||||||
|
: m_imp(new UsageImp(progName))
|
||||||
{
|
{
|
||||||
m_imp = new UsageImp(progName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Usage::~Usage()
|
Usage::~Usage()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Usage::add(const UsageLine &ul)
|
void Usage::add(const UsageLine &ul)
|
||||||
|
|
|
@ -292,15 +292,14 @@ public:
|
||||||
//===============================================================================
|
//===============================================================================
|
||||||
|
|
||||||
TTimer::TTimer(const string &name, UINT timerRes, Type type)
|
TTimer::TTimer(const string &name, UINT timerRes, Type type)
|
||||||
|
: m_imp(new TTimer::Imp(name, timerRes, type, this))
|
||||||
{
|
{
|
||||||
m_imp = new TTimer::Imp(name, timerRes, type, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
|
||||||
TTimer::~TTimer()
|
TTimer::~TTimer()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1127,7 +1127,6 @@ TImageCache::~TImageCache()
|
||||||
{
|
{
|
||||||
assert(check == magic);
|
assert(check == magic);
|
||||||
check = -1;
|
check = -1;
|
||||||
delete m_imp;
|
|
||||||
CacheInstance = 0;
|
CacheInstance = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,6 @@ TUndoManager *TUndoManager::manager()
|
||||||
TUndoManager::TUndoManager()
|
TUndoManager::TUndoManager()
|
||||||
: m_imp(new TUndoManagerImp)
|
: m_imp(new TUndoManagerImp)
|
||||||
{
|
{
|
||||||
// cout << "Creato undo manager" << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -184,7 +183,6 @@ TUndoManager::~TUndoManager()
|
||||||
//cout << "Distrutto undo manager" << endl;
|
//cout << "Distrutto undo manager" << endl;
|
||||||
assert(m_imp->m_blockStack.empty());
|
assert(m_imp->m_blockStack.empty());
|
||||||
reset();
|
reset();
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -292,8 +292,7 @@ DEFINE_CLASS_CODE(TFx, 3)
|
||||||
|
|
||||||
TFx::TFx()
|
TFx::TFx()
|
||||||
: TSmartObject(m_classCode) // TPersist(TFxImp::m_instances)
|
: TSmartObject(m_classCode) // TPersist(TFxImp::m_instances)
|
||||||
,
|
, m_imp(new TFxImp(this))
|
||||||
m_imp(new TFxImp(this))
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,6 @@ TFxCacheManager::~TFxCacheManager()
|
||||||
std::set<std::string>::iterator it;
|
std::set<std::string>::iterator it;
|
||||||
for (it = m_staticCacheIds.begin(); it != m_staticCacheIds.end(); ++it)
|
for (it = m_staticCacheIds.begin(); it != m_staticCacheIds.end(); ++it)
|
||||||
TImageCache::instance()->remove(*it);
|
TImageCache::instance()->remove(*it);
|
||||||
|
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------------
|
||||||
|
|
|
@ -67,18 +67,30 @@ public:
|
||||||
std::map<TCacheResourceP, PredictionData> m_resources;
|
std::map<TCacheResourceP, PredictionData> m_resources;
|
||||||
QMutex m_mutex;
|
QMutex m_mutex;
|
||||||
|
|
||||||
public:
|
|
||||||
//Active getResource(..) callback
|
|
||||||
typedef void (TPredictiveCacheManager::Imp::*GetResourceFuncPtr)(TCacheResourceP &resource, const string &alias,
|
|
||||||
const TFxP &fx, double frame, const TRenderSettings &rs,
|
|
||||||
ResourceDeclaration *resData);
|
|
||||||
|
|
||||||
GetResourceFuncPtr m_getResFuncPtr;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Imp()
|
Imp()
|
||||||
: m_renderStatus(TRenderer::IDLE), m_getResFuncPtr(&Imp::getResourceComputing), m_enabled(TRenderer::instance().isPrecomputingEnabled()) {}
|
: m_renderStatus(TRenderer::IDLE)
|
||||||
|
, m_enabled(TRenderer::instance().isPrecomputingEnabled())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void run(
|
||||||
|
TCacheResourceP &resource, const string &alias,
|
||||||
|
const TFxP &fx, double frame, const TRenderSettings &rs,
|
||||||
|
ResourceDeclaration *resData)
|
||||||
|
{
|
||||||
|
switch (m_renderStatus) {
|
||||||
|
case TRenderer::IDLE:
|
||||||
|
case TRenderer::COMPUTING:
|
||||||
|
getResourceComputing(resource, alias, fx, frame, rs, resData);
|
||||||
|
break;
|
||||||
|
case TRenderer::TESTRUN:
|
||||||
|
getResourceTestRun(resource, alias, fx, frame, rs, resData);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
void getResourceTestRun(
|
void getResourceTestRun(
|
||||||
TCacheResourceP &resource, const string &alias,
|
TCacheResourceP &resource, const string &alias,
|
||||||
const TFxP &fx, double frame, const TRenderSettings &rs,
|
const TFxP &fx, double frame, const TRenderSettings &rs,
|
||||||
|
@ -103,7 +115,6 @@ TPredictiveCacheManager::TPredictiveCacheManager()
|
||||||
|
|
||||||
TPredictiveCacheManager::~TPredictiveCacheManager()
|
TPredictiveCacheManager::~TPredictiveCacheManager()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -128,7 +139,7 @@ void TPredictiveCacheManager::getResource(
|
||||||
if (!m_imp->m_enabled)
|
if (!m_imp->m_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
(m_imp->*(m_imp->m_getResFuncPtr))(resource, alias, fx, frame, rs, resData);
|
m_imp->run(resource, alias, fx, frame, rs, resData);
|
||||||
}
|
}
|
||||||
|
|
||||||
//************************************************************************************************
|
//************************************************************************************************
|
||||||
|
@ -207,11 +218,6 @@ void TPredictiveCacheManager::Imp::getResourceComputing(
|
||||||
void TPredictiveCacheManager::onRenderStatusStart(int renderStatus)
|
void TPredictiveCacheManager::onRenderStatusStart(int renderStatus)
|
||||||
{
|
{
|
||||||
m_imp->m_renderStatus = renderStatus;
|
m_imp->m_renderStatus = renderStatus;
|
||||||
switch (renderStatus) {
|
|
||||||
case TRenderer::TESTRUN:
|
|
||||||
m_imp->m_getResFuncPtr = &TPredictiveCacheManager::Imp::getResourceTestRun;
|
|
||||||
CASE TRenderer::COMPUTING : m_imp->m_getResFuncPtr = &TPredictiveCacheManager::Imp::getResourceComputing;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -130,7 +130,6 @@ TStencilControl::TStencilControl()
|
||||||
|
|
||||||
TStencilControl::~TStencilControl()
|
TStencilControl::~TStencilControl()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
|
@ -330,8 +330,8 @@ TMeshImage::TMeshImage()
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
|
||||||
TMeshImage::TMeshImage(Imp *imp)
|
TMeshImage::TMeshImage(std::shared_ptr<Imp> imp)
|
||||||
: m_imp(imp)
|
: m_imp(std::move(imp))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +339,6 @@ TMeshImage::TMeshImage(Imp *imp)
|
||||||
|
|
||||||
TMeshImage::~TMeshImage()
|
TMeshImage::~TMeshImage()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
|
|
|
@ -351,16 +351,16 @@ public:
|
||||||
|
|
||||||
~Imp() {}
|
~Imp() {}
|
||||||
|
|
||||||
void copy(Imp *src)
|
void copy(Imp& src)
|
||||||
{
|
{
|
||||||
m_grammar = src->m_grammar;
|
m_grammar = src.m_grammar;
|
||||||
m_measureName = src->m_measureName;
|
m_measureName = src.m_measureName;
|
||||||
m_measure = src->m_measure;
|
m_measure = src.m_measure;
|
||||||
m_defaultValue = src->m_defaultValue;
|
m_defaultValue = src.m_defaultValue;
|
||||||
m_minValue = src->m_minValue;
|
m_minValue = src.m_minValue;
|
||||||
m_maxValue = src->m_maxValue;
|
m_maxValue = src.m_maxValue;
|
||||||
m_keyframes = src->m_keyframes;
|
m_keyframes = src.m_keyframes;
|
||||||
m_cycleEnabled = src->m_cycleEnabled;
|
m_cycleEnabled = src.m_cycleEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void notify(const TParamChange &change)
|
void notify(const TParamChange &change)
|
||||||
|
@ -496,14 +496,13 @@ TDoubleParam::TDoubleParam(double v)
|
||||||
TDoubleParam::TDoubleParam(const TDoubleParam &src)
|
TDoubleParam::TDoubleParam(const TDoubleParam &src)
|
||||||
: TParam(src.getName()), m_imp(new TDoubleParam::Imp())
|
: TParam(src.getName()), m_imp(new TDoubleParam::Imp())
|
||||||
{
|
{
|
||||||
m_imp->copy(src.m_imp);
|
m_imp->copy(*src.m_imp);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
TDoubleParam::~TDoubleParam()
|
TDoubleParam::~TDoubleParam()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
@ -511,7 +510,7 @@ TDoubleParam::~TDoubleParam()
|
||||||
TDoubleParam &TDoubleParam::operator=(const TDoubleParam &dp)
|
TDoubleParam &TDoubleParam::operator=(const TDoubleParam &dp)
|
||||||
{
|
{
|
||||||
setName(dp.getName());
|
setName(dp.getName());
|
||||||
m_imp->copy(dp.m_imp);
|
m_imp->copy(*dp.m_imp);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,7 +522,7 @@ void TDoubleParam::copy(TParam *src)
|
||||||
if (!p)
|
if (!p)
|
||||||
throw TException("invalid source for copy");
|
throw TException("invalid source for copy");
|
||||||
setName(src->getName());
|
setName(src->getName());
|
||||||
m_imp->copy(p->m_imp);
|
m_imp->copy(*p->m_imp);
|
||||||
|
|
||||||
m_imp->notify(TParamChange(this, 0, 0, true, false, false));
|
m_imp->notify(TParamChange(this, 0, 0, true, false, false));
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ class TEnumParamImp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
vector<pair<int, string>> m_items;
|
vector<pair<int, string>> m_items;
|
||||||
void copy(TEnumParamImp *src)
|
void copy(std::unique_ptr<TEnumParamImp>& src)
|
||||||
{
|
{
|
||||||
m_items.clear();
|
m_items.clear();
|
||||||
std::back_insert_iterator<std::vector<pair<int, string>>> bii(m_items);
|
std::back_insert_iterator<std::vector<pair<int, string>>> bii(m_items);
|
||||||
|
@ -171,7 +171,6 @@ void TEnumParam::copy(TParam *src)
|
||||||
|
|
||||||
TEnumParam::~TEnumParam()
|
TEnumParam::~TEnumParam()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
|
@ -37,7 +37,6 @@ TParamContainer::TParamContainer()
|
||||||
|
|
||||||
TParamContainer::~TParamContainer()
|
TParamContainer::~TParamContainer()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParamContainer::setParamObserver(TParamObserver *observer)
|
void TParamContainer::setParamObserver(TParamObserver *observer)
|
||||||
|
|
|
@ -103,23 +103,22 @@ public:
|
||||||
|
|
||||||
TParamSet::TParamSet(string name)
|
TParamSet::TParamSet(string name)
|
||||||
: TParam(name)
|
: TParam(name)
|
||||||
|
, m_imp(new TParamSetImp(this))
|
||||||
{
|
{
|
||||||
m_imp = new TParamSetImp(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
TParamSet::TParamSet(const TParamSet &src)
|
TParamSet::TParamSet(const TParamSet &src)
|
||||||
: TParam(src.getName())
|
: TParam(src.getName())
|
||||||
|
, m_imp(new TParamSetImp(this))
|
||||||
{
|
{
|
||||||
m_imp = new TParamSetImp(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
TParamSet::~TParamSet()
|
TParamSet::~TParamSet()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
|
@ -113,9 +113,8 @@ PERSIST_IDENTIFIER(TSpectrumParam, "spectrumParam")
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
TSpectrumParam::TSpectrumParam()
|
TSpectrumParam::TSpectrumParam(): m_imp(new TSpectrumParamImp(this)) //brutto...
|
||||||
{
|
{
|
||||||
m_imp = new TSpectrumParamImp(this); //brutto...
|
|
||||||
ColorKeyParam ck1(TDoubleParamP(0.0), TPixelParamP(TPixel32::Black));
|
ColorKeyParam ck1(TDoubleParamP(0.0), TPixelParamP(TPixel32::Black));
|
||||||
ColorKeyParam ck2(TDoubleParamP(1.0), TPixelParamP(TPixel32::White));
|
ColorKeyParam ck2(TDoubleParamP(1.0), TPixelParamP(TPixel32::White));
|
||||||
m_imp->addKey(ck1);
|
m_imp->addKey(ck1);
|
||||||
|
@ -126,8 +125,8 @@ TSpectrumParam::TSpectrumParam()
|
||||||
|
|
||||||
TSpectrumParam::TSpectrumParam(const TSpectrumParam &src)
|
TSpectrumParam::TSpectrumParam(const TSpectrumParam &src)
|
||||||
: TParam(src.getName())
|
: TParam(src.getName())
|
||||||
|
, m_imp(new TSpectrumParamImp(*src.m_imp))
|
||||||
{
|
{
|
||||||
m_imp = new TSpectrumParamImp(*src.m_imp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
@ -147,8 +146,8 @@ void TSpectrumParam::removeObserver(TParamObserver *obs)
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
TSpectrumParam::TSpectrumParam(int keyCount, TSpectrum::ColorKey keys[])
|
TSpectrumParam::TSpectrumParam(int keyCount, TSpectrum::ColorKey keys[])
|
||||||
|
: m_imp(new TSpectrumParamImp(this))
|
||||||
{
|
{
|
||||||
m_imp = new TSpectrumParamImp(this);
|
|
||||||
for (int i = 0; i < keyCount; i++) {
|
for (int i = 0; i < keyCount; i++) {
|
||||||
double v = keys[i].first;
|
double v = keys[i].first;
|
||||||
TPixel32 pix = keys[i].second;
|
TPixel32 pix = keys[i].second;
|
||||||
|
@ -175,7 +174,6 @@ void TSpectrumParam::copy(TParam *src)
|
||||||
|
|
||||||
TSpectrumParam::~TSpectrumParam()
|
TSpectrumParam::~TSpectrumParam()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
|
@ -201,7 +201,6 @@ ImageMeshesReader::ImageMeshesReader()
|
||||||
|
|
||||||
ImageMeshesReader::~ImageMeshesReader()
|
ImageMeshesReader::~ImageMeshesReader()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -647,7 +647,6 @@ TSoundOutputDevice::~TSoundOutputDevice()
|
||||||
close();
|
close();
|
||||||
WaitForSingleObject(m_imp->m_closeDevice, INFINITE);
|
WaitForSingleObject(m_imp->m_closeDevice, INFINITE);
|
||||||
CloseHandle(m_imp->m_closeDevice);
|
CloseHandle(m_imp->m_closeDevice);
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -1111,14 +1110,14 @@ void WinSoundInputDevice::stop()
|
||||||
class RecordTask : public TThread::Runnable
|
class RecordTask : public TThread::Runnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RecordTask(TSoundInputDeviceImp *dev)
|
RecordTask(std::shared_ptr<TSoundInputDeviceImp> dev)
|
||||||
: Runnable(), m_dev(dev) {}
|
: Runnable(), m_dev(std::move(dev)) {}
|
||||||
|
|
||||||
~RecordTask() {}
|
~RecordTask() {}
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
TSoundInputDeviceImp *m_dev;
|
std::shared_ptr<TSoundInputDeviceImp> m_dev;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1268,7 +1267,6 @@ TSoundInputDevice::TSoundInputDevice() : m_imp(new TSoundInputDeviceImp())
|
||||||
|
|
||||||
TSoundInputDevice::~TSoundInputDevice()
|
TSoundInputDevice::~TSoundInputDevice()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
@ -256,8 +256,8 @@ TOStream::TOStream(const TFilePath &fp, bool compressed)
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
|
|
||||||
TOStream::TOStream(Imp *imp)
|
TOStream::TOStream(std::shared_ptr<Imp> imp)
|
||||||
: m_imp(imp)
|
: m_imp(std::move(imp))
|
||||||
{
|
{
|
||||||
assert(!imp->m_tagStack.empty());
|
assert(!imp->m_tagStack.empty());
|
||||||
ostream &os = *m_imp->m_os;
|
ostream &os = *m_imp->m_os;
|
||||||
|
@ -314,7 +314,6 @@ TOStream::~TOStream()
|
||||||
}
|
}
|
||||||
if (m_imp->m_chanOwner)
|
if (m_imp->m_chanOwner)
|
||||||
delete m_imp->m_os;
|
delete m_imp->m_os;
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
}
|
}
|
||||||
|
@ -497,12 +496,11 @@ TOStream::operator bool() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
|
|
||||||
TOStream TOStream::child(string tagName)
|
TOStream TOStream::child(string tagName)
|
||||||
{
|
{
|
||||||
assert(tagName != "");
|
assert(tagName != "");
|
||||||
m_imp->m_tagStack.push_back(tagName);
|
m_imp->m_tagStack.push_back(tagName);
|
||||||
return TOStream(m_imp);
|
return m_imp;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
|
@ -981,7 +979,6 @@ TIStream::~TIStream()
|
||||||
{
|
{
|
||||||
if (m_imp->m_chanOwner)
|
if (m_imp->m_chanOwner)
|
||||||
delete m_imp->m_is;
|
delete m_imp->m_is;
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
|
|
|
@ -12,49 +12,6 @@
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
/*
|
|
||||||
class TLogger::Imp {
|
|
||||||
public:
|
|
||||||
std::ofstream m_os;
|
|
||||||
TThread::Mutex m_mutex;
|
|
||||||
|
|
||||||
Imp(const TFilePath &fp)
|
|
||||||
: m_os(toString(fp.getWideString()).c_str(), std::ios_base::out | std::ios_base::app)
|
|
||||||
, m_mutex()
|
|
||||||
{
|
|
||||||
TTime t = TSystem::getCurrentTime();
|
|
||||||
m_os << "========================" << std::endl;
|
|
||||||
m_os << t.getDate() << " " << t.getTime() << endl;
|
|
||||||
m_os << "Start logging" << endl << endl;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
TLogger::TLogger()
|
|
||||||
: m_imp(new Imp(TSystem::getTempDir() + "log.txt"))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TLogger::~TLogger()
|
|
||||||
{
|
|
||||||
delete m_imp;
|
|
||||||
}
|
|
||||||
|
|
||||||
TLogger *TLogger::instance()
|
|
||||||
{
|
|
||||||
static TLogger _instance;
|
|
||||||
return &_instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void TLogger::print(string module, string msg)
|
|
||||||
{
|
|
||||||
QMutexLocker sl(m_imp->m_mutex);
|
|
||||||
m_imp->m_os << module << " : " << msg << std::endl;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
class TLogger::Imp
|
class TLogger::Imp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -96,7 +53,6 @@ TLogger::TLogger()
|
||||||
|
|
||||||
TLogger::~TLogger()
|
TLogger::~TLogger()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TLogger *TLogger::instance()
|
TLogger *TLogger::instance()
|
||||||
|
|
|
@ -529,8 +529,6 @@ TL2LAutocloser::TL2LAutocloser()
|
||||||
|
|
||||||
TL2LAutocloser::~TL2LAutocloser()
|
TL2LAutocloser::~TL2LAutocloser()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
m_imp = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef T_L2LAUTOCLOSER_H
|
#ifndef T_L2LAUTOCLOSER_H
|
||||||
#define T_L2LAUTOCLOSER_H
|
#define T_L2LAUTOCLOSER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
|
|
||||||
#undef DVAPI
|
#undef DVAPI
|
||||||
|
@ -28,7 +28,7 @@ class TStroke;
|
||||||
class DVAPI TL2LAutocloser
|
class DVAPI TL2LAutocloser
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TL2LAutocloser();
|
TL2LAutocloser();
|
||||||
|
|
|
@ -144,7 +144,6 @@ TRegion::TRegion()
|
||||||
|
|
||||||
TRegion::~TRegion()
|
TRegion::~TRegion()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -1276,7 +1276,7 @@ TStroke::TStroke()
|
||||||
p[1] = p[0];
|
p[1] = p[0];
|
||||||
p[2] = p[1];
|
p[2] = p[1];
|
||||||
|
|
||||||
m_imp = new TStroke::Imp(p);
|
m_imp.reset(new TStroke::Imp(p));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// da fissare deve trovarsi prima della init
|
// da fissare deve trovarsi prima della init
|
||||||
|
@ -1289,32 +1289,30 @@ TStroke::TStroke()
|
||||||
// Build a stroke from a set of ThickPoint
|
// Build a stroke from a set of ThickPoint
|
||||||
TStroke::TStroke(const vector<TThickPoint> &v)
|
TStroke::TStroke(const vector<TThickPoint> &v)
|
||||||
: TSmartObject(m_classCode)
|
: TSmartObject(m_classCode)
|
||||||
|
, m_imp(new TStroke::Imp(v))
|
||||||
{
|
{
|
||||||
m_imp = new TStroke::Imp(v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
TStroke::TStroke(const vector<TPointD> &v)
|
TStroke::TStroke(const vector<TPointD> &v)
|
||||||
: TSmartObject(m_classCode)
|
: TSmartObject(m_classCode)
|
||||||
|
, m_imp(new TStroke::Imp(v))
|
||||||
{
|
{
|
||||||
m_imp = new TStroke::Imp(v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
TStroke::~TStroke()
|
TStroke::~TStroke()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
TStroke::TStroke(const TStroke &other)
|
TStroke::TStroke(const TStroke &other)
|
||||||
: TSmartObject(m_classCode)
|
: TSmartObject(m_classCode)
|
||||||
|
, m_imp(new TStroke::Imp())
|
||||||
{
|
{
|
||||||
m_imp = new TStroke::Imp();
|
|
||||||
|
|
||||||
m_imp->m_bBox = other.getBBox();
|
m_imp->m_bBox = other.getBBox();
|
||||||
m_imp->m_isValidLength = other.m_imp->m_isValidLength;
|
m_imp->m_isValidLength = other.m_imp->m_isValidLength;
|
||||||
m_imp->m_isOutlineValid = other.m_imp->m_isOutlineValid;
|
m_imp->m_isOutlineValid = other.m_imp->m_isOutlineValid;
|
||||||
|
|
|
@ -104,8 +104,8 @@ TVectorImage::Imp::~Imp()
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
TVectorImage::TVectorImage(bool loaded)
|
TVectorImage::TVectorImage(bool loaded)
|
||||||
|
: m_imp(new TVectorImage::Imp(this))
|
||||||
{
|
{
|
||||||
m_imp = new TVectorImage::Imp(this);
|
|
||||||
if (loaded)
|
if (loaded)
|
||||||
m_imp->m_justLoaded = true;
|
m_imp->m_justLoaded = true;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,6 @@ TVectorImage::TVectorImage(bool loaded)
|
||||||
|
|
||||||
TVectorImage::~TVectorImage()
|
TVectorImage::~TVectorImage()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -709,7 +709,6 @@ TInbetween::TInbetween(const TVectorImageP firstImage, const TVectorImageP lastI
|
||||||
|
|
||||||
TInbetween::~TInbetween()
|
TInbetween::~TInbetween()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
|
|
@ -83,7 +83,7 @@ public:
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
WIN32Implementation(TDimension rasterSize, const TOfflineGL::Imp *shared = 0)
|
WIN32Implementation(TDimension rasterSize, std::shared_ptr<TOfflineGL::Imp> shared)
|
||||||
: TOfflineGL::Imp(rasterSize.lx, rasterSize.ly)
|
: TOfflineGL::Imp(rasterSize.lx, rasterSize.ly)
|
||||||
{
|
{
|
||||||
m_offData = 0;
|
m_offData = 0;
|
||||||
|
@ -157,7 +157,7 @@ public:
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void createContext(TDimension rasterSize, const TOfflineGL::Imp *shared)
|
void createContext(TDimension rasterSize, std::shared_ptr<TOfflineGL::Imp> shared)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&win32ImpMutex);
|
QMutexLocker locker(&win32ImpMutex);
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ public:
|
||||||
|
|
||||||
if (shared) {
|
if (shared) {
|
||||||
// Share shared's display lists
|
// Share shared's display lists
|
||||||
const WIN32Implementation *sharedImp = dynamic_cast<const WIN32Implementation *>(shared);
|
const WIN32Implementation *sharedImp = dynamic_cast<const WIN32Implementation *>(shared.get());
|
||||||
assert(sharedImp);
|
assert(sharedImp);
|
||||||
|
|
||||||
bool ok = wglShareLists(sharedImp->m_hglRC, m_hglRC);
|
bool ok = wglShareLists(sharedImp->m_hglRC, m_hglRC);
|
||||||
|
@ -298,9 +298,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
// default imp generator
|
// default imp generator
|
||||||
TOfflineGL::Imp *defaultOfflineGLGenerator(const TDimension &dim, const TOfflineGL::Imp *shared)
|
std::shared_ptr<TOfflineGL::Imp> defaultOfflineGLGenerator(const TDimension &dim, std::shared_ptr<TOfflineGL::Imp> shared)
|
||||||
{
|
{
|
||||||
return new WIN32Implementation(dim, shared);
|
return std::make_shared<WIN32Implementation>(dim, shared);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -502,16 +502,16 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TOfflineGL::Imp *defaultOfflineGLGenerator(const TDimension &dim)
|
std::shared_ptr<TOfflineGL::Imp> defaultOfflineGLGenerator(const TDimension &dim, std::shared_ptr<TOfflineGL::Imp> shared)
|
||||||
{
|
{
|
||||||
return new XImplementation(dim);
|
return std::make_shared<XImplementation>(dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif MACOSX
|
#elif MACOSX
|
||||||
|
|
||||||
TOfflineGL::Imp *defaultOfflineGLGenerator(const TDimension &dim, const TOfflineGL::Imp *shared)
|
std::shared_ptr<TOfflineGL::Imp> defaultOfflineGLGenerator(const TDimension &dim, std::shared_ptr<TOfflineGL::Imp> shared)
|
||||||
{
|
{
|
||||||
return new QtOfflineGL(dim, shared);
|
return std::make_shared<QtOfflineGL>(dim, shared);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -538,11 +538,11 @@ class MessageCreateContext : public TThread::Message
|
||||||
|
|
||||||
TOfflineGL *m_ogl;
|
TOfflineGL *m_ogl;
|
||||||
TDimension m_size;
|
TDimension m_size;
|
||||||
const TOfflineGL::Imp *m_shared;
|
std::shared_ptr<TOfflineGL::Imp> m_shared;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MessageCreateContext(TOfflineGL *ogl, const TDimension &size, const TOfflineGL::Imp *shared)
|
MessageCreateContext(TOfflineGL *ogl, const TDimension &size, std::shared_ptr<TOfflineGL::Imp> shared)
|
||||||
: m_ogl(ogl), m_size(size), m_shared(shared) {}
|
: m_ogl(ogl), m_size(size), m_shared(std::move(shared)) {}
|
||||||
|
|
||||||
void onDeliver()
|
void onDeliver()
|
||||||
{
|
{
|
||||||
|
@ -560,19 +560,18 @@ public:
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
TOfflineGL::TOfflineGL(TDimension dim, const TOfflineGL *shared)
|
TOfflineGL::TOfflineGL(TDimension dim, const TOfflineGL *shared)
|
||||||
: m_imp(0)
|
|
||||||
{
|
{
|
||||||
#if defined(LINUX)
|
#if defined(LINUX)
|
||||||
XScopedLock xsl;
|
XScopedLock xsl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const TOfflineGL::Imp *sharedImp = shared ? shared->m_imp : 0;
|
std::shared_ptr<Imp> sharedImp = shared ? shared->m_imp : 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
元のコードは(別スレッドから呼び出すための) offline renderer を作って main thread に dispatch するという訳のわからないことをしていたが Q*GLContext は thread context を超えられないので直接生成してこのコンテキストで閉じる.
|
元のコードは(別スレッドから呼び出すための) offline renderer を作って main thread に dispatch するという訳のわからないことをしていたが Q*GLContext は thread context を超えられないので直接生成してこのコンテキストで閉じる.
|
||||||
別スレッドには dispatch しない.
|
別スレッドには dispatch しない.
|
||||||
*/
|
*/
|
||||||
m_imp = currentImpGenerator(dim, sharedImp);
|
m_imp = currentImpGenerator(dim, std::move(sharedImp));
|
||||||
|
|
||||||
initMatrix();
|
initMatrix();
|
||||||
}
|
}
|
||||||
|
@ -585,8 +584,6 @@ TOfflineGL::TOfflineGL(const TRaster32P &raster, const TOfflineGL *shared)
|
||||||
XScopedLock xsl;
|
XScopedLock xsl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//m_imp = new Imp(raster->getSize());
|
|
||||||
|
|
||||||
m_imp = currentImpGenerator(raster->getSize(), shared->m_imp);
|
m_imp = currentImpGenerator(raster->getSize(), shared->m_imp);
|
||||||
|
|
||||||
initMatrix();
|
initMatrix();
|
||||||
|
@ -601,7 +598,6 @@ TOfflineGL::TOfflineGL(const TRaster32P &raster, const TOfflineGL *shared)
|
||||||
|
|
||||||
TOfflineGL::~TOfflineGL()
|
TOfflineGL::~TOfflineGL()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -189,8 +189,8 @@ struct TStrokePointDeformation::Imp {
|
||||||
|
|
||||||
TStrokePointDeformation::TStrokePointDeformation(const TPointD ¢er,
|
TStrokePointDeformation::TStrokePointDeformation(const TPointD ¢er,
|
||||||
double radius)
|
double radius)
|
||||||
|
: m_imp(new Imp(center, radius))
|
||||||
{
|
{
|
||||||
m_imp = new Imp(center, radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -198,15 +198,14 @@ TStrokePointDeformation::TStrokePointDeformation(const TPointD ¢er,
|
||||||
TStrokePointDeformation::TStrokePointDeformation(const TPointD &vect,
|
TStrokePointDeformation::TStrokePointDeformation(const TPointD &vect,
|
||||||
const TPointD ¢er,
|
const TPointD ¢er,
|
||||||
double radius)
|
double radius)
|
||||||
|
: m_imp(new Imp(vect, center, radius))
|
||||||
{
|
{
|
||||||
m_imp = new Imp(vect, center, radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
TStrokePointDeformation::~TStrokePointDeformation()
|
TStrokePointDeformation::~TStrokePointDeformation()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef MESHTEXTURIZER_H
|
#ifndef MESHTEXTURIZER_H
|
||||||
#define MESHTEXTURIZER_H
|
#define MESHTEXTURIZER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "traster.h"
|
#include "traster.h"
|
||||||
#include "tgl.h" // OpenGL includes
|
#include "tgl.h" // OpenGL includes
|
||||||
|
@ -95,7 +95,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Not copyable
|
// Not copyable
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef PLASTICDEFORMER_H
|
#ifndef PLASTICDEFORMER_H
|
||||||
#define PLASTICDEFORMER_H
|
#define PLASTICDEFORMER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
#include "tmeshimage.h"
|
#include "tmeshimage.h"
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
class DVAPI PlasticDeformer
|
class DVAPI PlasticDeformer
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PlasticDeformer();
|
PlasticDeformer();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef PLASTIDEFORMERSTORAGE_H
|
#ifndef PLASTIDEFORMERSTORAGE_H
|
||||||
#define PLASTIDEFORMERSTORAGE_H
|
#define PLASTIDEFORMERSTORAGE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzExt includes
|
// TnzExt includes
|
||||||
#include "ext/plasticdeformer.h"
|
#include "ext/plasticdeformer.h"
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ private:
|
||||||
class DVAPI PlasticDeformerStorage
|
class DVAPI PlasticDeformerStorage
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum DataType {
|
enum DataType {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef PLASTICSKELETON_H
|
#ifndef PLASTICSKELETON_H
|
||||||
#define PLASTICSKELETON_H
|
#define PLASTICSKELETON_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
#include "tpersist.h"
|
#include "tpersist.h"
|
||||||
|
@ -102,7 +102,7 @@ class DVAPI PlasticSkeleton : public TSmartObject, public tcg::Mesh<PlasticSkele
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef tcg::Mesh<PlasticSkeletonVertex, tcg::Edge, tcg::FaceN<3>> mesh_type;
|
typedef tcg::Mesh<PlasticSkeletonVertex, tcg::Edge, tcg::FaceN<3>> mesh_type;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef PLASTICSKELETONDEFORMATION_H
|
#ifndef PLASTICSKELETONDEFORMATION_H
|
||||||
#define PLASTICSKELETONDEFORMATION_H
|
#define PLASTICSKELETONDEFORMATION_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
#include "tdoubleparam.h"
|
#include "tdoubleparam.h"
|
||||||
|
@ -139,7 +139,7 @@ class DVAPI PlasticSkeletonDeformation : public TSmartObject, public TPersist
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef tcg::any_it<int, int, void *>::bidirectional skelId_iterator;
|
typedef tcg::any_it<int, int, void *>::bidirectional skelId_iterator;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef PERMISSIONSMANAGER_INCLUDED
|
#ifndef PERMISSIONSMANAGER_INCLUDED
|
||||||
#define PERMISSIONSMANAGER_INCLUDED
|
#define PERMISSIONSMANAGER_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PermissionsManager();
|
PermissionsManager();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef SHADINGCONTEXT_H
|
#ifndef SHADINGCONTEXT_H
|
||||||
#define SHADINGCONTEXT_H
|
#define SHADINGCONTEXT_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// Glew include
|
// Glew include
|
||||||
#include <GL/glew.h>
|
#include <GL/glew.h>
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Imp;
|
struct Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
// Not copyable
|
// Not copyable
|
||||||
ShadingContext(const ShadingContext &);
|
ShadingContext(const ShadingContext &);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TCLI_INCLUDED
|
#ifndef TCLI_INCLUDED
|
||||||
#define TCLI_INCLUDED
|
#define TCLI_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
//#include "tcommon.h" contenuto in tconvert.h
|
//#include "tcommon.h" contenuto in tconvert.h
|
||||||
#include "tconvert.h"
|
#include "tconvert.h"
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ class UsageImp;
|
||||||
|
|
||||||
class DVAPI Usage
|
class DVAPI Usage
|
||||||
{
|
{
|
||||||
UsageImp *m_imp;
|
std::unique_ptr<UsageImp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Usage(string progName);
|
Usage(string progName);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TDOUBLEPARAM_H
|
#ifndef TDOUBLEPARAM_H
|
||||||
#define TDOUBLEPARAM_H
|
#define TDOUBLEPARAM_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
#include "tfilepath.h"
|
#include "tfilepath.h"
|
||||||
|
@ -55,7 +55,7 @@ class DVAPI TDoubleParam : public TParam
|
||||||
PERSIST_DECLARATION(TDoubleParam)
|
PERSIST_DECLARATION(TDoubleParam)
|
||||||
|
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TDoubleParam(double v = 0.0);
|
TDoubleParam(double v = 0.0);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TEXPRESSION_INCLUDED
|
#ifndef TEXPRESSION_INCLUDED
|
||||||
#define TEXPRESSION_INCLUDED
|
#define TEXPRESSION_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class Calculator;
|
||||||
class DVAPI TExpression
|
class DVAPI TExpression
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TExpression();
|
TExpression();
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TFARMSERVER_H
|
#ifndef TFARMSERVER_H
|
||||||
#define TFARMSERVER_H
|
#define TFARMSERVER_H
|
||||||
|
|
||||||
//#include "texception.h"
|
#include <memory>
|
||||||
//#include "tconvert.h"
|
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -87,7 +85,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TFARMTASK_H
|
#ifndef TFARMTASK_H
|
||||||
#define TFARMTASK_H
|
#define TFARMTASK_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <qdatetime>
|
#include <qdatetime>
|
||||||
#include "tpersist.h"
|
#include "tpersist.h"
|
||||||
#include "tfarmplatforms.h"
|
#include "tfarmplatforms.h"
|
||||||
|
@ -196,7 +196,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TFX_INCLUDED
|
#ifndef TFX_INCLUDED
|
||||||
#define TFX_INCLUDED
|
#define TFX_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
#include "tpersist.h"
|
#include "tpersist.h"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TFXCACHEMANAGER_H
|
#ifndef TFXCACHEMANAGER_H
|
||||||
#define TFXCACHEMANAGER_H
|
#define TFXCACHEMANAGER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "trenderresourcemanager.h"
|
#include "trenderresourcemanager.h"
|
||||||
#include "tcacheresource.h"
|
#include "tcacheresource.h"
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ private:
|
||||||
std::set<std::string> m_staticCacheIds;
|
std::set<std::string> m_staticCacheIds;
|
||||||
|
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TFxCacheManager();
|
TFxCacheManager();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TGRAMMAR_INCLUDED
|
#ifndef TGRAMMAR_INCLUDED
|
||||||
#define TGRAMMAR_INCLUDED
|
#define TGRAMMAR_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ public:
|
||||||
class DVAPI Grammar
|
class DVAPI Grammar
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Grammar();
|
Grammar();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TIMAGECACHE_H
|
#ifndef TIMAGECACHE_H
|
||||||
#define TIMAGECACHE_H
|
#define TIMAGECACHE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
#include "timage.h"
|
#include "timage.h"
|
||||||
|
@ -55,7 +55,7 @@ of system memory. This is especially true on 32-bit OSes.
|
||||||
class DVAPI TImageCache
|
class DVAPI TImageCache
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TImageCache *instance();
|
static TImageCache *instance();
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TINBETWEEN_H
|
#ifndef TINBETWEEN_H
|
||||||
#define TINBETWEEN_H
|
#define TINBETWEEN_H
|
||||||
|
|
||||||
//#include "tvectorimage.h"
|
#include <memory>
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
class TVectorImageP;
|
class TVectorImageP;
|
||||||
|
@ -21,9 +19,8 @@ class TVectorImageP;
|
||||||
|
|
||||||
class DVAPI TInbetween
|
class DVAPI TInbetween
|
||||||
{
|
{
|
||||||
|
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TInbetween(const TVectorImageP firstImage, const TVectorImageP lastImage);
|
TInbetween(const TVectorImageP firstImage, const TVectorImageP lastImage);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TLOGGER_INCLUDED
|
#ifndef TLOGGER_INCLUDED
|
||||||
#define TLOGGER_INCLUDED
|
#define TLOGGER_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
//
|
//
|
||||||
// TLogger
|
// TLogger
|
||||||
//
|
//
|
||||||
|
@ -34,7 +34,7 @@ class TFilePath;
|
||||||
class DVAPI TLogger
|
class DVAPI TLogger
|
||||||
{ // singleton
|
{ // singleton
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
TLogger();
|
TLogger();
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TMESHIMAGE_INCLUDED
|
#ifndef TMESHIMAGE_INCLUDED
|
||||||
#define TMESHIMAGE_INCLUDED
|
#define TMESHIMAGE_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
#include "tpersist.h"
|
#include "tpersist.h"
|
||||||
|
@ -172,14 +172,14 @@ struct graph_traits<TTextureMesh>
|
||||||
class DVAPI TMeshImage : public TImage
|
class DVAPI TMeshImage : public TImage
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::shared_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef std::vector<TTextureMeshP> meshes_container;
|
typedef std::vector<TTextureMeshP> meshes_container;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TMeshImage();
|
TMeshImage();
|
||||||
TMeshImage(Imp *imp);
|
TMeshImage(std::shared_ptr<Imp> imp);
|
||||||
~TMeshImage();
|
~TMeshImage();
|
||||||
|
|
||||||
TMeshImage(const TMeshImage &other);
|
TMeshImage(const TMeshImage &other);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TNOTANIMATABLEPARAM_H
|
#ifndef TNOTANIMATABLEPARAM_H
|
||||||
#define TNOTANIMATABLEPARAM_H
|
#define TNOTANIMATABLEPARAM_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tparam.h"
|
#include "tparam.h"
|
||||||
#include "tparamchange.h"
|
#include "tparamchange.h"
|
||||||
#include "tfilepath.h"
|
#include "tfilepath.h"
|
||||||
|
@ -331,7 +331,7 @@ public:
|
||||||
void saveData(TOStream &os);
|
void saveData(TOStream &os);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TEnumParamImp *m_imp;
|
std::unique_ptr<TEnumParamImp> m_imp;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TEnumParam TIntEnumParam;
|
typedef TEnumParam TIntEnumParam;
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TOFFLINEGL_INCLUDED
|
#ifndef TOFFLINEGL_INCLUDED
|
||||||
#define TOFFLINEGL_INCLUDED
|
#define TOFFLINEGL_INCLUDED
|
||||||
|
|
||||||
//#include "trasterimage.h"
|
#include <memory>
|
||||||
//#include "tvectorimage.h"
|
|
||||||
#include "tgl.h"
|
#include "tgl.h"
|
||||||
|
|
||||||
#undef DVAPI
|
#undef DVAPI
|
||||||
|
@ -47,12 +45,12 @@ public:
|
||||||
virtual ~Imp(){};
|
virtual ~Imp(){};
|
||||||
virtual void makeCurrent() = 0;
|
virtual void makeCurrent() = 0;
|
||||||
virtual void doneCurrent() = 0; // Da implementare in Imp
|
virtual void doneCurrent() = 0; // Da implementare in Imp
|
||||||
virtual void createContext(TDimension rasterSize, const TOfflineGL::Imp *shared) = 0;
|
virtual void createContext(TDimension rasterSize, std::shared_ptr<Imp> shared) = 0;
|
||||||
virtual void getRaster(TRaster32P) = 0;
|
virtual void getRaster(TRaster32P) = 0;
|
||||||
virtual int getLx() const { return m_lx; }
|
virtual int getLx() const { return m_lx; }
|
||||||
virtual int getLy() const { return m_ly; }
|
virtual int getLy() const { return m_ly; }
|
||||||
};
|
};
|
||||||
typedef Imp *ImpGenerator(const TDimension &dim, const TOfflineGL::Imp *shared);
|
typedef std::shared_ptr<Imp> ImpGenerator(const TDimension &dim, std::shared_ptr<Imp> shared);
|
||||||
static ImpGenerator *defineImpGenerator(ImpGenerator *impGenerator);
|
static ImpGenerator *defineImpGenerator(ImpGenerator *impGenerator);
|
||||||
|
|
||||||
TOfflineGL(TDimension dim, const TOfflineGL *shared = 0);
|
TOfflineGL(TDimension dim, const TOfflineGL *shared = 0);
|
||||||
|
@ -87,7 +85,7 @@ public:
|
||||||
static TOfflineGL *getStock(TDimension dim);
|
static TOfflineGL *getStock(TDimension dim);
|
||||||
// si usa cosi': TOfflineGL *ogl = TOfflineGL::getStock(d);
|
// si usa cosi': TOfflineGL *ogl = TOfflineGL::getStock(d);
|
||||||
// non bisogna liberare ogl
|
// non bisogna liberare ogl
|
||||||
Imp *m_imp;
|
std::shared_ptr<Imp> m_imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef _TAUTOCLOSE_H_
|
#ifndef _TAUTOCLOSE_H_
|
||||||
#define _TAUTOCLOSE_H_
|
#define _TAUTOCLOSE_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
#include "traster.h"
|
#include "traster.h"
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
//not implemented
|
//not implemented
|
||||||
TAutocloser();
|
TAutocloser();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef IMAGEMANAGER_H
|
#ifndef IMAGEMANAGER_H
|
||||||
#define IMAGEMANAGER_H
|
#define IMAGEMANAGER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "timage.h"
|
#include "timage.h"
|
||||||
#include "timageinfo.h"
|
#include "timageinfo.h"
|
||||||
|
@ -170,7 +170,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct Imp;
|
struct Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ImageManager();
|
ImageManager();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSYSLOG_H
|
#ifndef TSYSLOG_H
|
||||||
#define TSYSLOG_H
|
#define TSYSLOG_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
class TFilePath;
|
class TFilePath;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef T_STAGE_OBJECT_TREE_INCLUDED
|
#ifndef T_STAGE_OBJECT_TREE_INCLUDED
|
||||||
#define T_STAGE_OBJECT_TREE_INCLUDED
|
#define T_STAGE_OBJECT_TREE_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "toonz/tstageobject.h"
|
#include "toonz/tstageobject.h"
|
||||||
|
|
||||||
#undef DVAPI
|
#undef DVAPI
|
||||||
|
@ -70,7 +70,7 @@ class DVAPI TStageObjectTree : public TPersist
|
||||||
{
|
{
|
||||||
PERSIST_DECLARATION(TStageObjectTree)
|
PERSIST_DECLARATION(TStageObjectTree)
|
||||||
struct TStageObjectTreeImp;
|
struct TStageObjectTreeImp;
|
||||||
TStageObjectTreeImp *m_imp;
|
std::unique_ptr<TStageObjectTreeImp> m_imp;
|
||||||
|
|
||||||
// usato solo sotto #ifndef NDEBUG
|
// usato solo sotto #ifndef NDEBUG
|
||||||
void checkIntegrity();
|
void checkIntegrity();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef XSHEET_INCLUDED
|
#ifndef XSHEET_INCLUDED
|
||||||
#define XSHEET_INCLUDED
|
#define XSHEET_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "traster.h"
|
#include "traster.h"
|
||||||
#include "tpersist.h"
|
#include "tpersist.h"
|
||||||
|
@ -118,7 +118,7 @@ private:
|
||||||
The TXsheetImp struct provides all objects necessary to define the \b TXsheet class.
|
The TXsheetImp struct provides all objects necessary to define the \b TXsheet class.
|
||||||
*/
|
*/
|
||||||
struct TXsheetImp;
|
struct TXsheetImp;
|
||||||
TXsheetImp *m_imp;
|
std::unique_ptr<TXsheetImp> m_imp;
|
||||||
TXshNoteSet *m_notes;
|
TXshNoteSet *m_notes;
|
||||||
SoundProperties *m_soundProperties;
|
SoundProperties *m_soundProperties;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef INFOVIEWER_H
|
#ifndef INFOVIEWER_H
|
||||||
#define INFOVIEWER_H
|
#define INFOVIEWER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "toonzqt/dvdialog.h"
|
#include "toonzqt/dvdialog.h"
|
||||||
|
|
||||||
#undef DVAPI
|
#undef DVAPI
|
||||||
|
@ -23,7 +23,7 @@ class InfoViewerImp;
|
||||||
class DVAPI InfoViewer : public DVGui::Dialog
|
class DVAPI InfoViewer : public DVGui::Dialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
InfoViewerImp *m_imp;
|
std::unique_ptr<InfoViewerImp> m_imp;
|
||||||
QWidget *m_parent;
|
QWidget *m_parent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TPARAMCONTAINER_INCLUDED
|
#ifndef TPARAMCONTAINER_INCLUDED
|
||||||
#define TPARAMCONTAINER_INCLUDED
|
#define TPARAMCONTAINER_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tparam.h"
|
#include "tparam.h"
|
||||||
//#include "tfx.h"
|
//#include "tfx.h"
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
@ -69,7 +69,7 @@ public:
|
||||||
class DVAPI TParamContainer
|
class DVAPI TParamContainer
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TParamContainer();
|
TParamContainer();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TPARSER_INCLUDED
|
#ifndef TPARSER_INCLUDED
|
||||||
#define TPARSER_INCLUDED
|
#define TPARSER_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
#include "tgrammar.h"
|
#include "tgrammar.h"
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ struct DVAPI SyntaxToken {
|
||||||
class DVAPI Parser
|
class DVAPI Parser
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Parser(const Grammar *grammar);
|
Parser(const Grammar *grammar);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TPREDICTIVECACHEMANAGER_H
|
#ifndef TPREDICTIVECACHEMANAGER_H
|
||||||
#define TPREDICTIVECACHEMANAGER_H
|
#define TPREDICTIVECACHEMANAGER_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tfxcachemanager.h"
|
#include "tfxcachemanager.h"
|
||||||
|
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
|
@ -35,7 +35,7 @@ class DVAPI TPredictiveCacheManager
|
||||||
T_RENDER_RESOURCE_MANAGER
|
T_RENDER_RESOURCE_MANAGER
|
||||||
|
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TPredictiveCacheManager();
|
TPredictiveCacheManager();
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// tregion.h: interface for the TRegion class.
|
// tregion.h: interface for the TRegion class.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#if !defined(TREGION_H)
|
#if !defined(TREGION_H)
|
||||||
#define TREGION_H
|
#define TREGION_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#if _MSC_VER > 1000
|
#if _MSC_VER > 1000
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif // _MSC_VER > 1000
|
#endif // _MSC_VER > 1000
|
||||||
|
@ -165,7 +165,7 @@ typedef TSmartPointerT<TEdge> TEdgeP;
|
||||||
class DVAPI TRegion
|
class DVAPI TRegion
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TRegion();
|
TRegion();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TROP_BORDERS_H
|
#ifndef TROP_BORDERS_H
|
||||||
#define TROP_BORDERS_H
|
#define TROP_BORDERS_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
|
@ -159,7 +159,7 @@ typedef TSmartPointerT<ImageMesh> ImageMeshP;
|
||||||
class DVAPI ImageMeshesReader
|
class DVAPI ImageMeshesReader
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ImageMeshesReader();
|
ImageMeshesReader();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSMARTPOINTER_INCLUDED
|
#ifndef TSMARTPOINTER_INCLUDED
|
||||||
#define TSMARTPOINTER_INCLUDED
|
#define TSMARTPOINTER_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tutil.h"
|
#include "tutil.h"
|
||||||
#include "tatomicvar.h"
|
#include "tatomicvar.h"
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ class DVAPI TSmartPointerT
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
T *m_pointer;
|
T* m_pointer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TSmartPointerT() : m_pointer(0) {}
|
TSmartPointerT() : m_pointer(0) {}
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
m_pointer->addRef();
|
m_pointer->addRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
TSmartPointerT(T *pointer) : m_pointer(pointer)
|
TSmartPointerT(T* pointer) : m_pointer(pointer)
|
||||||
{
|
{
|
||||||
if (m_pointer)
|
if (m_pointer)
|
||||||
m_pointer->addRef();
|
m_pointer->addRef();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSOUND_INCLUDED
|
#ifndef TSOUND_INCLUDED
|
||||||
#define TSOUND_INCLUDED
|
#define TSOUND_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
#include "texception.h"
|
#include "texception.h"
|
||||||
#include "tthreadmessage.h"
|
#include "tthreadmessage.h"
|
||||||
|
@ -285,7 +285,7 @@ class TSoundInputDeviceImp;
|
||||||
*/
|
*/
|
||||||
class DVAPI TSoundInputDevice
|
class DVAPI TSoundInputDevice
|
||||||
{
|
{
|
||||||
TSoundInputDeviceImp *m_imp;
|
std::shared_ptr<TSoundInputDeviceImp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Source {
|
enum Source {
|
||||||
|
@ -360,7 +360,7 @@ class TSoundOutputDeviceImp;
|
||||||
*/
|
*/
|
||||||
class DVAPI TSoundOutputDevice
|
class DVAPI TSoundOutputDevice
|
||||||
{
|
{
|
||||||
TSoundOutputDeviceImp *m_imp;
|
std::unique_ptr<TSoundOutputDeviceImp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TSoundOutputDevice();
|
TSoundOutputDevice();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSPECTRUMPARAM_H
|
#ifndef TSPECTRUMPARAM_H
|
||||||
#define TSPECTRUMPARAM_H
|
#define TSPECTRUMPARAM_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tspectrum.h"
|
#include "tspectrum.h"
|
||||||
#include "tparamset.h"
|
#include "tparamset.h"
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class DVAPI TSpectrumParam : public TParam
|
||||||
{
|
{
|
||||||
PERSIST_DECLARATION(TSpectrumParam)
|
PERSIST_DECLARATION(TSpectrumParam)
|
||||||
|
|
||||||
TSpectrumParamImp *m_imp;
|
std::unique_ptr<TSpectrumParamImp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TSpectrumParam();
|
TSpectrumParam();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSTENCILCONTROL_H
|
#ifndef TSTENCILCONTROL_H
|
||||||
#define TSTENCILCONTROL_H
|
#define TSTENCILCONTROL_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
#undef DVAPI
|
#undef DVAPI
|
||||||
|
@ -34,7 +34,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TStencilControl *instance();
|
static TStencilControl *instance();
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSTREAM_H
|
#ifndef TSTREAM_H
|
||||||
#define TSTREAM_H
|
#define TSTREAM_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tpixel.h"
|
#include "tpixel.h"
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ typedef std::pair<int, int> VersionNumber; //!< Integer pair storing the major a
|
||||||
class DVAPI TIStream
|
class DVAPI TIStream
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
|
@ -168,10 +168,10 @@ TIStream &operator>>(TIStream &is, T *&v)
|
||||||
class DVAPI TOStream
|
class DVAPI TOStream
|
||||||
{
|
{
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::shared_ptr<Imp> m_imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TOStream(Imp *imp); //!< deprecated
|
TOStream(std::shared_ptr<Imp> imp); //!< deprecated
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
|
@ -238,8 +238,8 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Not copyable
|
// Not copyable
|
||||||
TOStream(const TOStream &); //!< Not implemented
|
TOStream(const TOStream &) = delete; //!< Not implemented
|
||||||
TOStream &operator=(const TOStream &); //!< Not implemented
|
TOStream &operator=(const TOStream &) = delete; //!< Not implemented
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TSTREAM_H
|
#endif // TSTREAM_H
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSTROKE_H
|
#ifndef TSTROKE_H
|
||||||
#define TSTROKE_H
|
#define TSTROKE_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
#include "tthreadmessage.h"
|
#include "tthreadmessage.h"
|
||||||
|
@ -50,7 +50,7 @@ class DVAPI TStroke : public TSmartObject
|
||||||
private:
|
private:
|
||||||
//! Pimpl of a TStroke
|
//! Pimpl of a TStroke
|
||||||
struct Imp;
|
struct Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct OutlineOptions;
|
struct OutlineOptions;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TTCPIP_H
|
#ifndef TTCPIP_H
|
||||||
#define TTCPIP_H
|
#define TTCPIP_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
@ -48,7 +48,7 @@ public:
|
||||||
int getExitCode() const;
|
int getExitCode() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TTcpIpServerImp *m_imp;
|
std::shared_ptr<TTcpIpServerImp> m_imp;
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TTIMER_INCLUDED
|
#ifndef TTIMER_INCLUDED
|
||||||
#define TTIMER_INCLUDED
|
#define TTIMER_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
|
|
||||||
#undef DVAPI
|
#undef DVAPI
|
||||||
|
@ -98,7 +98,7 @@ public:
|
||||||
class Imp;
|
class Imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
TTimer(const TTimer &);
|
TTimer(const TTimer &);
|
||||||
void operator=(const TTimer &);
|
void operator=(const TTimer &);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef T_UNDO_INCLUDED
|
#ifndef T_UNDO_INCLUDED
|
||||||
#define T_UNDO_INCLUDED
|
#define T_UNDO_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
// TnzCore includes
|
// TnzCore includes
|
||||||
#include "tsmartpointer.h"
|
#include "tsmartpointer.h"
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct TUndoManagerImp;
|
struct TUndoManagerImp;
|
||||||
TUndoManagerImp *m_imp;
|
std::unique_ptr<TUndoManagerImp> m_imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Noncopyable
|
// Noncopyable
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TVECTORIMAGE_INCLUDED
|
#ifndef TVECTORIMAGE_INCLUDED
|
||||||
#define TVECTORIMAGE_INCLUDED
|
#define TVECTORIMAGE_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "timage.h"
|
#include "timage.h"
|
||||||
|
|
||||||
// da togliere spostando cose in altri file!!
|
// da togliere spostando cose in altri file!!
|
||||||
|
@ -60,7 +60,7 @@ class DVAPI TVectorImage : public TImage
|
||||||
int pickGroup(const TPointD &pos, bool onEnteredGroup) const;
|
int pickGroup(const TPointD &pos, bool onEnteredGroup) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
struct IntersectionBranch {
|
struct IntersectionBranch {
|
||||||
int m_strokeIndex;
|
int m_strokeIndex;
|
||||||
|
|
|
@ -120,7 +120,6 @@ ShadingContext::ShadingContext()
|
||||||
|
|
||||||
ShadingContext::~ShadingContext()
|
ShadingContext::~ShadingContext()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------
|
//--------------------------------------------------------
|
||||||
|
|
|
@ -161,15 +161,14 @@ void PermissionsManager::Imp::loadPermissions()
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
|
||||||
PermissionsManager::PermissionsManager()
|
PermissionsManager::PermissionsManager()
|
||||||
|
: m_imp(new Imp())
|
||||||
{
|
{
|
||||||
m_imp = new Imp();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
PermissionsManager::~PermissionsManager()
|
PermissionsManager::~PermissionsManager()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
|
@ -212,7 +212,6 @@ MeshTexturizer::MeshTexturizer()
|
||||||
|
|
||||||
MeshTexturizer::~MeshTexturizer()
|
MeshTexturizer::~MeshTexturizer()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -887,7 +887,6 @@ PlasticDeformer::PlasticDeformer()
|
||||||
|
|
||||||
PlasticDeformer::~PlasticDeformer()
|
PlasticDeformer::~PlasticDeformer()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -445,7 +445,6 @@ PlasticDeformerStorage::PlasticDeformerStorage()
|
||||||
|
|
||||||
PlasticDeformerStorage::~PlasticDeformerStorage()
|
PlasticDeformerStorage::~PlasticDeformerStorage()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
|
@ -149,7 +149,6 @@ PlasticSkeleton::PlasticSkeleton()
|
||||||
|
|
||||||
PlasticSkeleton::~PlasticSkeleton()
|
PlasticSkeleton::~PlasticSkeleton()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
|
@ -644,8 +644,6 @@ PlasticSkeletonDeformation::~PlasticSkeletonDeformation()
|
||||||
SkeletonSet::iterator st, sEnd(m_imp->m_skeletons.end());
|
SkeletonSet::iterator st, sEnd(m_imp->m_skeletons.end());
|
||||||
for (st = m_imp->m_skeletons.begin(); st != sEnd; ++st)
|
for (st = m_imp->m_skeletons.begin(); st != sEnd; ++st)
|
||||||
st->get_right()->removeListener(this);
|
st->get_right()->removeListener(this);
|
||||||
|
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
|
@ -458,12 +458,11 @@ MovieGenerator::MovieGenerator(
|
||||||
const TDimension &resolution,
|
const TDimension &resolution,
|
||||||
TOutputProperties &outputProperties,
|
TOutputProperties &outputProperties,
|
||||||
bool useMarkers)
|
bool useMarkers)
|
||||||
: m_imp(0)
|
|
||||||
{
|
{
|
||||||
if (path.getType() == "swf" || path.getType() == "scr")
|
if (path.getType() == "swf" || path.getType() == "scr")
|
||||||
m_imp = new FlashMovieGenerator(path, resolution, outputProperties);
|
m_imp.reset(new FlashMovieGenerator(path, resolution, outputProperties));
|
||||||
else
|
else
|
||||||
m_imp = new RasterMovieGenerator(path, resolution, outputProperties);
|
m_imp.reset(new RasterMovieGenerator(path, resolution, outputProperties));
|
||||||
m_imp->m_useMarkers = useMarkers;
|
m_imp->m_useMarkers = useMarkers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,7 +470,6 @@ MovieGenerator::MovieGenerator(
|
||||||
|
|
||||||
MovieGenerator::~MovieGenerator()
|
MovieGenerator::~MovieGenerator()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
|
@ -508,7 +506,7 @@ bool MovieGenerator::addSoundtrack(const ToonzScene &scene, int frameOffset, int
|
||||||
bool MovieGenerator::addScene(ToonzScene &scene, int r0, int r1)
|
bool MovieGenerator::addScene(ToonzScene &scene, int r0, int r1)
|
||||||
{
|
{
|
||||||
TApp *app = TApp::instance();
|
TApp *app = TApp::instance();
|
||||||
RasterMovieGenerator *imp = dynamic_cast<RasterMovieGenerator *>(m_imp);
|
RasterMovieGenerator *imp = dynamic_cast<RasterMovieGenerator *>(m_imp.get());
|
||||||
if (imp)
|
if (imp)
|
||||||
imp->m_alphaEnabled = true;
|
imp->m_alphaEnabled = true;
|
||||||
m_imp->m_renderRange = std::make_pair(r0, r1);
|
m_imp->m_renderRange = std::make_pair(r0, r1);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef MOVIEGENERATOR_INCLUDED
|
#ifndef MOVIEGENERATOR_INCLUDED
|
||||||
#define MOVIEGENERATOR_INCLUDED
|
#define MOVIEGENERATOR_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tfilepath.h"
|
#include "tfilepath.h"
|
||||||
#include "tpixel.h"
|
#include "tpixel.h"
|
||||||
#include "tgeometry.h"
|
#include "tgeometry.h"
|
||||||
|
@ -26,7 +26,7 @@ public:
|
||||||
class Imp;
|
class Imp;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class Listener
|
class Listener
|
||||||
|
|
|
@ -1018,7 +1018,6 @@ Previewer::Previewer(bool subcamera)
|
||||||
|
|
||||||
Previewer::~Previewer()
|
Previewer::~Previewer()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef PREVIEWER_INCLUDED
|
#ifndef PREVIEWER_INCLUDED
|
||||||
#define PREVIEWER_INCLUDED
|
#define PREVIEWER_INCLUDED
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "traster.h"
|
#include "traster.h"
|
||||||
#include "tfx.h"
|
#include "tfx.h"
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ class Previewer : public QObject, public TFxObserver
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
Previewer(bool subcamera);
|
Previewer(bool subcamera);
|
||||||
~Previewer();
|
~Previewer();
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef SERVICE_H
|
#ifndef SERVICE_H
|
||||||
#define SERVICE_H
|
#define SERVICE_H
|
||||||
|
|
||||||
//#include "tfilepath.h"
|
#include <memory>
|
||||||
|
|
||||||
class TFilePath;
|
class TFilePath;
|
||||||
|
|
||||||
|
@ -86,7 +84,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
|
|
||||||
static TService *m_instance;
|
static TService *m_instance;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TSYSLOG_H
|
#ifndef TSYSLOG_H
|
||||||
#define TSYSLOG_H
|
#define TSYSLOG_H
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include "tcommon.h"
|
#include "tcommon.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Imp;
|
class Imp;
|
||||||
Imp *m_imp;
|
std::unique_ptr<Imp> m_imp;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -123,7 +123,6 @@ TService::TService(const string &name, const string &displayName)
|
||||||
|
|
||||||
TService::~TService()
|
TService::~TService()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
@ -106,7 +106,6 @@ TFarmServerStub::TFarmServerStub(TFarmServer *farmServer, int port)
|
||||||
|
|
||||||
TFarmServerStub::~TFarmServerStub()
|
TFarmServerStub::~TFarmServerStub()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
@ -697,7 +697,6 @@ TFarmTaskGroup::TFarmTaskGroup(const TFarmTaskGroup &src)
|
||||||
|
|
||||||
TFarmTaskGroup::~TFarmTaskGroup()
|
TFarmTaskGroup::~TFarmTaskGroup()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
@ -201,7 +201,6 @@ TUserLog::TUserLog(const TFilePath &fp) : m_imp(new Imp(fp))
|
||||||
|
|
||||||
TUserLog::~TUserLog()
|
TUserLog::~TUserLog()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
@ -268,7 +268,6 @@ TTcpIpServer::~TTcpIpServer()
|
||||||
std::cout << "closing socket" << std::endl;
|
std::cout << "closing socket" << std::endl;
|
||||||
close(m_imp->m_s);
|
close(m_imp->m_s);
|
||||||
#endif
|
#endif
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
@ -290,14 +289,13 @@ static void shutdown_cb(int)
|
||||||
class DataReader : public TThread::Runnable
|
class DataReader : public TThread::Runnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DataReader(int clientSocket, TTcpIpServer *server, TTcpIpServerImp *serverImp)
|
DataReader(int clientSocket, std::shared_ptr<TTcpIpServerImp> serverImp)
|
||||||
: m_clientSocket(clientSocket), m_server(server), m_serverImp(serverImp) {}
|
: m_clientSocket(clientSocket), m_serverImp(std::move(serverImp)) {}
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
int m_clientSocket;
|
int m_clientSocket;
|
||||||
TTcpIpServer *m_server;
|
std::shared_ptr<TTcpIpServerImp> m_serverImp;
|
||||||
TTcpIpServerImp *m_serverImp;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void DataReader::run()
|
void DataReader::run()
|
||||||
|
@ -322,15 +320,14 @@ void DataReader::run()
|
||||||
class DataReceiver : public TThread::Runnable
|
class DataReceiver : public TThread::Runnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DataReceiver(int clientSocket, const QString &data, TTcpIpServer *server, TTcpIpServerImp *serverImp)
|
DataReceiver(int clientSocket, const QString &data, std::shared_ptr<TTcpIpServerImp> serverImp)
|
||||||
: m_clientSocket(clientSocket), m_data(data), m_server(server), m_serverImp(serverImp) {}
|
: m_clientSocket(clientSocket), m_data(data), m_serverImp(std::move(serverImp)) {}
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
|
|
||||||
int m_clientSocket;
|
int m_clientSocket;
|
||||||
QString m_data;
|
QString m_data;
|
||||||
TTcpIpServer *m_server;
|
std::shared_ptr<TTcpIpServerImp> m_serverImp;
|
||||||
TTcpIpServerImp *m_serverImp;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
@ -374,7 +371,7 @@ void TTcpIpServer::run()
|
||||||
} else {
|
} else {
|
||||||
// creo un nuovo thread per la gestione dei dati ricevuti
|
// creo un nuovo thread per la gestione dei dati ricevuti
|
||||||
TThread::Executor executor;
|
TThread::Executor executor;
|
||||||
executor.addTask(new DataReceiver(t, data, this, m_imp));
|
executor.addTask(new DataReceiver(t, data, m_imp));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
::shutdown(t, 1);
|
::shutdown(t, 1);
|
||||||
|
@ -413,7 +410,7 @@ void TTcpIpServer::run()
|
||||||
}
|
}
|
||||||
|
|
||||||
TThread::Executor executor;
|
TThread::Executor executor;
|
||||||
executor.addTask(new DataReader(t, this, m_imp));
|
executor.addTask(new DataReader(t, m_imp));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m_exitCode = err;
|
m_exitCode = err;
|
||||||
|
|
|
@ -1144,8 +1144,8 @@ return 0;
|
||||||
/*=============================================================================*/
|
/*=============================================================================*/
|
||||||
|
|
||||||
TAutocloser::TAutocloser(const TRasterP &r, int distance, double angle, int index, int opacity)
|
TAutocloser::TAutocloser(const TRasterP &r, int distance, double angle, int index, int opacity)
|
||||||
|
: m_imp(new Imp(r, distance, angle, index, opacity))
|
||||||
{
|
{
|
||||||
m_imp = new Imp(r, distance, angle, index, opacity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//...............................
|
//...............................
|
||||||
|
@ -1161,7 +1161,6 @@ void TAutocloser::exec()
|
||||||
|
|
||||||
TAutocloser::~TAutocloser()
|
TAutocloser::~TAutocloser()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
|
@ -181,7 +181,6 @@ ImageManager::ImageManager()
|
||||||
|
|
||||||
ImageManager::~ImageManager()
|
ImageManager::~ImageManager()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -212,8 +212,6 @@ Renderer::Renderer()
|
||||||
|
|
||||||
Renderer::~Renderer()
|
Renderer::~Renderer()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
m_imp = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QScriptValue Renderer::ctor(QScriptContext *context, QScriptEngine *engine)
|
QScriptValue Renderer::ctor(QScriptContext *context, QScriptEngine *engine)
|
||||||
|
|
|
@ -210,7 +210,6 @@ TUserLogAppend::TUserLogAppend(const TFilePath &fp) : m_imp(new Imp(fp))
|
||||||
|
|
||||||
TUserLogAppend::~TUserLogAppend()
|
TUserLogAppend::~TUserLogAppend()
|
||||||
{
|
{
|
||||||
//delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
@ -103,8 +103,6 @@ TStageObjectTree::TStageObjectTree() : m_imp(new TStageObjectTreeImp)
|
||||||
|
|
||||||
TStageObjectTree::~TStageObjectTree()
|
TStageObjectTree::~TStageObjectTree()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
m_imp = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -165,7 +165,10 @@ TXsheet::TXsheetImp::~TXsheetImp()
|
||||||
// TXsheet
|
// TXsheet
|
||||||
|
|
||||||
TXsheet::TXsheet()
|
TXsheet::TXsheet()
|
||||||
: TSmartObject(m_classCode), m_player(0), m_imp(new TXsheet::TXsheetImp), m_notes(new TXshNoteSet())
|
: TSmartObject(m_classCode)
|
||||||
|
, m_player(0)
|
||||||
|
, m_imp(new TXsheet::TXsheetImp)
|
||||||
|
, m_notes(new TXshNoteSet())
|
||||||
{
|
{
|
||||||
//extern TSyntax::Grammar *createXsheetGrammar(TXsheet*);
|
//extern TSyntax::Grammar *createXsheetGrammar(TXsheet*);
|
||||||
m_soundProperties = new TXsheet::SoundProperties();
|
m_soundProperties = new TXsheet::SoundProperties();
|
||||||
|
@ -181,7 +184,6 @@ TXsheet::~TXsheet()
|
||||||
texture_utils::invalidateTextures(this);
|
texture_utils::invalidateTextures(this);
|
||||||
|
|
||||||
assert(m_imp);
|
assert(m_imp);
|
||||||
delete m_imp;
|
|
||||||
if (m_notes)
|
if (m_notes)
|
||||||
delete m_notes;
|
delete m_notes;
|
||||||
if (m_soundProperties)
|
if (m_soundProperties)
|
||||||
|
|
|
@ -116,13 +116,13 @@ public slots:
|
||||||
|
|
||||||
InfoViewer::InfoViewer(QWidget *parent)
|
InfoViewer::InfoViewer(QWidget *parent)
|
||||||
: Dialog()
|
: Dialog()
|
||||||
|
, m_imp(new InfoViewerImp())
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("File Info"));
|
setWindowTitle(tr("File Info"));
|
||||||
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
//setAttribute(Qt::WA_DeleteOnClose);
|
//setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
m_parent = parent;
|
m_parent = parent;
|
||||||
m_imp = new InfoViewerImp();
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < (int)m_imp->m_labels.size(); i++) {
|
for (i = 0; i < (int)m_imp->m_labels.size(); i++) {
|
||||||
|
@ -143,7 +143,6 @@ InfoViewer::InfoViewer(QWidget *parent)
|
||||||
|
|
||||||
InfoViewer::~InfoViewer()
|
InfoViewer::~InfoViewer()
|
||||||
{
|
{
|
||||||
delete m_imp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue