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