Last active
December 28, 2015 00:29
-
-
Save jacobsn/7413932 to your computer and use it in GitHub Desktop.
Patch to make povray build on OS X Mavericks (see https://github.com/mxcl/homebrew/issues/23612). Adds a boost:: to the beginning of every shared_ptr.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -Naur source/backend/bounding/boundingtask.cpp source/backend/bounding/boundingtask.cpp | |
| --- source/backend/bounding/boundingtask.cpp 2012-02-05 15:53:40.000000000 -0500 | |
| +++ source/backend/bounding/boundingtask.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -187,7 +187,7 @@ | |
| BSPProgress(); | |
| }; | |
| -BoundingTask::BoundingTask(shared_ptr<SceneData> sd, unsigned int bt) : | |
| +BoundingTask::BoundingTask(boost::shared_ptr<SceneData> sd, unsigned int bt) : | |
| Task(new SceneThreadData(sd), boost::bind(&BoundingTask::SendFatalError, this, _1)), | |
| sceneData(sd), | |
| boundingThreshold(bt) | |
| diff -Naur source/backend/bounding/boundingtask.h source/backend/bounding/boundingtask.h | |
| --- source/backend/bounding/boundingtask.h 2012-02-05 15:53:40.000000000 -0500 | |
| +++ source/backend/bounding/boundingtask.h 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -112,7 +112,7 @@ | |
| class BoundingTask : public Task | |
| { | |
| public: | |
| - BoundingTask(shared_ptr<SceneData> sd, unsigned int bt); | |
| + BoundingTask(boost::shared_ptr<SceneData> sd, unsigned int bt); | |
| virtual ~BoundingTask(); | |
| virtual void Run(); | |
| @@ -123,7 +123,7 @@ | |
| inline SceneThreadData *GetSceneDataPtr() { return (SceneThreadData *)(GetDataPtr()); } | |
| private: | |
| - shared_ptr<SceneData> sceneData; | |
| + boost::shared_ptr<SceneData> sceneData; | |
| unsigned int boundingThreshold; | |
| void SendFatalError(pov_base::Exception& e); | |
| diff -Naur source/backend/control/renderbackend.cpp source/backend/control/renderbackend.cpp | |
| --- source/backend/control/renderbackend.cpp 2012-02-05 15:53:41.000000000 -0500 | |
| +++ source/backend/control/renderbackend.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -357,7 +357,7 @@ | |
| if(err != kNoErr) | |
| throw POV_EXCEPTION_CODE (err); | |
| - shared_ptr<Scene> scene(new Scene(backendAddress, msg.GetSourceAddress(), scenecounter + 1)); | |
| + boost::shared_ptr<Scene> scene(new Scene(backendAddress, msg.GetSourceAddress(), scenecounter + 1)); | |
| scenecounter++; | |
| @@ -399,7 +399,7 @@ | |
| { | |
| SceneId sid = msg.GetInt(kPOVAttrib_SceneId); | |
| - map<SceneId, shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| + map<SceneId, boost::shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| if(i == scenes.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -435,12 +435,12 @@ | |
| { | |
| SceneId sid = msg.GetInt(kPOVAttrib_SceneId); | |
| - map<SceneId, shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| + map<SceneId, boost::shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| if(i == scenes.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| - shared_ptr<View> view(i->second->NewView(msg.TryGetInt(kPOVAttrib_Width, 160), msg.TryGetInt(kPOVAttrib_Height, 120), viewcounter + 1)); | |
| + boost::shared_ptr<View> view(i->second->NewView(msg.TryGetInt(kPOVAttrib_Width, 160), msg.TryGetInt(kPOVAttrib_Height, 120), viewcounter + 1)); | |
| viewcounter++; | |
| @@ -475,7 +475,7 @@ | |
| { | |
| ViewId vid = msg.GetInt(kPOVAttrib_ViewId); | |
| - map<ViewId, shared_ptr<View> >::iterator i(views.find(vid)); | |
| + map<ViewId, boost::shared_ptr<View> >::iterator i(views.find(vid)); | |
| if(i == views.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -511,7 +511,7 @@ | |
| if(validateFrontendAddress(msg.GetSourceAddress()) == false) | |
| throw POV_EXCEPTION_CODE(kAuthorisationErr); | |
| - map<SceneId, shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| + map<SceneId, boost::shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| if(i == scenes.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -546,7 +546,7 @@ | |
| { | |
| SceneId sid = msg.GetInt(kPOVAttrib_SceneId); | |
| - map<SceneId, shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| + map<SceneId, boost::shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| if(i == scenes.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -581,7 +581,7 @@ | |
| { | |
| SceneId sid = msg.GetInt(kPOVAttrib_SceneId); | |
| - map<SceneId, shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| + map<SceneId, boost::shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| if(i == scenes.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -616,7 +616,7 @@ | |
| { | |
| SceneId sid = msg.GetInt(kPOVAttrib_SceneId); | |
| - map<SceneId, shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| + map<SceneId, boost::shared_ptr<Scene> >::iterator i(scenes.find(sid)); | |
| if(i == scenes.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -653,7 +653,7 @@ | |
| if(validateFrontendAddress(msg.GetSourceAddress()) == false) | |
| throw POV_EXCEPTION_CODE(kAuthorisationErr); | |
| - map<ViewId, shared_ptr<View> >::iterator i(views.find(vid)); | |
| + map<ViewId, boost::shared_ptr<View> >::iterator i(views.find(vid)); | |
| if(i == views.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -691,7 +691,7 @@ | |
| { | |
| ViewId vid = msg.GetInt(kPOVAttrib_ViewId); | |
| - map<ViewId, shared_ptr<View> >::iterator i(views.find(vid)); | |
| + map<ViewId, boost::shared_ptr<View> >::iterator i(views.find(vid)); | |
| if(i == views.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -726,7 +726,7 @@ | |
| { | |
| ViewId vid = msg.GetInt(kPOVAttrib_ViewId); | |
| - map<ViewId, shared_ptr<View> >::iterator i(views.find(vid)); | |
| + map<ViewId, boost::shared_ptr<View> >::iterator i(views.find(vid)); | |
| if(i == views.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| @@ -761,7 +761,7 @@ | |
| { | |
| ViewId vid = msg.GetInt(kPOVAttrib_ViewId); | |
| - map<ViewId, shared_ptr<View> >::iterator i(views.find(vid)); | |
| + map<ViewId, boost::shared_ptr<View> >::iterator i(views.find(vid)); | |
| if(i == views.end()) | |
| throw POV_EXCEPTION_CODE(kInvalidIdentifierErr); | |
| diff -Naur source/backend/control/renderbackend.h source/backend/control/renderbackend.h | |
| --- source/backend/control/renderbackend.h 2012-02-05 15:53:41.000000000 -0500 | |
| +++ source/backend/control/renderbackend.h 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -170,8 +170,8 @@ | |
| SceneId scenecounter; | |
| ViewId viewcounter; | |
| - map<SceneId, shared_ptr<Scene> > scenes; | |
| - map<ViewId, shared_ptr<View> > views; | |
| + map<SceneId, boost::shared_ptr<Scene> > scenes; | |
| + map<ViewId, boost::shared_ptr<View> > views; | |
| map<SceneId, set<ViewId> > scene2views; | |
| map<ViewId, SceneId> view2scene; | |
| diff -Naur source/backend/frame.h source/backend/frame.h | |
| --- source/backend/frame.h 2012-02-05 15:53:41.000000000 -0500 | |
| +++ source/backend/frame.h 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -1037,7 +1037,7 @@ | |
| SNGL Fade_Distance, Fade_Power; | |
| RGBColour Fade_Colour; | |
| vector<Media> media; | |
| - shared_ptr<SubsurfaceInterior> subsurface; | |
| + boost::shared_ptr<SubsurfaceInterior> subsurface; | |
| Interior(); | |
| Interior(const Interior&); | |
| diff -Naur source/backend/interior/interior.cpp source/backend/interior/interior.cpp | |
| --- source/backend/interior/interior.cpp 2012-02-05 15:53:41.000000000 -0500 | |
| +++ source/backend/interior/interior.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -122,7 +122,7 @@ | |
| hollow = false; | |
| - subsurface = shared_ptr<SubsurfaceInterior>(); | |
| + subsurface = boost::shared_ptr<SubsurfaceInterior>(); | |
| } | |
| Interior::Interior(const Interior& source) | |
| @@ -137,7 +137,7 @@ | |
| media = source.media; | |
| hollow = source.hollow; | |
| IOR = source.IOR; | |
| - subsurface = shared_ptr<SubsurfaceInterior>(source.subsurface); | |
| + subsurface = boost::shared_ptr<SubsurfaceInterior>(source.subsurface); | |
| Caustics = source.Caustics; | |
| } | |
| diff -Naur source/backend/lighting/photonestimationtask.cpp source/backend/lighting/photonestimationtask.cpp | |
| --- source/backend/lighting/photonestimationtask.cpp 2012-02-05 15:53:42.000000000 -0500 | |
| +++ source/backend/lighting/photonestimationtask.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -191,7 +191,7 @@ | |
| void PhotonEstimationTask::SearchThroughObjectsEstimatePhotons(vector<ObjectPtr>& Objects, LightSource *Light) | |
| { | |
| ViewThreadData *renderDataPtr = GetViewDataPtr(); | |
| - shared_ptr<SceneData> sceneData = GetSceneData(); | |
| + boost::shared_ptr<SceneData> sceneData = GetSceneData(); | |
| /* check this object and all siblings */ | |
| for(vector<ObjectPtr>::iterator Sib = Objects.begin(); Sib != Objects.end(); Sib++) | |
| diff -Naur source/backend/lighting/photons.cpp source/backend/lighting/photons.cpp | |
| --- source/backend/lighting/photons.cpp 2012-02-05 15:53:42.000000000 -0500 | |
| +++ source/backend/lighting/photons.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -165,7 +165,7 @@ | |
| const int INITIAL_BASE_ARRAY_SIZE = 100; | |
| -PhotonTrace::PhotonTrace(shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, unsigned int qf, Trace::CooperateFunctor& cf) : | |
| +PhotonTrace::PhotonTrace(boost::shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, unsigned int qf, Trace::CooperateFunctor& cf) : | |
| Trace(sd, td, qf, cf, mediaPhotons, noRadiosity), | |
| mediaPhotons(sd, td, this, new PhotonGatherer(&sd->mediaPhotonMap, sd->photonSettings)) | |
| { | |
| @@ -1019,7 +1019,7 @@ | |
| } | |
| -PhotonMediaFunction::PhotonMediaFunction(shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg) : | |
| +PhotonMediaFunction::PhotonMediaFunction(boost::shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg) : | |
| MediaFunction(td, t, pg), | |
| sceneData(sd) | |
| { | |
| @@ -2861,7 +2861,7 @@ | |
| } | |
| -void LightTargetCombo::computeAnglesAndDeltas(ViewThreadData* renderDataPtr, shared_ptr<SceneData> sceneData) | |
| +void LightTargetCombo::computeAnglesAndDeltas(ViewThreadData* renderDataPtr, boost::shared_ptr<SceneData> sceneData) | |
| { | |
| shootingDirection.compute(); | |
| diff -Naur source/backend/lighting/photons.h source/backend/lighting/photons.h | |
| --- source/backend/lighting/photons.h 2012-02-05 15:53:42.000000000 -0500 | |
| +++ source/backend/lighting/photons.h 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -354,14 +354,14 @@ | |
| class PhotonMediaFunction : public MediaFunction | |
| { | |
| public: | |
| - PhotonMediaFunction(shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg); | |
| + PhotonMediaFunction(boost::shared_ptr<SceneData> sd, TraceThreadData *td, Trace *t, PhotonGatherer *pg); | |
| void ComputeMediaAndDepositPhotons(MediaVector& medias, const Ray& ray, Intersection& isect, Colour& colour, Trace::TraceTicket& ticket); | |
| protected: | |
| void DepositMediaPhotons(Colour& colour, MediaVector& medias, LightSourceEntryVector& lights, MediaIntervalVector& mediaintervals, | |
| const Ray& ray, Media *IMedia, int minsamples, bool ignore_photons, bool use_scattering, bool all_constant_and_light_ray, Trace::TraceTicket& ticket); | |
| private: | |
| - shared_ptr<SceneData> sceneData; | |
| + boost::shared_ptr<SceneData> sceneData; | |
| void addMediaPhoton(const VECTOR Point, const VECTOR Origin, const RGBColour& LightCol, DBL depthDiff); | |
| }; | |
| @@ -369,7 +369,7 @@ | |
| class PhotonTrace : public Trace | |
| { | |
| public: | |
| - PhotonTrace(shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, unsigned int qf, Trace::CooperateFunctor& cf); | |
| + PhotonTrace(boost::shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int mtl, DBL adcb, unsigned int qf, Trace::CooperateFunctor& cf); | |
| ~PhotonTrace(); | |
| virtual DBL TraceRay(const Ray& ray, Colour& colour, COLC weight, Trace::TraceTicket& ticket, bool continuedRay, DBL maxDepth = 0.0); | |
| @@ -422,7 +422,7 @@ | |
| ShootingDirection shootingDirection; | |
| int computeMergedFlags(); | |
| - void computeAnglesAndDeltas(ViewThreadData* renderDataPtr, shared_ptr<SceneData> sceneData); | |
| + void computeAnglesAndDeltas(ViewThreadData* renderDataPtr, boost::shared_ptr<SceneData> sceneData); | |
| }; | |
| diff -Naur source/backend/lighting/photonshootingstrategy.cpp source/backend/lighting/photonshootingstrategy.cpp | |
| --- source/backend/lighting/photonshootingstrategy.cpp 2012-02-05 15:53:42.000000000 -0500 | |
| +++ source/backend/lighting/photonshootingstrategy.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -137,7 +137,7 @@ | |
| return unit; | |
| } | |
| -void PhotonShootingStrategy::createUnitsForCombo(ObjectPtr obj, LightSource* light, ViewThreadData* renderDataPtr, shared_ptr<SceneData> sceneData) | |
| +void PhotonShootingStrategy::createUnitsForCombo(ObjectPtr obj, LightSource* light, ViewThreadData* renderDataPtr, boost::shared_ptr<SceneData> sceneData) | |
| { | |
| PhotonShootingUnit* unit = new PhotonShootingUnit(light, obj); | |
| unit->lightAndObject.computeAnglesAndDeltas(renderDataPtr, sceneData); | |
| diff -Naur source/backend/lighting/photonshootingstrategy.h source/backend/lighting/photonshootingstrategy.h | |
| --- source/backend/lighting/photonshootingstrategy.h 2012-02-05 15:53:42.000000000 -0500 | |
| +++ source/backend/lighting/photonshootingstrategy.h 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -113,7 +113,7 @@ | |
| vector<PhotonShootingUnit*> units; | |
| - void createUnitsForCombo(ObjectPtr obj, LightSource* light, ViewThreadData* renderDataPtr, shared_ptr<SceneData> sceneData); | |
| + void createUnitsForCombo(ObjectPtr obj, LightSource* light, ViewThreadData* renderDataPtr, boost::shared_ptr<SceneData> sceneData); | |
| void start(); | |
| PhotonShootingUnit* getNextUnit(); | |
| diff -Naur source/backend/lighting/photonstrategytask.cpp source/backend/lighting/photonstrategytask.cpp | |
| --- source/backend/lighting/photonstrategytask.cpp 2012-02-05 15:53:43.000000000 -0500 | |
| +++ source/backend/lighting/photonstrategytask.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -229,7 +229,7 @@ | |
| void PhotonStrategyTask::SearchThroughObjectsCreateUnits(vector<ObjectPtr>& Objects, LightSource *Light) | |
| { | |
| ViewThreadData *renderDataPtr = GetViewDataPtr(); | |
| - shared_ptr<SceneData> sceneData = GetSceneData(); | |
| + boost::shared_ptr<SceneData> sceneData = GetSceneData(); | |
| /* check this object and all siblings */ | |
| for(vector<ObjectPtr>::iterator Sib = Objects.begin(); Sib != Objects.end(); Sib++) | |
| diff -Naur source/backend/lighting/radiosity.cpp source/backend/lighting/radiosity.cpp | |
| --- source/backend/lighting/radiosity.cpp 2012-02-05 15:53:44.000000000 -0500 | |
| +++ source/backend/lighting/radiosity.cpp 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -328,7 +328,7 @@ | |
| return recSettings; | |
| } | |
| -RadiosityFunction::RadiosityFunction(shared_ptr<SceneData> sd, TraceThreadData *td, const SceneRadiositySettings& rs, | |
| +RadiosityFunction::RadiosityFunction(boost::shared_ptr<SceneData> sd, TraceThreadData *td, const SceneRadiositySettings& rs, | |
| RadiosityCache& rc, Trace::CooperateFunctor& cf, bool ft, Vector3d camera) : | |
| threadData(td), | |
| trace(sd, td, GetRadiosityQualityFlags(rs, QUALITY_9), cf, media, *this), // TODO FIXME - we can only use hard-coded QUALITY_9 because Radiosity happens to be disabled at lower settings! | |
| diff -Naur source/backend/lighting/radiosity.h source/backend/lighting/radiosity.h | |
| --- source/backend/lighting/radiosity.h 2012-02-05 15:53:44.000000000 -0500 | |
| +++ source/backend/lighting/radiosity.h 2013-11-11 09:07:59.000000000 -0500 | |
| @@ -314,7 +314,7 @@ | |
| // cf - the cooperate functor (whatever that is - some thing that handles inter-thread communication?) | |
| // pts - number of the current pretrace step (PRETRACE_FIRST to PRETRACE_MAX, or FINAL_TRACE for main render) | |
| // camera - position of the camera | |
| - RadiosityFunction(shared_ptr<SceneData> sd, TraceThreadData *td, | |
| + RadiosityFunction(boost::shared_ptr<SceneData> sd, TraceThreadData *td, | |
| const SceneRadiositySettings& rs, RadiosityCache& rc, Trace::CooperateFunctor& cf, bool ft, Vector3d camera); | |
| virtual ~RadiosityFunction(); | |
| diff -Naur source/backend/parser/parse.cpp source/backend/parser/parse.cpp | |
| --- source/backend/parser/parse.cpp 2012-06-13 17:53:47.000000000 -0400 | |
| +++ source/backend/parser/parse.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -181,7 +181,7 @@ | |
| * | |
| ******************************************************************************/ | |
| -Parser::Parser(shared_ptr<SceneData> sd, bool useclk, DBL clk) : | |
| +Parser::Parser(boost::shared_ptr<SceneData> sd, bool useclk, DBL clk) : | |
| Task(new SceneThreadData(sd), boost::bind(&Parser::SendFatalError, this, _1)), | |
| sceneData(sd), | |
| clockValue(clk), | |
| @@ -9571,7 +9571,7 @@ | |
| /* if(!Object->Texture->Finish->SubsurfaceTranslucency.isZero()) */ | |
| if (sceneData->useSubsurface) | |
| { | |
| - Object->interior->subsurface = shared_ptr<SubsurfaceInterior>(new SubsurfaceInterior(Object->interior->IOR)); | |
| + Object->interior->subsurface = boost::shared_ptr<SubsurfaceInterior>(new SubsurfaceInterior(Object->interior->IOR)); | |
| } | |
| } | |
| diff -Naur source/backend/parser/parse.h source/backend/parser/parse.h | |
| --- source/backend/parser/parse.h 2012-03-15 19:19:29.000000000 -0400 | |
| +++ source/backend/parser/parse.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -321,7 +321,7 @@ | |
| }; | |
| // constructor | |
| - Parser(shared_ptr<SceneData> sd, bool useclock, DBL clock); | |
| + Parser(boost::shared_ptr<SceneData> sd, bool useclock, DBL clock); | |
| void Run(); | |
| void Stopped(); | |
| @@ -470,7 +470,7 @@ | |
| bool expr_ret(ExprNode *¤t, int stage, int op); | |
| bool expr_err(ExprNode *¤t, int stage, int op); | |
| - shared_ptr<SceneData> sceneData; // TODO FIXME HACK - make private again once Locate_Filename is fixed [trf] | |
| + boost::shared_ptr<SceneData> sceneData; // TODO FIXME HACK - make private again once Locate_Filename is fixed [trf] | |
| private: | |
| FPUContext *fnVMContext; | |
| diff -Naur source/backend/render/rendertask.cpp source/backend/render/rendertask.cpp | |
| --- source/backend/render/rendertask.cpp 2012-02-05 15:53:52.000000000 -0500 | |
| +++ source/backend/render/rendertask.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -120,7 +120,7 @@ | |
| { | |
| } | |
| -shared_ptr<SceneData>& RenderTask::GetSceneData() | |
| +boost::shared_ptr<SceneData>& RenderTask::GetSceneData() | |
| { | |
| return viewData->GetSceneData(); | |
| } | |
| diff -Naur source/backend/render/rendertask.h source/backend/render/rendertask.h | |
| --- source/backend/render/rendertask.h 2012-02-05 15:53:52.000000000 -0500 | |
| +++ source/backend/render/rendertask.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -113,7 +113,7 @@ | |
| virtual void Run() = 0; | |
| virtual void Stopped() = 0; | |
| - shared_ptr<SceneData>& GetSceneData(); | |
| + boost::shared_ptr<SceneData>& GetSceneData(); | |
| ViewData *GetViewData(); | |
| inline ViewThreadData *GetViewDataPtr() { return (ViewThreadData *)(GetDataPtr()); } | |
| diff -Naur source/backend/render/trace.cpp source/backend/render/trace.cpp | |
| --- source/backend/render/trace.cpp 2012-06-13 17:53:48.000000000 -0400 | |
| +++ source/backend/render/trace.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -126,7 +126,7 @@ | |
| #define MEDIA_AFTER_TEXTURE_INTERPOLATION 1 | |
| -Trace::Trace(shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int qf, | |
| +Trace::Trace(boost::shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int qf, | |
| CooperateFunctor& cf, MediaFunctor& mf, RadiosityFunctor& rf) : | |
| threadData(td), | |
| sceneData(sd), | |
| diff -Naur source/backend/render/trace.h source/backend/render/trace.h | |
| --- source/backend/render/trace.h 2012-06-13 17:53:49.000000000 -0400 | |
| +++ source/backend/render/trace.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -261,7 +261,7 @@ | |
| virtual bool CheckRadiosityTraceLevel(const Trace::TraceTicket& ticket) { return false; } | |
| }; | |
| - Trace(shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int qf, | |
| + Trace(boost::shared_ptr<SceneData> sd, TraceThreadData *td, unsigned int qf, | |
| CooperateFunctor& cf, MediaFunctor& mf, RadiosityFunctor& af); | |
| virtual ~Trace(); | |
| @@ -329,7 +329,7 @@ | |
| int lightColorCacheIndex; | |
| /// scene data | |
| - shared_ptr<SceneData> sceneData; | |
| + boost::shared_ptr<SceneData> sceneData; | |
| /// maximum trace recursion level found | |
| unsigned int maxFoundTraceLevel; | |
| diff -Naur source/backend/render/tracepixel.h source/backend/render/tracepixel.h | |
| --- source/backend/render/tracepixel.h 2012-02-05 15:53:53.000000000 -0500 | |
| +++ source/backend/render/tracepixel.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -311,7 +311,7 @@ | |
| /// camera | |
| Camera camera; | |
| /// scene data | |
| - shared_ptr<SceneData> sceneData; | |
| + boost::shared_ptr<SceneData> sceneData; | |
| /// thread data | |
| TraceThreadData *threadData; | |
| diff -Naur source/backend/scene/scene.cpp source/backend/scene/scene.cpp | |
| --- source/backend/scene/scene.cpp 2012-02-05 15:53:54.000000000 -0500 | |
| +++ source/backend/scene/scene.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -627,7 +627,7 @@ | |
| return parserTasks.Failed(); | |
| } | |
| -shared_ptr<View> Scene::NewView(unsigned int width, unsigned int height, RenderBackend::ViewId vid) | |
| +boost::shared_ptr<View> Scene::NewView(unsigned int width, unsigned int height, RenderBackend::ViewId vid) | |
| { | |
| if(parserTasks.IsDone() == false) | |
| throw POV_EXCEPTION_CODE(kNotNowErr); | |
| @@ -635,7 +635,7 @@ | |
| if((parserTasks.IsDone() == false) || (parserTasks.Failed() == true)) | |
| throw POV_EXCEPTION_CODE(kNotNowErr); | |
| - return shared_ptr<View>(new View(sceneData, width, height, vid)); | |
| + return boost::shared_ptr<View>(new View(sceneData, width, height, vid)); | |
| } | |
| void Scene::GetStatistics(POVMS_Object& parserStats) | |
| diff -Naur source/backend/scene/scene.h source/backend/scene/scene.h | |
| --- source/backend/scene/scene.h 2012-02-05 15:53:54.000000000 -0500 | |
| +++ source/backend/scene/scene.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -498,7 +498,7 @@ | |
| * POVMS messages sent to the frontend. | |
| * @return New view bound to the scene's data. | |
| */ | |
| - shared_ptr<View> NewView(unsigned int width, unsigned int height, RenderBackend::ViewId vid); | |
| + boost::shared_ptr<View> NewView(unsigned int width, unsigned int height, RenderBackend::ViewId vid); | |
| /** | |
| * Get the POVMS frontend address to send messages to the frontend. | |
| @@ -519,7 +519,7 @@ | |
| /// scene thread data (i.e. statistics) | |
| vector<SceneThreadData *> sceneThreadData; | |
| /// scene data | |
| - shared_ptr<SceneData> sceneData; | |
| + boost::shared_ptr<SceneData> sceneData; | |
| /// stop request flag | |
| bool stopRequsted; | |
| /// parser control thread | |
| diff -Naur source/backend/scene/threaddata.cpp source/backend/scene/threaddata.cpp | |
| --- source/backend/scene/threaddata.cpp 2012-03-15 19:19:39.000000000 -0400 | |
| +++ source/backend/scene/threaddata.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -108,7 +108,7 @@ | |
| namespace pov | |
| { | |
| -SceneThreadData::SceneThreadData(shared_ptr<SceneData> sd): sceneData(sd) | |
| +SceneThreadData::SceneThreadData(boost::shared_ptr<SceneData> sd): sceneData(sd) | |
| { | |
| for(int i = 0 ; i < 4 ; i++) | |
| Fractal_IStack[i] = NULL; | |
| diff -Naur source/backend/scene/threaddata.h source/backend/scene/threaddata.h | |
| --- source/backend/scene/threaddata.h 2012-02-05 15:53:55.000000000 -0500 | |
| +++ source/backend/scene/threaddata.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -130,7 +130,7 @@ | |
| * Create thread local data. | |
| * @param sd Scene data defining scene attributes. | |
| */ | |
| - SceneThreadData(shared_ptr<SceneData> sd); | |
| + SceneThreadData(boost::shared_ptr<SceneData> sd); | |
| /** | |
| * Get the statistics. | |
| @@ -214,11 +214,11 @@ | |
| POV_LONG realTime; | |
| unsigned int qualityFlags; // TODO FIXME - remove again | |
| - inline shared_ptr<const SceneData> GetSceneData() const { return sceneData; } | |
| + inline boost::shared_ptr<const SceneData> GetSceneData() const { return sceneData; } | |
| protected: | |
| /// scene data | |
| - shared_ptr<SceneData> sceneData; | |
| + boost::shared_ptr<SceneData> sceneData; | |
| /// render statistics | |
| RenderStatistics renderStats; | |
| diff -Naur source/backend/scene/view.cpp source/backend/scene/view.cpp | |
| --- source/backend/scene/view.cpp 2012-06-10 07:53:44.000000000 -0400 | |
| +++ source/backend/scene/view.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -140,7 +140,7 @@ | |
| return 1 << ii; | |
| } | |
| -ViewData::ViewData(shared_ptr<SceneData> sd) : | |
| +ViewData::ViewData(boost::shared_ptr<SceneData> sd) : | |
| nextBlock(0), | |
| completedFirstPass(false), | |
| highestTraceLevel(0), | |
| @@ -628,7 +628,7 @@ | |
| return radiosityCache; | |
| } | |
| -View::View(shared_ptr<SceneData> sd, unsigned int width, unsigned int height, RenderBackend::ViewId vid) : | |
| +View::View(boost::shared_ptr<SceneData> sd, unsigned int width, unsigned int height, RenderBackend::ViewId vid) : | |
| viewData(sd), | |
| stopRequsted(false), | |
| mailbox(0), | |
| @@ -690,7 +690,7 @@ | |
| bool View::CheckCameraHollowObject(const VECTOR point) | |
| { | |
| - shared_ptr<SceneData>& sd = viewData.GetSceneData(); | |
| + boost::shared_ptr<SceneData>& sd = viewData.GetSceneData(); | |
| if(sd->boundingMethod == 2) | |
| { | |
| @@ -737,7 +737,7 @@ | |
| unsigned int previewendsize = 0; | |
| unsigned int nextblock = 0; | |
| bool highReproducibility = false; | |
| - shared_ptr<set<unsigned int> > blockskiplist(new set<unsigned int>()); | |
| + boost::shared_ptr<set<unsigned int> > blockskiplist(new set<unsigned int>()); | |
| if(renderControlThread == NULL) | |
| #ifndef USE_OFFICIAL_BOOST | |
| @@ -1441,7 +1441,7 @@ | |
| viewThreadData.clear(); | |
| } | |
| -void View::SetNextRectangle(TaskQueue&, shared_ptr<set<unsigned int> > bsl, unsigned int fs) | |
| +void View::SetNextRectangle(TaskQueue&, boost::shared_ptr<set<unsigned int> > bsl, unsigned int fs) | |
| { | |
| viewData.SetNextRectangle(*bsl, fs); | |
| } | |
| diff -Naur source/backend/scene/view.h source/backend/scene/view.h | |
| --- source/backend/scene/view.h 2012-02-05 15:53:55.000000000 -0500 | |
| +++ source/backend/scene/view.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -283,7 +283,7 @@ | |
| * Get the scene data for this view. | |
| * @return Scene data. | |
| */ | |
| - inline shared_ptr<SceneData>& GetSceneData() { return sceneData; } | |
| + inline boost::shared_ptr<SceneData>& GetSceneData() { return sceneData; } | |
| /** | |
| * Get the view id for this view. | |
| @@ -382,7 +382,7 @@ | |
| /// generated radiosity data | |
| RadiosityCache radiosityCache; | |
| /// scene data | |
| - shared_ptr<SceneData> sceneData; | |
| + boost::shared_ptr<SceneData> sceneData; | |
| /// view id | |
| RenderBackend::ViewId viewId; | |
| @@ -406,7 +406,7 @@ | |
| * Create view data. | |
| * @param sd Scene data associated with the view data. | |
| */ | |
| - ViewData(shared_ptr<SceneData> sd); | |
| + ViewData(boost::shared_ptr<SceneData> sd); | |
| /** | |
| * Destructor. | |
| @@ -521,7 +521,7 @@ | |
| * @param vid Id of this view to include with | |
| * POVMS messages sent to the frontend. | |
| */ | |
| - explicit View(shared_ptr<SceneData> sd, unsigned int width, unsigned int height, RenderBackend::ViewId vid); | |
| + explicit View(boost::shared_ptr<SceneData> sd, unsigned int width, unsigned int height, RenderBackend::ViewId vid); | |
| /// not available | |
| View& operator=(const View&); | |
| @@ -545,7 +545,7 @@ | |
| * @param bsl Block serial numbers to skip. | |
| * @param fs First block to start with checking with serial number. | |
| */ | |
| - void SetNextRectangle(TaskQueue& taskq, shared_ptr<set<unsigned int> > bsl, unsigned int fs); | |
| + void SetNextRectangle(TaskQueue& taskq, boost::shared_ptr<set<unsigned int> > bsl, unsigned int fs); | |
| /** | |
| * Thread controlling the render task queue. | |
| diff -Naur source/backend/shape/truetype.cpp source/backend/shape/truetype.cpp | |
| --- source/backend/shape/truetype.cpp 2012-02-05 15:54:02.000000000 -0500 | |
| +++ source/backend/shape/truetype.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -395,8 +395,8 @@ | |
| int compare_tag4(BYTE *ttf_tag, BYTE *known_tag); | |
| /* Internal TTF input routines */ | |
| -FontFileInfo *ProcessFontFile(const char *fontfilename, Parser *parser, shared_ptr<SceneData>& sceneData); | |
| -FontFileInfo *OpenFontFile(const char *filename, Parser *parser, shared_ptr<SceneData>& sceneData); | |
| +FontFileInfo *ProcessFontFile(const char *fontfilename, Parser *parser, boost::shared_ptr<SceneData>& sceneData); | |
| +FontFileInfo *OpenFontFile(const char *filename, Parser *parser, boost::shared_ptr<SceneData>& sceneData); | |
| void ProcessHeadTable(FontFileInfo *ffile, int head_table_offset); | |
| void ProcessLocaTable(FontFileInfo *ffile, int loca_table_offset); | |
| void ProcessMaxpTable(FontFileInfo *ffile, int maxp_table_offset); | |
| @@ -509,7 +509,7 @@ | |
| * - | |
| * | |
| ******************************************************************************/ | |
| -void TrueType::ProcessNewTTF(CSG *Object, const char *filename, UCS2 *text_string, DBL depth, VECTOR offset, Parser *parser, shared_ptr<SceneData>& sceneData) | |
| +void TrueType::ProcessNewTTF(CSG *Object, const char *filename, UCS2 *text_string, DBL depth, VECTOR offset, Parser *parser, boost::shared_ptr<SceneData>& sceneData) | |
| { | |
| FontFileInfo *ffile; | |
| VECTOR local_offset, total_offset; | |
| @@ -760,7 +760,7 @@ | |
| * Reordered table parsing to avoid lots of file seeking - Jan 1996 [AED] | |
| * | |
| ******************************************************************************/ | |
| -FontFileInfo *ProcessFontFile(const char *fontfilename, Parser *parser, shared_ptr<SceneData>& sceneData) | |
| +FontFileInfo *ProcessFontFile(const char *fontfilename, Parser *parser, boost::shared_ptr<SceneData>& sceneData) | |
| { | |
| unsigned i; | |
| int head_table_offset = 0; | |
| @@ -929,7 +929,7 @@ | |
| * - | |
| * | |
| ******************************************************************************/ | |
| -FontFileInfo *OpenFontFile(const char *asciifn, Parser *parser, shared_ptr<SceneData>& sceneData) | |
| +FontFileInfo *OpenFontFile(const char *asciifn, Parser *parser, boost::shared_ptr<SceneData>& sceneData) | |
| { | |
| /* int i; */ /* tw, mtg */ | |
| FontFileInfo *fontlist; | |
| diff -Naur source/backend/shape/truetype.h source/backend/shape/truetype.h | |
| --- source/backend/shape/truetype.h 2012-02-05 15:54:02.000000000 -0500 | |
| +++ source/backend/shape/truetype.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -137,7 +137,7 @@ | |
| virtual void Invert(); | |
| virtual void Compute_BBox(); | |
| - static void ProcessNewTTF(CSG *Object, const char *filename, UCS2 *text_string, DBL depth, VECTOR offset, Parser *parser, shared_ptr<SceneData>& sceneData); | |
| + static void ProcessNewTTF(CSG *Object, const char *filename, UCS2 *text_string, DBL depth, VECTOR offset, Parser *parser, boost::shared_ptr<SceneData>& sceneData); | |
| protected: | |
| bool Inside_Glyph(double x, double y, const GlyphStruct* glyph) const; | |
| int solve_quad(double *x, double *y, double mindist, DBL maxdist) const; | |
| diff -Naur source/backend/support/fileutil.cpp source/backend/support/fileutil.cpp | |
| --- source/backend/support/fileutil.cpp 2012-02-05 15:54:03.000000000 -0500 | |
| +++ source/backend/support/fileutil.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -263,7 +263,7 @@ | |
| * | |
| ******************************************************************************/ | |
| -IStream *Locate_File(Parser *p, shared_ptr<SceneData>& sd, const UCS2String& filename, unsigned int stype, UCS2String& buffer, bool err_flag) | |
| +IStream *Locate_File(Parser *p, boost::shared_ptr<SceneData>& sd, const UCS2String& filename, unsigned int stype, UCS2String& buffer, bool err_flag) | |
| { | |
| UCS2String fn(filename); | |
| UCS2String foundfile(sd->FindFile(p->GetPOVMSContext(), fn, stype)); | |
| @@ -298,7 +298,7 @@ | |
| return result; | |
| } | |
| /* TODO FIXME - code above should not be there, this is how it should work but this has bugs [trf] | |
| -IStream *Locate_File(Parser *p, shared_ptr<SceneData>& sd, const UCS2String& filename, unsigned int stype, UCS2String& buffer, bool err_flag) | |
| +IStream *Locate_File(Parser *p, boost::shared_ptr<SceneData>& sd, const UCS2String& filename, unsigned int stype, UCS2String& buffer, bool err_flag) | |
| { | |
| UCS2String foundfile(sd->FindFile(p->GetPOVMSContext(), filename, stype)); | |
| diff -Naur source/backend/support/fileutil.h source/backend/support/fileutil.h | |
| --- source/backend/support/fileutil.h 2012-02-05 15:54:03.000000000 -0500 | |
| +++ source/backend/support/fileutil.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -104,7 +104,7 @@ | |
| using namespace pov_base; | |
| -IStream *Locate_File(Parser *p, shared_ptr<SceneData>& sd, const UCS2String& filename, unsigned int stype, UCS2String& buffer, bool err_flag = false); | |
| +IStream *Locate_File(Parser *p, boost::shared_ptr<SceneData>& sd, const UCS2String& filename, unsigned int stype, UCS2String& buffer, bool err_flag = false); | |
| } | |
| diff -Naur source/backend/support/imageutil.cpp source/backend/support/imageutil.cpp | |
| --- source/backend/support/imageutil.cpp 2012-02-05 15:54:03.000000000 -0500 | |
| +++ source/backend/support/imageutil.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -1457,7 +1457,7 @@ | |
| } | |
| -Image *Read_Image(Parser *p, shared_ptr<SceneData>& sd, int filetype, const UCS2 *filename, const Image::ReadOptions& options) | |
| +Image *Read_Image(Parser *p, boost::shared_ptr<SceneData>& sd, int filetype, const UCS2 *filename, const Image::ReadOptions& options) | |
| { | |
| unsigned int stype; | |
| Image::ImageFileType type; | |
| diff -Naur source/backend/support/imageutil.h source/backend/support/imageutil.h | |
| --- source/backend/support/imageutil.h 2012-02-05 15:54:03.000000000 -0500 | |
| +++ source/backend/support/imageutil.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -176,7 +176,7 @@ | |
| ImageData *Copy_Image(ImageData *old); | |
| ImageData *Create_Image(void); | |
| void Destroy_Image(ImageData *image); | |
| -Image *Read_Image(Parser *p, shared_ptr<SceneData>& sd, int filetype, const UCS2 *filename, const Image::ReadOptions& options); | |
| +Image *Read_Image(Parser *p, boost::shared_ptr<SceneData>& sd, int filetype, const UCS2 *filename, const Image::ReadOptions& options); | |
| } | |
| diff -Naur source/backend/support/randomsequences.cpp source/backend/support/randomsequences.cpp | |
| --- source/backend/support/randomsequences.cpp 2012-02-05 15:54:04.000000000 -0500 | |
| +++ source/backend/support/randomsequences.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -242,7 +242,7 @@ | |
| HybridNumberGenerator(size_t size = 0); | |
| virtual Type operator()(); | |
| - virtual shared_ptr<vector<Type> > GetSequence(size_t count); | |
| + virtual boost::shared_ptr<vector<Type> > GetSequence(size_t count); | |
| virtual size_t MaxIndex() const; | |
| virtual size_t CycleLength() const; | |
| virtual void Seed(size_t seed); | |
| @@ -363,8 +363,8 @@ | |
| protected: | |
| - shared_ptr<HaltonDoubleGenerator> generatorA; | |
| - shared_ptr<HaltonDoubleGenerator> generatorB; | |
| + boost::shared_ptr<HaltonDoubleGenerator> generatorA; | |
| + boost::shared_ptr<HaltonDoubleGenerator> generatorB; | |
| }; | |
| /** | |
| @@ -439,22 +439,22 @@ | |
| public: | |
| /// Sets up the factory to use a given sequence. | |
| - NumberSequenceFactory(shared_ptr<vector<Type> const> masterSequence); | |
| + NumberSequenceFactory(boost::shared_ptr<vector<Type> const> masterSequence); | |
| /// Sets up the factory to use a given number source. | |
| - NumberSequenceFactory(shared_ptr<SequentialNumberGenerator<Type> > master); | |
| + NumberSequenceFactory(boost::shared_ptr<SequentialNumberGenerator<Type> > master); | |
| /// Sets up the factory to use a given number source, pre-computing a given number of elements. | |
| - NumberSequenceFactory(shared_ptr<SequentialNumberGenerator<Type> > master, size_t count); | |
| + NumberSequenceFactory(boost::shared_ptr<SequentialNumberGenerator<Type> > master, size_t count); | |
| /// Gets a reference to a table of pre-computed numbers having at least the given size. | |
| /// @note The vector returned may contain more elements than requested. | |
| - shared_ptr<vector<Type> const> operator()(size_t count); | |
| + boost::shared_ptr<vector<Type> const> operator()(size_t count); | |
| protected: | |
| typedef SequentialNumberGenerator<Type> Generator; | |
| - typedef shared_ptr<Generator> GeneratorPtr; | |
| + typedef boost::shared_ptr<Generator> GeneratorPtr; | |
| typedef vector<Type> Sequence; | |
| - typedef shared_ptr<Sequence> SequencePtr; | |
| - typedef shared_ptr<Sequence const> SequenceConstPtr; | |
| + typedef boost::shared_ptr<Sequence> SequencePtr; | |
| + typedef boost::shared_ptr<Sequence const> SequenceConstPtr; | |
| GeneratorPtr master; | |
| SequenceConstPtr masterSequence; | |
| @@ -474,12 +474,12 @@ | |
| { | |
| public: | |
| - static shared_ptr<NumberSequenceFactory<ValueType> > GetFactory(const typename GeneratorType::ParameterStruct& param); | |
| + static boost::shared_ptr<NumberSequenceFactory<ValueType> > GetFactory(const typename GeneratorType::ParameterStruct& param); | |
| protected: | |
| typedef NumberSequenceFactory<ValueType> Factory; | |
| - typedef shared_ptr<Factory> FactoryPtr; | |
| + typedef boost::shared_ptr<Factory> FactoryPtr; | |
| typedef boost::weak_ptr<Factory> FactoryWeakPtr; | |
| typedef std::map<typename GeneratorType::ParameterStruct, FactoryWeakPtr> FactoryTable; | |
| @@ -506,7 +506,7 @@ | |
| public: | |
| /// Construct from a sequence factory. | |
| - PrecomputedNumberGenerator(shared_ptr<NumberSequenceFactory<Type> > master, size_t size) : | |
| + PrecomputedNumberGenerator(boost::shared_ptr<NumberSequenceFactory<Type> > master, size_t size) : | |
| HybridNumberGenerator<Type>(size), | |
| values((*master)(size)), | |
| startIndex(startIndex) | |
| @@ -520,11 +520,11 @@ | |
| return (*values)[i % size]; | |
| } | |
| /// Returns a particular subset from the sequence. | |
| - virtual shared_ptr<vector<Type> > GetSequence(size_t index, size_t count) const | |
| + virtual boost::shared_ptr<vector<Type> > GetSequence(size_t index, size_t count) const | |
| { | |
| // According to C++ standard, template classes cannot refer to parent template classes' members by unqualified name | |
| const size_t& size = HybridNumberGenerator<Type>::size; | |
| - shared_ptr<vector<Type> > data(new vector<Type>); | |
| + boost::shared_ptr<vector<Type> > data(new vector<Type>); | |
| data->reserve(count); | |
| size_t i = index % size; | |
| while (count >= size - i) // handle wrap-around | |
| @@ -539,7 +539,7 @@ | |
| protected: | |
| - shared_ptr<vector<Type> const> values; | |
| + boost::shared_ptr<vector<Type> const> values; | |
| size_t startIndex; | |
| }; | |
| @@ -570,9 +570,9 @@ | |
| } | |
| template<class Type> | |
| -shared_ptr<vector<Type> > HybridNumberGenerator<Type>::GetSequence(size_t count) | |
| +boost::shared_ptr<vector<Type> > HybridNumberGenerator<Type>::GetSequence(size_t count) | |
| { | |
| - shared_ptr<vector<Type> > data(IndexedNumberGenerator<Type>::GetSequence(index, count)); | |
| + boost::shared_ptr<vector<Type> > data(IndexedNumberGenerator<Type>::GetSequence(index, count)); | |
| index += count; | |
| if (size != 0) | |
| index = index % size; | |
| @@ -701,24 +701,24 @@ | |
| *********************************************************************************/ | |
| template<class Type> | |
| -NumberSequenceFactory<Type>::NumberSequenceFactory(shared_ptr<vector<Type> const> masterSequence) : | |
| +NumberSequenceFactory<Type>::NumberSequenceFactory(boost::shared_ptr<vector<Type> const> masterSequence) : | |
| masterSequence(masterSequence) | |
| {} | |
| template<class Type> | |
| -NumberSequenceFactory<Type>::NumberSequenceFactory(shared_ptr<SequentialNumberGenerator<Type> > master) : | |
| +NumberSequenceFactory<Type>::NumberSequenceFactory(boost::shared_ptr<SequentialNumberGenerator<Type> > master) : | |
| master(master) | |
| {} | |
| template<class Type> | |
| -NumberSequenceFactory<Type>::NumberSequenceFactory(shared_ptr<SequentialNumberGenerator<Type> > master, size_t count) : | |
| +NumberSequenceFactory<Type>::NumberSequenceFactory(boost::shared_ptr<SequentialNumberGenerator<Type> > master, size_t count) : | |
| master(master) | |
| { | |
| (*this)(count); // force initial sequence to be generated | |
| } | |
| template<class Type> | |
| -shared_ptr<vector<Type> const> NumberSequenceFactory<Type>::operator()(size_t count) | |
| +boost::shared_ptr<vector<Type> const> NumberSequenceFactory<Type>::operator()(size_t count) | |
| { | |
| boost::mutex::scoped_lock lock(masterMutex); | |
| if (!masterSequence) | |
| @@ -764,16 +764,16 @@ | |
| boost::mutex NumberSequenceMetaFactory<ValueType, GeneratorType>::lookupMutex; | |
| template<class ValueType, class GeneratorType> | |
| -shared_ptr<NumberSequenceFactory<ValueType> > NumberSequenceMetaFactory<ValueType, GeneratorType>::GetFactory(const typename GeneratorType::ParameterStruct& param) | |
| +boost::shared_ptr<NumberSequenceFactory<ValueType> > NumberSequenceMetaFactory<ValueType, GeneratorType>::GetFactory(const typename GeneratorType::ParameterStruct& param) | |
| { | |
| boost::mutex::scoped_lock lock(lookupMutex); | |
| if (!lookupTable) | |
| lookupTable = new FactoryTable(); | |
| - shared_ptr<NumberSequenceFactory<ValueType> > factory = (*lookupTable)[param].lock(); | |
| + boost::shared_ptr<NumberSequenceFactory<ValueType> > factory = (*lookupTable)[param].lock(); | |
| if (!factory) | |
| { | |
| - shared_ptr<GeneratorType> masterGenerator(new GeneratorType(param)); | |
| - factory = shared_ptr<NumberSequenceFactory<ValueType> >(new NumberSequenceFactory<ValueType>(masterGenerator)); | |
| + boost::shared_ptr<GeneratorType> masterGenerator(new GeneratorType(param)); | |
| + factory = boost::shared_ptr<NumberSequenceFactory<ValueType> >(new NumberSequenceFactory<ValueType>(masterGenerator)); | |
| (*lookupTable)[param] = factory; | |
| } | |
| return factory; | |
| @@ -929,7 +929,7 @@ | |
| { | |
| assert (count > 0); | |
| Mt19937IntGenerator::ParameterStruct param(minval, maxval); | |
| - shared_ptr<NumberSequenceFactory<int> > factory = Mt19937IntMetaFactory::GetFactory(param); | |
| + boost::shared_ptr<NumberSequenceFactory<int> > factory = Mt19937IntMetaFactory::GetFactory(param); | |
| SeedableIntGeneratorPtr generator(new PrecomputedIntGenerator(factory, count)); | |
| (void)(*generator)(); // legacy fix | |
| return generator; | |
| @@ -939,7 +939,7 @@ | |
| { | |
| assert (count > 0); | |
| Mt19937DoubleGenerator::ParameterStruct param(minval, maxval); | |
| - shared_ptr<NumberSequenceFactory<double> > factory(Mt19937DoubleMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<double> > factory(Mt19937DoubleMetaFactory::GetFactory(param)); | |
| SeedableDoubleGeneratorPtr generator(new PrecomputedDoubleGenerator(factory, count)); | |
| (void)(*generator)(); // legacy fix | |
| return generator; | |
| @@ -957,7 +957,7 @@ | |
| { | |
| assert (count > 0); | |
| Mt19937DoubleGenerator::ParameterStruct param(minval, maxval); | |
| - shared_ptr<NumberSequenceFactory<double> > factory(Mt19937DoubleMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<double> > factory(Mt19937DoubleMetaFactory::GetFactory(param)); | |
| return IndexedDoubleGeneratorPtr(new PrecomputedDoubleGenerator(factory, count)); | |
| } | |
| @@ -966,7 +966,7 @@ | |
| if ((id == 0) && count && (count < LegacyCosWeightedDirectionGenerator::NumEntries)) | |
| { | |
| LegacyCosWeightedDirectionGenerator::ParameterStruct param; | |
| - shared_ptr<NumberSequenceFactory<Vector3d> > factory(LegacyCosWeightedDirectionMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<Vector3d> > factory(LegacyCosWeightedDirectionMetaFactory::GetFactory(param)); | |
| return SequentialVectorGeneratorPtr(new PrecomputedVectorGenerator(factory, count)); | |
| } | |
| else | |
| @@ -974,7 +974,7 @@ | |
| HaltonCosWeightedDirectionGenerator::ParameterStruct param(primeTable[id % PRIME_TABLE_COUNT], primeTable[(id+1) % PRIME_TABLE_COUNT]); | |
| if (count) | |
| { | |
| - shared_ptr<NumberSequenceFactory<Vector3d> > factory(HaltonCosWeightedDirectionMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<Vector3d> > factory(HaltonCosWeightedDirectionMetaFactory::GetFactory(param)); | |
| return SequentialVectorGeneratorPtr(new PrecomputedVectorGenerator(factory, count)); | |
| } | |
| else | |
| @@ -987,7 +987,7 @@ | |
| HaltonDoubleGenerator::ParameterStruct param(primeTable[id % PRIME_TABLE_COUNT], minval, maxval); | |
| if (count) | |
| { | |
| - shared_ptr<NumberSequenceFactory<double> > factory(HaltonUniformDoubleMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<double> > factory(HaltonUniformDoubleMetaFactory::GetFactory(param)); | |
| return SequentialDoubleGeneratorPtr(new PrecomputedDoubleGenerator(factory, count)); | |
| } | |
| else | |
| @@ -999,7 +999,7 @@ | |
| HaltonUniformDirectionGenerator::ParameterStruct param(primeTable[id % PRIME_TABLE_COUNT], primeTable[(id+1) % PRIME_TABLE_COUNT]); | |
| if (count) | |
| { | |
| - shared_ptr<NumberSequenceFactory<Vector3d> > factory(HaltonUniformDirectionMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<Vector3d> > factory(HaltonUniformDirectionMetaFactory::GetFactory(param)); | |
| return SequentialVectorGeneratorPtr(new PrecomputedVectorGenerator(factory, count)); | |
| } | |
| else | |
| @@ -1011,7 +1011,7 @@ | |
| HaltonOnDiscGenerator::ParameterStruct param(primeTable[id % PRIME_TABLE_COUNT], primeTable[(id+1) % PRIME_TABLE_COUNT], radius); | |
| if (count) | |
| { | |
| - shared_ptr<NumberSequenceFactory<Vector2d> > factory(HaltonOnDiscMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<Vector2d> > factory(HaltonOnDiscMetaFactory::GetFactory(param)); | |
| return SequentialVector2dGeneratorPtr(new PrecomputedVector2dGenerator(factory, count)); | |
| } | |
| else | |
| @@ -1023,7 +1023,7 @@ | |
| Halton2dGenerator::ParameterStruct param(primeTable[id % PRIME_TABLE_COUNT], primeTable[(id+1) % PRIME_TABLE_COUNT], minX, maxX, minY, maxY); | |
| if (count) | |
| { | |
| - shared_ptr<NumberSequenceFactory<Vector2d> > factory(Halton2dMetaFactory::GetFactory(param)); | |
| + boost::shared_ptr<NumberSequenceFactory<Vector2d> > factory(Halton2dMetaFactory::GetFactory(param)); | |
| return SequentialVector2dGeneratorPtr(new PrecomputedVector2dGenerator(factory, count)); | |
| } | |
| else | |
| diff -Naur source/backend/support/randomsequences.h source/backend/support/randomsequences.h | |
| --- source/backend/support/randomsequences.h 2012-02-05 15:54:04.000000000 -0500 | |
| +++ source/backend/support/randomsequences.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -177,9 +177,9 @@ | |
| /// Returns the next number from the sequence. | |
| virtual Type operator()() = 0; | |
| /// Returns the next N numbers from the sequence. | |
| - virtual shared_ptr<vector<Type> > GetSequence(size_t count) | |
| + virtual boost::shared_ptr<vector<Type> > GetSequence(size_t count) | |
| { | |
| - shared_ptr<vector<Type> > data(new vector<Type>); | |
| + boost::shared_ptr<vector<Type> > data(new vector<Type>); | |
| data->reserve(count); | |
| for (size_t i = 0; i < count; i ++) | |
| data->push_back((*this)()); | |
| @@ -206,9 +206,9 @@ | |
| /// Returns a particular number from the sequence. | |
| virtual Type operator[](size_t index) const = 0; | |
| /// Returns a particular subsequence from the sequence. | |
| - virtual shared_ptr<vector<Type> > GetSequence(size_t index, size_t count) const | |
| + virtual boost::shared_ptr<vector<Type> > GetSequence(size_t index, size_t count) const | |
| { | |
| - shared_ptr<vector<Type> > data(new vector<Type>); | |
| + boost::shared_ptr<vector<Type> > data(new vector<Type>); | |
| data->reserve(count); | |
| for (size_t i = 0; i < count; i ++) | |
| data->push_back((*this)[index + i]); | |
| @@ -235,20 +235,20 @@ | |
| * @{ | |
| */ | |
| -typedef shared_ptr<SequentialNumberGenerator<int> > SequentialIntGeneratorPtr; | |
| -typedef shared_ptr<SequentialNumberGenerator<double> > SequentialDoubleGeneratorPtr; | |
| -typedef shared_ptr<SequentialNumberGenerator<Vector3d> > SequentialVectorGeneratorPtr; | |
| -typedef shared_ptr<SequentialNumberGenerator<Vector2d> > SequentialVector2dGeneratorPtr; | |
| - | |
| -typedef shared_ptr<SeedableNumberGenerator<int> > SeedableIntGeneratorPtr; | |
| -typedef shared_ptr<SeedableNumberGenerator<double> > SeedableDoubleGeneratorPtr; | |
| -typedef shared_ptr<SeedableNumberGenerator<Vector3d> > SeedableVectorGeneratorPtr; | |
| -typedef shared_ptr<SeedableNumberGenerator<Vector2d> > SeedableVector2dGeneratorPtr; | |
| - | |
| -typedef shared_ptr<IndexedNumberGenerator<int> const> IndexedIntGeneratorPtr; | |
| -typedef shared_ptr<IndexedNumberGenerator<double> const> IndexedDoubleGeneratorPtr; | |
| -typedef shared_ptr<IndexedNumberGenerator<Vector3d> const> IndexedVectorGeneratorPtr; | |
| -typedef shared_ptr<IndexedNumberGenerator<Vector2d> const> IndexedVector2dGeneratorPtr; | |
| +typedef boost::shared_ptr<SequentialNumberGenerator<int> > SequentialIntGeneratorPtr; | |
| +typedef boost::shared_ptr<SequentialNumberGenerator<double> > SequentialDoubleGeneratorPtr; | |
| +typedef boost::shared_ptr<SequentialNumberGenerator<Vector3d> > SequentialVectorGeneratorPtr; | |
| +typedef boost::shared_ptr<SequentialNumberGenerator<Vector2d> > SequentialVector2dGeneratorPtr; | |
| + | |
| +typedef boost::shared_ptr<SeedableNumberGenerator<int> > SeedableIntGeneratorPtr; | |
| +typedef boost::shared_ptr<SeedableNumberGenerator<double> > SeedableDoubleGeneratorPtr; | |
| +typedef boost::shared_ptr<SeedableNumberGenerator<Vector3d> > SeedableVectorGeneratorPtr; | |
| +typedef boost::shared_ptr<SeedableNumberGenerator<Vector2d> > SeedableVector2dGeneratorPtr; | |
| + | |
| +typedef boost::shared_ptr<IndexedNumberGenerator<int> const> IndexedIntGeneratorPtr; | |
| +typedef boost::shared_ptr<IndexedNumberGenerator<double> const> IndexedDoubleGeneratorPtr; | |
| +typedef boost::shared_ptr<IndexedNumberGenerator<Vector3d> const> IndexedVectorGeneratorPtr; | |
| +typedef boost::shared_ptr<IndexedNumberGenerator<Vector2d> const> IndexedVector2dGeneratorPtr; | |
| /** | |
| * @} | |
| diff -Naur source/backend/support/taskqueue.cpp source/backend/support/taskqueue.cpp | |
| --- source/backend/support/taskqueue.cpp 2012-02-05 15:54:04.000000000 -0500 | |
| +++ source/backend/support/taskqueue.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -208,7 +208,7 @@ | |
| failed = false; | |
| - queuedTasks.push(TaskEntry(shared_ptr<Task>(task))); | |
| + queuedTasks.push(TaskEntry(boost::shared_ptr<Task>(task))); | |
| Notify(); | |
| diff -Naur source/backend/support/taskqueue.h source/backend/support/taskqueue.h | |
| --- source/backend/support/taskqueue.h 2012-02-05 15:54:04.000000000 -0500 | |
| +++ source/backend/support/taskqueue.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -118,19 +118,19 @@ | |
| }; | |
| TaskEntry(EntryType et) : entryType(et) { } | |
| - TaskEntry(shared_ptr<Task> rt) : entryType(kTask), task(rt) { } | |
| + TaskEntry(boost::shared_ptr<Task> rt) : entryType(kTask), task(rt) { } | |
| TaskEntry(POVMS_Message& m) : entryType(kMessage), msg(m) { } | |
| TaskEntry(const boost::function1<void, TaskQueue&>& f) : entryType(kFunction), fn(f) { } | |
| ~TaskEntry() { } | |
| - shared_ptr<Task> GetTask() { return task; } | |
| + boost::shared_ptr<Task> GetTask() { return task; } | |
| POVMS_Message& GetMessage() { return msg; } | |
| boost::function1<void, TaskQueue&>& GetFunction() { return fn; } | |
| EntryType GetEntryType() { return entryType; } | |
| private: | |
| EntryType entryType; | |
| - shared_ptr<Task> task; | |
| + boost::shared_ptr<Task> task; | |
| POVMS_Message msg; | |
| boost::function1<void, TaskQueue&> fn; | |
| }; | |
| diff -Naur source/base/image/colourspace.cpp source/base/image/colourspace.cpp | |
| --- source/base/image/colourspace.cpp 2012-02-05 15:54:10.000000000 -0500 | |
| +++ source/base/image/colourspace.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -169,7 +169,7 @@ | |
| else if (oldInstance->Matches(newInstance)) | |
| { | |
| // Found a matching curve in the cache, so use that instead, and (as far as we're concerned) | |
| - // just forget that the new instance ever existed (allowing the shared_ptr mechanism to garbage-collect it) | |
| + // just forget that the new instance ever existed (allowing the boost::shared_ptr mechanism to garbage-collect it) | |
| return oldInstance; | |
| } | |
| } | |
| diff -Naur source/base/image/colourspace.h source/base/image/colourspace.h | |
| --- source/base/image/colourspace.h 2012-02-05 15:54:10.000000000 -0500 | |
| +++ source/base/image/colourspace.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -109,7 +109,7 @@ | |
| /** | |
| * Class holding a shared reference to a gamma curve. | |
| - * @note This is a boost shared_ptr; the assignment operator (=) may not work as expected, | |
| + * @note This is a boost boost::shared_ptr; the assignment operator (=) may not work as expected, | |
| * as it is in fact implemented as a swap operation. | |
| * To clone a reference, use "GammaCurvePtr myNewPtr(myOldPtr);". | |
| */ | |
| @@ -117,7 +117,7 @@ | |
| /** | |
| * Class holding a shared reference to a simple gamma curve. | |
| - * @note This is a boost shared_ptr; the assignment operator (=) may not work as expected, | |
| + * @note This is a boost boost::shared_ptr; the assignment operator (=) may not work as expected, | |
| * as it is in fact implemented as a swap operation. | |
| * To clone a reference, use "SimpleGammaCurvePtr myNewPtr(myOldPtr);". | |
| */ | |
| diff -Naur source/frontend/imageprocessing.cpp source/frontend/imageprocessing.cpp | |
| --- source/frontend/imageprocessing.cpp 2012-02-05 15:54:16.000000000 -0500 | |
| +++ source/frontend/imageprocessing.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -121,7 +121,7 @@ | |
| ImageProcessing::ImageProcessing(unsigned int width, unsigned int height) | |
| { | |
| - image = shared_ptr<Image>(Image::Create(width, height, Image::RGBFT_Float)); | |
| + image = boost::shared_ptr<Image>(Image::Create(width, height, Image::RGBFT_Float)); | |
| toStderr = toStdout = false; | |
| // TODO FIXME - find a better place for this | |
| @@ -135,7 +135,7 @@ | |
| unsigned int blockSize(ropts.TryGetInt(kPOVAttrib_RenderBlockSize, 32)); | |
| unsigned int maxBufferMem(ropts.TryGetInt(kPOVAttrib_MaxImageBufferMem, 128)); // number is megabytes | |
| - image = shared_ptr<Image>(Image::Create(width, height, Image::RGBFT_Float, maxBufferMem, blockSize * blockSize)); | |
| + image = boost::shared_ptr<Image>(Image::Create(width, height, Image::RGBFT_Float, maxBufferMem, blockSize * blockSize)); | |
| toStdout = OutputIsStdout(ropts); | |
| toStderr = OutputIsStderr(ropts); | |
| @@ -143,7 +143,7 @@ | |
| image->SetPremultiplied(true); // POV-Ray uses premultiplied opacity for its math, so that's what will end up in the image container | |
| } | |
| -ImageProcessing::ImageProcessing(shared_ptr<Image>& img) | |
| +ImageProcessing::ImageProcessing(boost::shared_ptr<Image>& img) | |
| { | |
| image = img; | |
| toStderr = toStdout = false; | |
| @@ -246,7 +246,7 @@ | |
| return UCS2String(); | |
| } | |
| -shared_ptr<Image>& ImageProcessing::GetImage() | |
| +boost::shared_ptr<Image>& ImageProcessing::GetImage() | |
| { | |
| return image; | |
| } | |
| diff -Naur source/frontend/imageprocessing.h source/frontend/imageprocessing.h | |
| --- source/frontend/imageprocessing.h 2012-02-05 15:54:16.000000000 -0500 | |
| +++ source/frontend/imageprocessing.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -114,12 +114,12 @@ | |
| public: | |
| ImageProcessing(unsigned int width, unsigned int height); | |
| ImageProcessing(POVMS_Object& ropts); | |
| - ImageProcessing(shared_ptr<Image>& img); | |
| + ImageProcessing(boost::shared_ptr<Image>& img); | |
| virtual ~ImageProcessing(); | |
| UCS2String WriteImage(POVMS_Object& ropts, POVMSInt frame = 0, int digits = 0); | |
| - shared_ptr<Image>& GetImage(); | |
| + boost::shared_ptr<Image>& GetImage(); | |
| UCS2String GetOutputFilename(POVMS_Object& ropts, POVMSInt frame, int digits); | |
| bool OutputIsStdout(void) { return toStdout; } | |
| @@ -127,7 +127,7 @@ | |
| virtual bool OutputIsStdout(POVMS_Object& ropts); | |
| virtual bool OutputIsStderr(POVMS_Object& ropts); | |
| protected: | |
| - shared_ptr<Image> image; | |
| + boost::shared_ptr<Image> image; | |
| bool toStdout; | |
| bool toStderr; | |
| diff -Naur source/frontend/renderfrontend.cpp source/frontend/renderfrontend.cpp | |
| --- source/frontend/renderfrontend.cpp 2012-02-05 15:54:17.000000000 -0500 | |
| +++ source/frontend/renderfrontend.cpp 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -202,7 +202,7 @@ | |
| // nothing to do | |
| } | |
| -void RenderFrontendBase::ConnectToBackend(POVMSAddress backendaddress, POVMS_Object& obj, POVMS_Object *resultobj, shared_ptr<Console>& console) | |
| +void RenderFrontendBase::ConnectToBackend(POVMSAddress backendaddress, POVMS_Object& obj, POVMS_Object *resultobj, boost::shared_ptr<Console>& console) | |
| { | |
| POVMS_Message msg(obj, kPOVMsgClass_BackendControl, kPOVMsgIdent_InitInfo); | |
| POVMS_Message result(kPOVObjectClass_ResultData); | |
| @@ -654,7 +654,7 @@ | |
| MakeBackupPath(ropts, vd, outputpath); | |
| if(POV_ALLOW_FILE_WRITE(vd.imageBackupFile().c_str(), POV_File_Data_Backup) == false) | |
| throw POV_EXCEPTION(kCannotOpenFileErr, "Permission denied to create render state output file."); | |
| - vd.imageBackup = shared_ptr<OStream>(POV_PLATFORM_BASE.CreateOStream(POV_File_Data_Backup)); | |
| + vd.imageBackup = boost::shared_ptr<OStream>(POV_PLATFORM_BASE.CreateOStream(POV_File_Data_Backup)); | |
| if(vd.imageBackup != NULL) | |
| { | |
| Backup_File_Header hdr; | |
| @@ -769,7 +769,7 @@ | |
| // if there isn't going to be an output file, we don't write to the state file | |
| if(outputToFile == true) | |
| { | |
| - vd.imageBackup = shared_ptr<OStream>(POV_PLATFORM_BASE.CreateOStream(POV_File_Data_Backup)); | |
| + vd.imageBackup = boost::shared_ptr<OStream>(POV_PLATFORM_BASE.CreateOStream(POV_File_Data_Backup)); | |
| if(vd.imageBackup != NULL) | |
| { | |
| if(vd.imageBackup->open(vd.imageBackupFile().c_str(), IOBase::append) == false) | |
| diff -Naur source/frontend/renderfrontend.h source/frontend/renderfrontend.h | |
| --- source/frontend/renderfrontend.h 2012-02-05 15:54:18.000000000 -0500 | |
| +++ source/frontend/renderfrontend.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -154,7 +154,7 @@ | |
| SceneState state; | |
| - mutable shared_ptr<Console> console; | |
| + mutable boost::shared_ptr<Console> console; | |
| mutable list<POVMS_Object> readfiles; | |
| mutable list<POVMS_Object> createdfiles; | |
| @@ -164,7 +164,7 @@ | |
| list<Path> searchpaths; | |
| - shared_ptr<TextStreamBuffer> streams[MAX_STREAMS]; | |
| + boost::shared_ptr<TextStreamBuffer> streams[MAX_STREAMS]; | |
| UCS2String streamnames[MAX_STREAMS]; | |
| bool consoleoutput[MAX_STREAMS]; | |
| @@ -197,9 +197,9 @@ | |
| ViewState state; | |
| - mutable shared_ptr<Image> image; | |
| - mutable shared_ptr<Display> display; | |
| - mutable shared_ptr<OStream> imageBackup; | |
| + mutable boost::shared_ptr<Image> image; | |
| + mutable boost::shared_ptr<Display> display; | |
| + mutable boost::shared_ptr<OStream> imageBackup; | |
| Path imageBackupFile; | |
| }; | |
| @@ -273,12 +273,12 @@ | |
| RenderFrontendBase(POVMSContext); | |
| virtual ~RenderFrontendBase(); | |
| - void ConnectToBackend(POVMSAddress, POVMS_Object&, POVMS_Object *, shared_ptr<Console>&); | |
| + void ConnectToBackend(POVMSAddress, POVMS_Object&, POVMS_Object *, boost::shared_ptr<Console>&); | |
| void DisconnectFromBackend(POVMSAddress); | |
| - virtual shared_ptr<Console> GetConsole(SceneId) = 0; | |
| - virtual shared_ptr<Image> GetImage(ViewId) = 0; | |
| - virtual shared_ptr<Display> GetDisplay(ViewId) = 0; | |
| + virtual boost::shared_ptr<Console> GetConsole(SceneId) = 0; | |
| + virtual boost::shared_ptr<Image> GetImage(ViewId) = 0; | |
| + virtual boost::shared_ptr<Display> GetDisplay(ViewId) = 0; | |
| protected: | |
| set<POVMSAddress> backendaddresses; | |
| POVMSContext context; | |
| @@ -345,7 +345,7 @@ | |
| void ResumeParser(SceneId sid); | |
| void StopParser(SceneId sid); | |
| - ViewId CreateView(SceneId sid, POVMS_Object& obj, shared_ptr<ImageProcessing>& imageProcessing, boost::function<Display *(unsigned int, unsigned int, GammaCurvePtr)> fn); | |
| + ViewId CreateView(SceneId sid, POVMS_Object& obj, boost::shared_ptr<ImageProcessing>& imageProcessing, boost::function<Display *(unsigned int, unsigned int, GammaCurvePtr)> fn); | |
| void CloseView(ViewId vid); | |
| ViewData::ViewState GetViewState(ViewId vid); | |
| @@ -355,9 +355,9 @@ | |
| void ResumeRender(ViewId vid); | |
| void StopRender(ViewId vid); | |
| - virtual shared_ptr<Console> GetConsole(SceneId sid); | |
| - virtual shared_ptr<Image> GetImage(ViewId vid); | |
| - virtual shared_ptr<Display> GetDisplay(ViewId vid); | |
| + virtual boost::shared_ptr<Console> GetConsole(SceneId sid); | |
| + virtual boost::shared_ptr<Image> GetImage(ViewId vid); | |
| + virtual boost::shared_ptr<Display> GetDisplay(ViewId vid); | |
| protected: | |
| virtual void HandleParserMessage(SceneId sid, POVMSType ident, POVMS_Object& msg); | |
| virtual void HandleFileMessage(SceneId sid, POVMSType ident, POVMS_Object& msg, POVMS_Object& result); | |
| @@ -398,7 +398,7 @@ | |
| sid = RenderFrontendBase::CreateScene(sh.data, backendaddress, obj); | |
| - sh.data.console = shared_ptr<Console>(fn()); | |
| + sh.data.console = boost::shared_ptr<Console>(fn()); | |
| scenehandler[sid] = sh; | |
| scene2views[sid] = set<ViewId>(); | |
| @@ -488,7 +488,7 @@ | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -RenderFrontendBase::ViewId RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::CreateView(SceneId sid, POVMS_Object& obj, shared_ptr<ImageProcessing>& imageProcessing, boost::function<Display *(unsigned int,unsigned int,GammaCurvePtr)> fn) | |
| +RenderFrontendBase::ViewId RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::CreateView(SceneId sid, POVMS_Object& obj, boost::shared_ptr<ImageProcessing>& imageProcessing, boost::function<Display *(unsigned int,unsigned int,GammaCurvePtr)> fn) | |
| { | |
| typename map<SceneId, SceneHandler>::iterator shi(scenehandler.find(sid)); | |
| @@ -584,7 +584,7 @@ | |
| { | |
| if (imageProcessing == NULL) | |
| throw POV_EXCEPTION(kNullPointerErr, "Internal error: output to file is set, but no ImageProcessing object supplied"); | |
| - shared_ptr<Image> img(imageProcessing->GetImage()); | |
| + boost::shared_ptr<Image> img(imageProcessing->GetImage()); | |
| if(img != NULL) | |
| { | |
| if((img->GetWidth() != width) || (img->GetHeight() != height)) | |
| @@ -593,11 +593,11 @@ | |
| vh.data.image = img; | |
| } | |
| else | |
| - vh.data.image = shared_ptr<Image>(Image::Create(width, height, Image::RGBFT_Float)); | |
| + vh.data.image = boost::shared_ptr<Image>(Image::Create(width, height, Image::RGBFT_Float)); | |
| } | |
| if(obj.TryGetBool(kPOVAttrib_Display, true) == true) | |
| - vh.data.display = shared_ptr<Display>(fn(width, height, gamma)); | |
| + vh.data.display = boost::shared_ptr<Display>(fn(width, height, gamma)); | |
| viewhandler[vid] = vh; | |
| view2scene[vid] = sid; | |
| @@ -771,33 +771,33 @@ | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -shared_ptr<Console> RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetConsole(SceneId sid) | |
| +boost::shared_ptr<Console> RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetConsole(SceneId sid) | |
| { | |
| typename map<SceneId, SceneHandler>::iterator shi(scenehandler.find(sid)); | |
| if(shi != scenehandler.end()) | |
| return shi->second.data.console; | |
| else | |
| - return shared_ptr<Console>(); | |
| + return boost::shared_ptr<Console>(); | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -shared_ptr<Image> RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetImage(ViewId vid) | |
| +boost::shared_ptr<Image> RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetImage(ViewId vid) | |
| { | |
| typename map<ViewId, ViewHandler>::iterator vhi(viewhandler.find(vid)); | |
| if(vhi != viewhandler.end()) | |
| return vhi->second.data.image; | |
| else | |
| - return shared_ptr<Image>(); | |
| + return boost::shared_ptr<Image>(); | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -shared_ptr<Display> RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetDisplay(ViewId vid) | |
| +boost::shared_ptr<Display> RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetDisplay(ViewId vid) | |
| { | |
| typename map<ViewId, ViewHandler>::iterator vhi(viewhandler.find(vid)); | |
| if(vhi != viewhandler.end()) | |
| return vhi->second.data.display; | |
| else | |
| - return shared_ptr<Display>(); | |
| + return boost::shared_ptr<Display>(); | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| diff -Naur source/frontend/simplefrontend.h source/frontend/simplefrontend.h | |
| --- source/frontend/simplefrontend.h 2012-02-05 15:54:18.000000000 -0500 | |
| +++ source/frontend/simplefrontend.h 2013-11-11 09:08:00.000000000 -0500 | |
| @@ -134,10 +134,10 @@ | |
| SimpleFrontend(POVMSContext ctx, POVMSAddress addr, POVMS_Object& msg, | |
| boost::function<Console *()> cfn, | |
| boost::function<Display *(unsigned int, unsigned int, GammaCurvePtr)> dfn, | |
| - POVMS_Object *result = NULL, shared_ptr<Console> console = shared_ptr<Console>()); | |
| + POVMS_Object *result = NULL, boost::shared_ptr<Console> console = boost::shared_ptr<Console>()); | |
| ~SimpleFrontend(); | |
| - bool Start(POVMS_Object& opts, shared_ptr<Image> img = shared_ptr<Image>()); | |
| + bool Start(POVMS_Object& opts, boost::shared_ptr<Image> img = boost::shared_ptr<Image>()); | |
| bool Stop(); | |
| bool Pause(); | |
| bool Resume(); | |
| @@ -146,9 +146,9 @@ | |
| State GetState() const; | |
| - shared_ptr<Console> GetConsole(); | |
| - shared_ptr<Image> GetImage(); | |
| - shared_ptr<Display> GetDisplay(); | |
| + boost::shared_ptr<Console> GetConsole(); | |
| + boost::shared_ptr<Image> GetImage(); | |
| + boost::shared_ptr<Display> GetDisplay(); | |
| private: | |
| RenderFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH> renderFrontend; | |
| POVMSAddress backendAddress; | |
| @@ -156,9 +156,9 @@ | |
| POVMS_Object options; | |
| RenderFrontendBase::SceneId sceneId; | |
| RenderFrontendBase::ViewId viewId; | |
| - shared_ptr<ImageProcessing> imageProcessing; | |
| - shared_ptr<AnimationProcessing> animationProcessing; | |
| - shared_ptr<ShelloutProcessing> shelloutProcessing; | |
| + boost::shared_ptr<ImageProcessing> imageProcessing; | |
| + boost::shared_ptr<AnimationProcessing> animationProcessing; | |
| + boost::shared_ptr<ShelloutProcessing> shelloutProcessing; | |
| boost::function<Console *()> createConsole; | |
| boost::function<Display *(unsigned int, unsigned int, GammaCurvePtr)> createDisplay; | |
| }; | |
| @@ -167,7 +167,7 @@ | |
| SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::SimpleFrontend(POVMSContext ctx, POVMSAddress addr, POVMS_Object& msg, | |
| boost::function<Console *()> cfn, | |
| boost::function<Display *(unsigned int, unsigned int, GammaCurvePtr)> dfn, | |
| - POVMS_Object *result, shared_ptr<Console> console) : | |
| + POVMS_Object *result, boost::shared_ptr<Console> console) : | |
| renderFrontend(ctx), | |
| backendAddress(addr), | |
| state(kReady), | |
| @@ -185,7 +185,7 @@ | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -bool SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::Start(POVMS_Object& opts, shared_ptr<Image> img) | |
| +bool SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::Start(POVMS_Object& opts, boost::shared_ptr<Image> img) | |
| { | |
| int width; | |
| int height; | |
| @@ -212,16 +212,16 @@ | |
| opts.Set(kPOVAttrib_Declare, declares); | |
| if(opts.TryGetInt(kPOVAttrib_FinalFrame, 0) > 0) | |
| - animationProcessing = shared_ptr<AnimationProcessing>(new AnimationProcessing(opts)); | |
| + animationProcessing = boost::shared_ptr<AnimationProcessing>(new AnimationProcessing(opts)); | |
| options = opts; | |
| if(opts.TryGetBool(kPOVAttrib_OutputToFile, true)) | |
| { | |
| if(img != NULL) | |
| - imageProcessing = shared_ptr<ImageProcessing>(new ImageProcessing(img)); | |
| + imageProcessing = boost::shared_ptr<ImageProcessing>(new ImageProcessing(img)); | |
| else | |
| - imageProcessing = shared_ptr<ImageProcessing>(new ImageProcessing(options)); | |
| + imageProcessing = boost::shared_ptr<ImageProcessing>(new ImageProcessing(options)); | |
| } | |
| Path ip (opts.TryGetString(kPOVAttrib_InputFile, "")); | |
| @@ -493,19 +493,19 @@ | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -shared_ptr<Console> SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetConsole() | |
| +boost::shared_ptr<Console> SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetConsole() | |
| { | |
| return renderFrontend.GetConsole(sceneId); | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -shared_ptr<Image> SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetImage() | |
| +boost::shared_ptr<Image> SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetImage() | |
| { | |
| return renderFrontend.GetImage(viewId); | |
| } | |
| template<class PARSER_MH, class FILE_MH, class RENDER_MH, class IMAGE_MH> | |
| -shared_ptr<Display> SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetDisplay() | |
| +boost::shared_ptr<Display> SimpleFrontend<PARSER_MH, FILE_MH, RENDER_MH, IMAGE_MH>::GetDisplay() | |
| { | |
| return renderFrontend.GetDisplay(viewId); | |
| } | |
| diff -Naur vfe/unix/syspovconfig.h vfe/unix/syspovconfig.h | |
| --- vfe/unix/syspovconfig.h 2012-06-19 12:29:38.000000000 -0400 | |
| +++ vfe/unix/syspovconfig.h 2013-11-11 09:08:01.000000000 -0500 | |
| @@ -139,7 +139,7 @@ | |
| // to in a few other places. | |
| using std::runtime_error; | |
| -// C++0x has a shared_ptr, but we currently use the boost one. | |
| +// C++0x has a boost::shared_ptr, but we currently use the boost one. | |
| using boost::shared_ptr; | |
| #endif // STD_POV_TYPES_DECLARED | |
| diff -Naur vfe/vfe.cpp vfe/vfe.cpp | |
| --- vfe/vfe.cpp 2012-06-19 12:29:39.000000000 -0400 | |
| +++ vfe/vfe.cpp 2013-11-11 09:08:01.000000000 -0500 | |
| @@ -640,7 +640,7 @@ | |
| // | |
| //////////////////////////////////////////////////////////////////////////////////////// | |
| -VirtualFrontEnd::VirtualFrontEnd(vfeSession& session, POVMSContext ctx, POVMSAddress addr, POVMS_Object& msg, POVMS_Object *result, shared_ptr<Console>& console) : | |
| +VirtualFrontEnd::VirtualFrontEnd(vfeSession& session, POVMSContext ctx, POVMSAddress addr, POVMS_Object& msg, POVMS_Object *result, boost::shared_ptr<Console>& console) : | |
| m_Session(&session), m_PlatformBase(session), renderFrontend (ctx) | |
| { | |
| backendAddress = addr ; | |
| @@ -656,7 +656,7 @@ | |
| { | |
| // file-backed images may require a reference to PlatformBase to delete temporary files | |
| // we need to explicitly delete it here since otherwise PlatformBase will have been destroyed | |
| - // before the shared_ptr does its cleanup | |
| + // before the boost::shared_ptr does its cleanup | |
| imageProcessing.reset(); | |
| if (backendAddress != POVMSInvalidAddress) | |
| renderFrontend.DisconnectFromBackend(backendAddress); | |
| @@ -747,7 +747,7 @@ | |
| if (m_Session->OutputToFileSet()) | |
| { | |
| - imageProcessing = shared_ptr<ImageProcessing> (new ImageProcessing (opts)); | |
| + imageProcessing = boost::shared_ptr<ImageProcessing> (new ImageProcessing (opts)); | |
| UCS2String filename = imageProcessing->GetOutputFilename (opts, 0, 0); | |
| options.SetUCS2String (kPOVAttrib_OutputFile, filename.c_str()); | |
| @@ -774,8 +774,8 @@ | |
| opts.Set(kPOVAttrib_Declare, declares); | |
| imageProcessing.reset(); | |
| if (m_Session->OutputToFileSet()) | |
| - imageProcessing = shared_ptr<ImageProcessing> (new ImageProcessing (opts)) ; | |
| - animationProcessing = shared_ptr<AnimationProcessing> (new AnimationProcessing (opts)) ; | |
| + imageProcessing = boost::shared_ptr<ImageProcessing> (new ImageProcessing (opts)) ; | |
| + animationProcessing = boost::shared_ptr<AnimationProcessing> (new AnimationProcessing (opts)) ; | |
| options = animationProcessing->GetFrameRenderOptions () ; | |
| } | |
| @@ -1151,7 +1151,7 @@ | |
| } | |
| // now we display the render window, if enabled | |
| - shared_ptr<Display> display(GetDisplay()); | |
| + boost::shared_ptr<Display> display(GetDisplay()); | |
| if (display != NULL) | |
| { | |
| vfeDisplay *disp = dynamic_cast<vfeDisplay *>(display.get()); | |
| diff -Naur vfe/vfe.h vfe/vfe.h | |
| --- vfe/vfe.h 2012-06-19 12:29:39.000000000 -0400 | |
| +++ vfe/vfe.h 2013-11-11 09:08:01.000000000 -0500 | |
| @@ -267,7 +267,7 @@ | |
| class VirtualFrontEnd | |
| { | |
| public: | |
| - VirtualFrontEnd(vfeSession& session, POVMSContext ctx, POVMSAddress addr, POVMS_Object& msg, POVMS_Object *result, shared_ptr<Console>& console) ; | |
| + VirtualFrontEnd(vfeSession& session, POVMSContext ctx, POVMSAddress addr, POVMS_Object& msg, POVMS_Object *result, boost::shared_ptr<Console>& console) ; | |
| virtual ~VirtualFrontEnd() ; | |
| virtual bool Start(POVMS_Object& opts) ; | |
| @@ -298,9 +298,9 @@ | |
| POVMS_Object options; | |
| RenderFrontendBase::SceneId sceneId; | |
| RenderFrontendBase::ViewId viewId; | |
| - shared_ptr<AnimationProcessing> animationProcessing ; | |
| - shared_ptr<ImageProcessing> imageProcessing ; | |
| - shared_ptr<ShelloutProcessing> shelloutProcessing; | |
| + boost::shared_ptr<AnimationProcessing> animationProcessing ; | |
| + boost::shared_ptr<ImageProcessing> imageProcessing ; | |
| + boost::shared_ptr<ShelloutProcessing> shelloutProcessing; | |
| Console **consoleResult; | |
| Display **displayResult; | |
| vfeSession* m_Session; | |
| diff -Naur vfe/vfesession.cpp vfe/vfesession.cpp | |
| --- vfe/vfesession.cpp 2012-06-19 12:29:40.000000000 -0400 | |
| +++ vfe/vfesession.cpp 2013-11-11 09:08:01.000000000 -0500 | |
| @@ -602,7 +602,7 @@ | |
| boost::shared_ptr<Display> vfeSession::GetDisplay() const | |
| { | |
| if (m_Frontend == NULL) | |
| - return (shared_ptr<Display>()); | |
| + return (boost::shared_ptr<Display>()); | |
| return m_Frontend->GetDisplay(); | |
| } | |
| @@ -640,7 +640,7 @@ | |
| m_BackendThread = povray_init (boost::bind(&vfeSession::BackendThreadNotify, this), const_cast<void **>(&pov::RenderThreadAddr)) ; | |
| POVMS_Output_Context = pov::POVMS_GUI_Context ; | |
| - m_Console = shared_ptr<vfeConsole> (new vfeConsole(this, m_ConsoleWidth)) ; | |
| + m_Console = boost::shared_ptr<vfeConsole> (new vfeConsole(this, m_ConsoleWidth)) ; | |
| POVMS_Object obj ; | |
| m_Frontend = new VirtualFrontEnd (*this, POVMS_Output_Context, (POVMSAddress) pov::RenderThreadAddr, obj, NULL, m_Console) ; | |
| diff -Naur vfe/vfesession.h vfe/vfesession.h | |
| --- vfe/vfesession.h 2012-06-19 12:29:40.000000000 -0400 | |
| +++ vfe/vfesession.h 2013-11-11 09:08:01.000000000 -0500 | |
| @@ -1294,7 +1294,7 @@ | |
| static bool m_Initialized; | |
| static vfeSession *m_CurrentSessionTemporaryHack; | |
| - shared_ptr<Console> m_Console; | |
| + boost::shared_ptr<Console> m_Console; | |
| virtual vfeDisplay *DefaultDisplayCreator (unsigned int width, unsigned int height, GammaCurvePtr gamma, vfeSession *session, bool visible); | |
| DisplayCreator m_DisplayCreator; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment