diff --git a/src/Mod/Assembly/App/PartRef.cpp b/src/Mod/Assembly/App/PartRef.cpp index f3cf79600c..d078700f35 100644 --- a/src/Mod/Assembly/App/PartRef.cpp +++ b/src/Mod/Assembly/App/PartRef.cpp @@ -100,7 +100,7 @@ bool PartRef::holdsObject(App::DocumentObject* obj) const { return std::find(vector.begin(), vector.end(), obj)!=vector.end(); } -void PartRef::setCalculatedPlacement(boost::shared_ptr< Part3D > part) { +void PartRef::setCalculatedPlacement(std::shared_ptr< Part3D > part) { //part is the same as m_part, so it doasn't matter which one we use Base::Placement p = dcm::get(part); @@ -135,7 +135,7 @@ void PartRef::ensureInitialisation() { if(!ass) throw AssemblyItemException(); - boost::shared_ptr solver = ass->m_solver; + std::shared_ptr solver = ass->m_solver; if(!solver) throw AssemblyItemException(); @@ -153,13 +153,13 @@ void PartRef::ensureInitialisation() { } -boost::shared_ptr< Geometry3D > PartRef::getGeometry3D(const char* Type) { +std::shared_ptr< Geometry3D > PartRef::getGeometry3D(const char* Type) { //check if the item is initialized if(!m_part) - return boost::shared_ptr< Geometry3D >(); + return std::shared_ptr< Geometry3D >(); - boost::shared_ptr geometry; + std::shared_ptr geometry; if(m_part->hasGeometry3D(Type)) { return m_part->getGeometry3D(Type); } @@ -171,7 +171,7 @@ boost::shared_ptr< Geometry3D > PartRef::getGeometry3D(const char* Type) { ts = static_cast(obj)->Shape.getShape(); } else - return boost::shared_ptr< Geometry3D >(); + return std::shared_ptr< Geometry3D >(); TopoDS_Shape s = ts.getSubShape(Type); if(s.ShapeType() == TopAbs_FACE) { @@ -194,7 +194,7 @@ boost::shared_ptr< Geometry3D > PartRef::getGeometry3D(const char* Type) { } default: Base::Console().Message("Unsupported Surface Geometry Type at selection\n"); - return boost::shared_ptr< Geometry3D >(); + return std::shared_ptr< Geometry3D >(); } } @@ -210,7 +210,7 @@ boost::shared_ptr< Geometry3D > PartRef::getGeometry3D(const char* Type) { } default: Base::Console().Message("Unsupported Curve Geometry Type at selection \n"); - return boost::shared_ptr< Geometry3D >(); + return std::shared_ptr< Geometry3D >(); } } @@ -223,7 +223,7 @@ boost::shared_ptr< Geometry3D > PartRef::getGeometry3D(const char* Type) { } else { Base::Console().Message("Unsupported Topology Type at selection\n"); - return boost::shared_ptr< Geometry3D >(); + return std::shared_ptr< Geometry3D >(); } }; diff --git a/src/Mod/Assembly/App/PartRef.h b/src/Mod/Assembly/App/PartRef.h index ff269f2ed5..b9dacda3d4 100644 --- a/src/Mod/Assembly/App/PartRef.h +++ b/src/Mod/Assembly/App/PartRef.h @@ -63,9 +63,9 @@ public: Product* getParentAssembly(); void ensureInitialisation(); - boost::shared_ptr m_part; - virtual boost::shared_ptr getGeometry3D(const char* Type ); - void setCalculatedPlacement( boost::shared_ptr part ); + std::shared_ptr m_part; + virtual std::shared_ptr getGeometry3D(const char* Type ); + void setCalculatedPlacement( std::shared_ptr part ); }; } //namespace Assembly diff --git a/src/Mod/Assembly/App/opendcm/core/clustergraph.hpp b/src/Mod/Assembly/App/opendcm/core/clustergraph.hpp index 3e715aed20..3f1b64baca 100644 --- a/src/Mod/Assembly/App/opendcm/core/clustergraph.hpp +++ b/src/Mod/Assembly/App/opendcm/core/clustergraph.hpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include @@ -63,14 +63,14 @@ namespace details { * @brief Creates a fusion::vector of boost shared_ptr's from the given types * * Creates a shared pointer sequence (sps) of the supplied types by converting them to - * boost::shared_ptr's first and creating a fusion::vector of all pointers afterwards which can be + * std::shared_ptr's first and creating a fusion::vector of all pointers afterwards which can be * accessed by the type typedef. Usage: @code sps::type @endcode * * @tparam seq the mpl::sequence with the types to convert to shared_ptr's **/ template struct sps { //shared_ptr sequence - typedef typename mpl::transform >::type spv; + typedef typename mpl::transform >::type spv; typedef typename fusion::result_of::as_vector::type type; }; /**@}*/ @@ -153,7 +153,7 @@ struct cluster_error : virtual boost::exception {}; /** * @brief Pointer type to share a common ID generator @ref IDgen **/ -typedef boost::shared_ptr IDpointer; +typedef std::shared_ptr IDpointer; } @@ -302,7 +302,7 @@ public: typedef typename boost::graph_traits::edge_iterator local_edge_iterator; typedef typename boost::graph_traits::out_edge_iterator local_out_edge_iterator; - typedef std::map > ClusterMap; + typedef std::map > ClusterMap; struct global_extractor { @@ -321,7 +321,7 @@ public: template struct object_extractor { - typedef boost::shared_ptr base_type; + typedef std::shared_ptr base_type; typedef base_type& result_type; typedef typename mpl::find::type iterator; typedef typename mpl::distance::type, iterator>::type distance; @@ -345,7 +345,7 @@ public: /** * @brief Iterator for objects of given type * - * Allows to iterate over all objects of given type, dereferencing gives the boost::shared_ptr + * Allows to iterate over all objects of given type, dereferencing gives the std::shared_ptr * * @tparam Obj the object type to iterate over **/ @@ -383,7 +383,7 @@ public: * * @param g the parent cluster graph **/ - ClusterGraph(boost::shared_ptr g) : m_parent(g), m_id(new details::IDgen) { + ClusterGraph(std::shared_ptr g) : m_parent(g), m_id(new details::IDgen) { if(g) m_id = g->m_id; }; @@ -402,7 +402,7 @@ public: * copied graph */ template - void copyInto(boost::shared_ptr into, Functor& functor) const; + void copyInto(std::shared_ptr into, Functor& functor) const; /** * @brief Compare by address, not by content @@ -466,9 +466,9 @@ public: * subcluster is fully defined by its object and the vertex descriptor which is it's position * in the current cluster. * - * @return :pair< boost::shared_ptr< ClusterGraph >, LocalVertex > Subcluster and its descriptor + * @return :pair< std::shared_ptr< ClusterGraph >, LocalVertex > Subcluster and its descriptor **/ - std::pair, LocalVertex> createCluster(); + std::pair, LocalVertex> createCluster(); /** * @brief Returns the parent cluster @@ -478,14 +478,14 @@ public: * * @return :shared_ptr< ClusterGraph > the parent cluster or empty pointer **/ - boost::shared_ptr parent(); + std::shared_ptr parent(); /** * @brief const version of \ref parent() * * @return :shared_ptr< ClusterGraph > **/ - const boost::shared_ptr parent() const; + const std::shared_ptr parent() const; /** * @brief Is this the toplevel cluster? @@ -499,14 +499,14 @@ public: * * @return :shared_ptr< ClusterGraph > **/ - boost::shared_ptr root(); + std::shared_ptr root(); /** * @brief const equivalent of \ref root() * * @return :shared_ptr< ClusterGraph > **/ - const boost::shared_ptr root() const; + const std::shared_ptr root() const; /** * @brief Iterators for all subclusters @@ -554,9 +554,9 @@ public: * a cluster an empty pointer is returned. * * @param v The vertex for which the cluster is wanted - * @return boost::shared_ptr the coresponding cluster orempty pointer + * @return std::shared_ptr the coresponding cluster orempty pointer **/ - boost::shared_ptr getVertexCluster(LocalVertex v); + std::shared_ptr getVertexCluster(LocalVertex v); /** * @brief Get the vertex descrptor which descripes the clusters position in the graph @@ -566,17 +566,17 @@ public: * @param g the graph for which the vertex is searched * @return :LocalVertex **/ - LocalVertex getClusterVertex(boost::shared_ptr g); + LocalVertex getClusterVertex(std::shared_ptr g); /** * @brief Convenience function for \ref removeCluster **/ template - void removeCluster(boost::shared_ptr g, Functor& f); + void removeCluster(std::shared_ptr g, Functor& f); /** * @brief Convenience function for \ref removeCluster **/ - void removeCluster(boost::shared_ptr g); + void removeCluster(std::shared_ptr g); /** * @brief Delete all subcluster * @@ -764,7 +764,7 @@ public: * @param v GlobalVertex for which the containing local one is wanted * @return fusion::vector with the containing LocalVertex, the cluster which holds it and a bool indicator if function was successful. **/ - fusion::vector, bool> getLocalVertexGraph(GlobalVertex v); + fusion::vector, bool> getLocalVertexGraph(GlobalVertex v); /* ******************************************************* @@ -853,7 +853,7 @@ public: * @return shared_ptr< Obj > the pointer to the desired object **/ template - boost::shared_ptr getObject(key k); + std::shared_ptr getObject(key k); /** * @brief Set a object at the specified vertex or edge @@ -869,7 +869,7 @@ public: * @return void **/ template - void setObject(key k, boost::shared_ptr val); + void setObject(key k, std::shared_ptr val); /** * @brief Get iterator range for all GlobalEdge objects hold by this local edge @@ -974,7 +974,7 @@ public: * @param cg reference to the subcluster to which v should be moved * @return LocalVertex the local descriptor of the moved vertex in the subcluster **/ - LocalVertex moveToSubcluster(LocalVertex v, boost::shared_ptr cg); + LocalVertex moveToSubcluster(LocalVertex v, std::shared_ptr cg); /** * @brief Move a vertex to a subcluster @@ -1003,7 +1003,7 @@ public: * @param cg reference to the subcluster to which v should be moved * @return LocalVertex the local descriptor of the moved vertex in the subcluster **/ - LocalVertex moveToSubcluster(LocalVertex v, LocalVertex Cluster, boost::shared_ptr cg); + LocalVertex moveToSubcluster(LocalVertex v, LocalVertex Cluster, std::shared_ptr cg); /** @@ -1046,7 +1046,7 @@ protected: /* Searches the local vertex holding the specified global one in this and all it's subclusters. * If found, the holding local vertex and the graph in which it is valid will be returned. * */ - fusion::vector, bool> getContainingVertexGraph(GlobalVertex id); + fusion::vector, bool> getContainingVertexGraph(GlobalVertex id); /* Searches the global edge in all local edges of this graph, and returns the local * one which holds the global edge. If not successful the local edge returned will be diff --git a/src/Mod/Assembly/App/opendcm/core/constraint.hpp b/src/Mod/Assembly/App/opendcm/core/constraint.hpp index 748b559927..5a77fc4851 100644 --- a/src/Mod/Assembly/App/opendcm/core/constraint.hpp +++ b/src/Mod/Assembly/App/opendcm/core/constraint.hpp @@ -65,7 +65,7 @@ class Constraint { typedef typename Kernel::DynStride DS; typedef typename Kernel::MappedEquationSystem MES; - typedef boost::shared_ptr > geom_ptr; + typedef std::shared_ptr > geom_ptr; typedef std::vector > Vec; //metafunction to create equation from consraint and tags diff --git a/src/Mod/Assembly/App/opendcm/core/geometry.hpp b/src/Mod/Assembly/App/opendcm/core/geometry.hpp index 2dbc79e21f..d886d0a9d6 100644 --- a/src/Mod/Assembly/App/opendcm/core/geometry.hpp +++ b/src/Mod/Assembly/App/opendcm/core/geometry.hpp @@ -272,7 +272,7 @@ public: return m_parameterCount; }; template - void test_linkTo(boost::shared_ptr< Geometry< Kernel, Dim > > geom, int offset) { + void test_linkTo(std::shared_ptr< Geometry< Kernel, Dim > > geom, int offset) { linkTo(geom, offset); }; bool test_isLinked() { @@ -316,10 +316,10 @@ public: }; int m_link_offset; - boost::shared_ptr > m_link; + std::shared_ptr > m_link; template - void linkTo(boost::shared_ptr< Geometry< Kernel, Dim, TagList > > geom, int offset); + void linkTo(std::shared_ptr< Geometry< Kernel, Dim, TagList > > geom, int offset); bool isLinked() { return m_link!=0; }; diff --git a/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp b/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp index ca7b7cbeb0..c7e9aa42e2 100644 --- a/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/core/imp/clustergraph_imp.hpp @@ -37,7 +37,7 @@ namespace dcm { //functors needed for implementation only //*************************************** -/* All objects are boost::shared_ptr, therefore they can be cleared by calling the reset() method. As +/* All objects are std::shared_ptr, therefore they can be cleared by calling the reset() method. As * objects are stored within fusion::sequences a functor is needed to clear all of them. **/ struct clear_ptr { @@ -259,7 +259,7 @@ ClusterGraph::object_extractor template -void ClusterGraph::copyInto(boost::shared_ptr into, Functor& functor) const { +void ClusterGraph::copyInto(std::shared_ptr into, Functor& functor) const { //lists does not provide vertex index, so we have to build our own (can't use the internal //vertex_index_property as we would need to reset the indices and that's not possible in const graph) @@ -289,7 +289,7 @@ void ClusterGraph::copyInto(boost for(; it.first != it.second; it.first++) { //create the new Graph - boost::shared_ptr ng = boost::shared_ptr (new ClusterGraph(into)); + std::shared_ptr ng = std::shared_ptr (new ClusterGraph(into)); //we already have the new vertex, however, we need to find it GlobalVertex gv = getGlobalVertex((*it.first).first); @@ -336,23 +336,23 @@ void ClusterGraph::setChanged() { }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -std::pair >, LocalVertex> ClusterGraph::createCluster() { +std::pair >, LocalVertex> ClusterGraph::createCluster() { vertex_bundle vp; fusion::at_c<0> (vp) = m_id->generate(); LocalVertex v = boost::add_vertex(vp, *this); - return std::pair, LocalVertex> (m_clusters[v] = boost::shared_ptr (new ClusterGraph(sp_base::shared_from_this())), v); + return std::pair, LocalVertex> (m_clusters[v] = std::shared_ptr (new ClusterGraph(sp_base::shared_from_this())), v); }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -inline boost::shared_ptr< ClusterGraph > +inline std::shared_ptr< ClusterGraph > ClusterGraph:: parent() { - return boost::shared_ptr (m_parent); + return std::shared_ptr (m_parent); }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -inline const boost::shared_ptr< ClusterGraph > +inline const std::shared_ptr< ClusterGraph > ClusterGraph::parent() const { - return boost::shared_ptr (m_parent); + return std::shared_ptr (m_parent); }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> @@ -361,13 +361,13 @@ bool ClusterGraph::isRoot() const }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -boost::shared_ptr< ClusterGraph > +std::shared_ptr< ClusterGraph > ClusterGraph::root() { return isRoot() ? sp_base::shared_from_this() : parent()->root(); }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -const boost::shared_ptr< ClusterGraph > +const std::shared_ptr< ClusterGraph > ClusterGraph::root() const { return isRoot() ? sp_base::shared_from_this() : parent()->root(); }; @@ -396,7 +396,7 @@ bool ClusterGraph::isCluster(cons }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -boost::shared_ptr< ClusterGraph > +std::shared_ptr< ClusterGraph > ClusterGraph::getVertexCluster(LocalVertex v) { if(isCluster(v)) return m_clusters[v]; @@ -406,7 +406,7 @@ ClusterGraph::getVertexCluster(Lo }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -LocalVertex ClusterGraph::getClusterVertex(boost::shared_ptr g) { +LocalVertex ClusterGraph::getClusterVertex(std::shared_ptr g) { std::pair it = clusters(); for(; it.first != it.second; it.first++) { @@ -419,12 +419,12 @@ LocalVertex ClusterGraph::getClus template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> template -void ClusterGraph::removeCluster(boost::shared_ptr g, Functor& f) { +void ClusterGraph::removeCluster(std::shared_ptr g, Functor& f) { removeCluster(getClusterVertex(g), f); }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -void ClusterGraph::removeCluster(boost::shared_ptr g) { +void ClusterGraph::removeCluster(std::shared_ptr g) { placehoder p; removeCluster(getClusterVertex(g), p); }; @@ -443,7 +443,7 @@ void ClusterGraph::removeCluster( if(it == m_clusters.end()) throw details::cluster_error() << boost::errinfo_errno(11) << error_message("Cluster is not part of this graph"); - std::pair > res = *it; + std::pair > res = *it; //apply functor to all vertices and edges in the subclusters f(res.second); @@ -659,7 +659,7 @@ ClusterGraph::getLocalVertex(Glob }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -fusion::vector >, bool> +fusion::vector >, bool> ClusterGraph::getLocalVertexGraph(GlobalVertex v) { return getContainingVertexGraph(v); }; @@ -759,14 +759,14 @@ void ClusterGraph::removeEdge(Loc template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> template -boost::shared_ptr +std::shared_ptr ClusterGraph::getObject(key k) { return apply_to_bundle(k, obj_helper (k)); }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> template -void ClusterGraph::setObject(key k, boost::shared_ptr val) { +void ClusterGraph::setObject(key k, std::shared_ptr val) { apply_to_bundle(k, obj_helper (k)) = val; setChanged(); @@ -794,7 +794,7 @@ void ClusterGraph::for_each(Funct std::pair it = boost::vertices(*this); for(; it.first != it.second; it.first++) { - boost::shared_ptr ptr = getObject (* (it.first)) ; + std::shared_ptr ptr = getObject (* (it.first)) ; if(ptr) f(ptr); @@ -888,7 +888,7 @@ void ClusterGraph::initIndexMaps( template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> LocalVertex -ClusterGraph::moveToSubcluster(LocalVertex v, boost::shared_ptr cg) { +ClusterGraph::moveToSubcluster(LocalVertex v, std::shared_ptr cg) { LocalVertex cv = getClusterVertex(cg); return moveToSubcluster(v, cv, cg); @@ -898,13 +898,13 @@ template< typename edge_prop, typename vertex_prop, typename cluster_prop, typen LocalVertex ClusterGraph::moveToSubcluster(LocalVertex v, LocalVertex Cluster) { - boost::shared_ptr cg = getVertexCluster(Cluster); + std::shared_ptr cg = getVertexCluster(Cluster); return moveToSubcluster(v, Cluster, cg); }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> LocalVertex -ClusterGraph::moveToSubcluster(LocalVertex v, LocalVertex Cluster, boost::shared_ptr cg) { +ClusterGraph::moveToSubcluster(LocalVertex v, LocalVertex Cluster, std::shared_ptr cg) { std::pair it = boost::out_edges(v, *this); @@ -1106,7 +1106,7 @@ ClusterGraph::getContainingVertex }; template< typename edge_prop, typename vertex_prop, typename cluster_prop, typename objects> -fusion::vector >, bool> +fusion::vector >, bool> ClusterGraph::getContainingVertexGraph(GlobalVertex id) { LocalVertex v; @@ -1114,7 +1114,7 @@ ClusterGraph::getContainingVertex boost::tie(v, done) = getContainingVertex(id); if(!done) - return fusion::make_vector(LocalVertex(), boost::shared_ptr(), false); + return fusion::make_vector(LocalVertex(), std::shared_ptr(), false); if(isCluster(v) && (getGlobalVertex(v) != id)) return m_clusters[v]->getContainingVertexGraph(id); @@ -1185,7 +1185,7 @@ ClusterGraph::apply_to_bundle(Glo } //check all clusters if they have the object - fusion::vector, bool> res = getContainingVertexGraph(k); + fusion::vector, bool> res = getContainingVertexGraph(k); if(!fusion::at_c<2> (res)) { //TODO: Throw (propeties return reference, but can't init a reference temporarily) diff --git a/src/Mod/Assembly/App/opendcm/core/imp/geometry_imp.hpp b/src/Mod/Assembly/App/opendcm/core/imp/geometry_imp.hpp index adfe8c3eef..065f26ac59 100644 --- a/src/Mod/Assembly/App/opendcm/core/imp/geometry_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/core/imp/geometry_imp.hpp @@ -128,7 +128,7 @@ typename Kernel::VectorMap& Geometry::getParameterMap() { template< typename Kernel, int Dim, typename TagList> template -void Geometry::linkTo(boost::shared_ptr > geom, int offset) { +void Geometry::linkTo(std::shared_ptr > geom, int offset) { init(); m_link = geom; diff --git a/src/Mod/Assembly/App/opendcm/core/imp/object_imp.hpp b/src/Mod/Assembly/App/opendcm/core/imp/object_imp.hpp index 66f3220284..36780c8dd9 100644 --- a/src/Mod/Assembly/App/opendcm/core/imp/object_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/core/imp/object_imp.hpp @@ -65,10 +65,10 @@ template Object::Object(Sys& system) : m_system(&system) {}; template -boost::shared_ptr Object::clone(Sys& newSys) +std::shared_ptr Object::clone(Sys& newSys) { - boost::shared_ptr np = boost::shared_ptr(new Derived(*static_cast(this))); + std::shared_ptr np = std::shared_ptr(new Derived(*static_cast(this))); np->m_system = &newSys; return np; }; diff --git a/src/Mod/Assembly/App/opendcm/core/imp/system_imp.hpp b/src/Mod/Assembly/App/opendcm/core/imp/system_imp.hpp index 5dbd53efba..d6318e1ff7 100644 --- a/src/Mod/Assembly/App/opendcm/core/imp/system_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/core/imp/system_imp.hpp @@ -48,7 +48,7 @@ struct cloner { template struct test : mpl::and_, - mpl::not_ > > > {}; + mpl::not_ > > > {}; template typename boost::enable_if< test, void>::type operator()(T& p) const { @@ -104,9 +104,9 @@ SolverInfo System::solve() { }; template< typename KernelType, typename T1, typename T2, typename T3 > -boost::shared_ptr > System::createSubsystem() { +std::shared_ptr > System::createSubsystem() { - boost::shared_ptr s = boost::shared_ptr(new System()); + std::shared_ptr s = std::shared_ptr(new System()); s->m_cluster = m_cluster->createCluster().first; s->m_storage = m_storage; s->m_cluster->template setProperty(details::subcluster); @@ -127,12 +127,12 @@ boost::shared_ptr > System -typename std::vector > >::iterator System::beginSubsystems() { +typename std::vector > >::iterator System::beginSubsystems() { return m_subsystems.begin(); }; template< typename KernelType, typename T1, typename T2, typename T3 > -typename std::vector > >::iterator System::endSubsystems() { +typename std::vector > >::iterator System::endSubsystems() { return m_subsystems.end(); }; diff --git a/src/Mod/Assembly/App/opendcm/core/logging.hpp b/src/Mod/Assembly/App/opendcm/core/logging.hpp index ed4d7fef5a..7ed93e88db 100644 --- a/src/Mod/Assembly/App/opendcm/core/logging.hpp +++ b/src/Mod/Assembly/App/opendcm/core/logging.hpp @@ -33,7 +33,7 @@ #include #include -#include +#include namespace logging = boost::log; namespace sinks = boost::log::sinks; @@ -59,16 +59,16 @@ static int counter = 0; typedef sinks::synchronous_sink< sinks::text_file_backend > sink_t; typedef src::severity_logger< severity_level > dcm_logger; -inline boost::shared_ptr< sink_t > init_log() { +inline std::shared_ptr< sink_t > init_log() { //create the filename std::stringstream str; str<<"openDCM_"< core = logging::core::get(); + std::shared_ptr< logging::core > core = logging::core::get(); - boost::shared_ptr< sinks::text_file_backend > backend = + std::shared_ptr< sinks::text_file_backend > backend = boost::make_shared< sinks::text_file_backend >( keywords::file_name = str.str(), //file name pattern keywords::rotation_size = 10 * 1024 * 1024 //Rotation size is 10MB @@ -76,7 +76,7 @@ inline boost::shared_ptr< sink_t > init_log() { // Wrap it into the frontend and register in the core. // The backend requires synchronization in the frontend. - boost::shared_ptr< sink_t > sink(new sink_t(backend)); + std::shared_ptr< sink_t > sink(new sink_t(backend)); sink->set_formatter( expr::stream <<"[" << expr::attr("Tag") <<"] " @@ -89,9 +89,9 @@ inline boost::shared_ptr< sink_t > init_log() { return sink; }; -inline void stop_log(boost::shared_ptr< sink_t >& sink) { +inline void stop_log(std::shared_ptr< sink_t >& sink) { - boost::shared_ptr< logging::core > core = logging::core::get(); + std::shared_ptr< logging::core > core = logging::core::get(); // Remove the sink from the core, so that no records are passed to it core->remove_sink(sink); diff --git a/src/Mod/Assembly/App/opendcm/core/object.hpp b/src/Mod/Assembly/App/opendcm/core/object.hpp index a348668fc3..7f15811e9b 100644 --- a/src/Mod/Assembly/App/opendcm/core/object.hpp +++ b/src/Mod/Assembly/App/opendcm/core/object.hpp @@ -172,7 +172,7 @@ struct Object : public PropertyOwner clone(Sys& newSys); + virtual std::shared_ptr clone(Sys& newSys); Sys* m_system; }; diff --git a/src/Mod/Assembly/App/opendcm/core/property.hpp b/src/Mod/Assembly/App/opendcm/core/property.hpp index be7fd5b761..b0d9b35c7b 100644 --- a/src/Mod/Assembly/App/opendcm/core/property.hpp +++ b/src/Mod/Assembly/App/opendcm/core/property.hpp @@ -386,10 +386,10 @@ public: * * @param g shared ptr of the cluster graph on which the algorithm is used **/ - property_map(boost::shared_ptr g) + property_map(std::shared_ptr g) : m_graph(g) { } - boost::shared_ptr m_graph; + std::shared_ptr m_graph; }; /** diff --git a/src/Mod/Assembly/App/opendcm/core/system.hpp b/src/Mod/Assembly/App/opendcm/core/system.hpp index 0f2bb6e0f3..f6cb964544 100644 --- a/src/Mod/Assembly/App/opendcm/core/system.hpp +++ b/src/Mod/Assembly/App/opendcm/core/system.hpp @@ -113,7 +113,7 @@ struct EmptyModule { template struct type { struct inheriter { - void system_sub(boost::shared_ptr subsys) {}; + void system_sub(std::shared_ptr subsys) {}; }; typedef mpl::vector<> properties; typedef mpl::vector<> objects; @@ -129,7 +129,7 @@ struct EmptyModule { template struct is_shared_ptr : boost::mpl::false_ {}; template -struct is_shared_ptr > : boost::mpl::true_ {}; +struct is_shared_ptr > : boost::mpl::true_ {}; template struct inheriter : public M1::inheriter, public M2::inheriter, public M3::inheriter, @@ -201,12 +201,12 @@ public: //we hold our own PropertyOwner which we use for system settings. Don't inherit it as the user //should not access the settings via the proeprty getter and setter functions. typedef PropertyOwner::type> OptionOwner; - boost::shared_ptr m_options; + std::shared_ptr m_options; protected: //object storage - typedef typename mpl::transform >::type sp_objects; + typedef typename mpl::transform >::type sp_objects; typedef typename mpl::fold< sp_objects, mpl::vector<>, mpl::push_back > >::type object_vectors; typedef typename fusion::result_of::as_vector::type Storage; @@ -215,7 +215,7 @@ protected: friend struct Object; #ifdef USE_LOGGING - boost::shared_ptr< sink_t > sink; + std::shared_ptr< sink_t > sink; #endif public: @@ -230,25 +230,25 @@ public: void clear(); template - typename std::vector< boost::shared_ptr >::iterator begin(); + typename std::vector< std::shared_ptr >::iterator begin(); template - typename std::vector< boost::shared_ptr >::iterator end(); + typename std::vector< std::shared_ptr >::iterator end(); template - std::vector< boost::shared_ptr >& objectVector(); + std::vector< std::shared_ptr >& objectVector(); template - void push_back(boost::shared_ptr ptr); + void push_back(std::shared_ptr ptr); template - void erase(boost::shared_ptr ptr); + void erase(std::shared_ptr ptr); SolverInfo solve(); - boost::shared_ptr< System > createSubsystem(); - typename std::vector< boost::shared_ptr >::iterator beginSubsystems(); - typename std::vector< boost::shared_ptr >::iterator endSubsystems(); + std::shared_ptr< System > createSubsystem(); + typename std::vector< std::shared_ptr >::iterator beginSubsystems(); + typename std::vector< std::shared_ptr >::iterator endSubsystems(); //a kernel has it's own settings, therefore we need to decide which is accessed template @@ -278,11 +278,11 @@ public: System* clone() const; - boost::shared_ptr m_cluster; - boost::shared_ptr m_storage; + std::shared_ptr m_cluster; + std::shared_ptr m_storage; Shedule m_sheduler; Kernel m_kernel; - std::vector > m_subsystems; + std::vector > m_subsystems; #ifdef USE_LOGGING template @@ -297,7 +297,7 @@ public: template< typename KernelType, typename T1, typename T2, typename T3 > template -typename std::vector< boost::shared_ptr >::iterator System::begin() { +typename std::vector< std::shared_ptr >::iterator System::begin() { typedef typename mpl::find::type iterator; typedef typename mpl::distance::type, iterator>::type distance; @@ -307,7 +307,7 @@ typename std::vector< boost::shared_ptr >::iterator System template -typename std::vector< boost::shared_ptr >::iterator System::end() { +typename std::vector< std::shared_ptr >::iterator System::end() { typedef typename mpl::find::type iterator; typedef typename mpl::distance::type, iterator>::type distance; @@ -317,7 +317,7 @@ typename std::vector< boost::shared_ptr >::iterator System template -std::vector< boost::shared_ptr >& System::objectVector() { +std::vector< std::shared_ptr >& System::objectVector() { typedef typename mpl::find::type iterator; typedef typename mpl::distance::type, iterator>::type distance; @@ -327,15 +327,15 @@ std::vector< boost::shared_ptr >& System::object template< typename KernelType, typename T1, typename T2, typename T3 > template -void System::push_back(boost::shared_ptr ptr) { +void System::push_back(std::shared_ptr ptr) { objectVector().push_back(ptr); }; template< typename KernelType, typename T1, typename T2, typename T3 > template -void System::erase(boost::shared_ptr ptr) { +void System::erase(std::shared_ptr ptr) { - std::vector< boost::shared_ptr >& vec = objectVector(); + std::vector< std::shared_ptr >& vec = objectVector(); vec.erase(std::remove(vec.begin(), vec.end(), ptr), vec.end()); }; diff --git a/src/Mod/Assembly/App/opendcm/module3d/clustermath.hpp b/src/Mod/Assembly/App/opendcm/module3d/clustermath.hpp index aad0cd6c01..2de36f5cd9 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/clustermath.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/clustermath.hpp @@ -52,7 +52,7 @@ public: typedef typename Sys::Cluster Cluster; typedef typename system_traits::template getModule::type module3d; typedef typename module3d::Geometry3D Geometry3D; - typedef boost::shared_ptr Geom; + typedef std::shared_ptr Geom; typedef typename module3d::math_prop math_prop; typedef typename module3d::fix_prop fix_prop; @@ -122,10 +122,10 @@ public: map_downstream(details::ClusterMath& cm, bool fix); void operator()(Geom g); - void operator()(boost::shared_ptr c); + void operator()(std::shared_ptr c); }; - void mapClusterDownstreamGeometry(boost::shared_ptr cluster); + void mapClusterDownstreamGeometry(std::shared_ptr cluster); //Calculate the scale of the cluster. Therefore the midpoint is calculated and the scale is // defined as the max distance between the midpoint and the points. diff --git a/src/Mod/Assembly/App/opendcm/module3d/imp/clustermath_imp.hpp b/src/Mod/Assembly/App/opendcm/module3d/imp/clustermath_imp.hpp index fa047ce21c..abb07ef05b 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/imp/clustermath_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/imp/clustermath_imp.hpp @@ -343,7 +343,7 @@ void ClusterMath::map_downstream::operator()(Geom g) { }; template -void ClusterMath::map_downstream::operator()(boost::shared_ptr c) { +void ClusterMath::map_downstream::operator()(std::shared_ptr c) { //we transform the GLOBAL geometries to local ones in the subcluster! therefore //we are not interested in the successive transformations, we only transform the //global geometries with the cluster transform we want them to be local in, and thats @@ -353,7 +353,7 @@ void ClusterMath::map_downstream::operator()(boost::shared_ptr c) template -void ClusterMath::mapClusterDownstreamGeometry(boost::shared_ptr cluster) { +void ClusterMath::mapClusterDownstreamGeometry(std::shared_ptr cluster) { #ifdef USE_LOGGING BOOST_LOG(log) << "Map downstream geometry"; diff --git a/src/Mod/Assembly/App/opendcm/module3d/imp/constraint3d_imp.hpp b/src/Mod/Assembly/App/opendcm/module3d/imp/constraint3d_imp.hpp index 7d0bc556b3..db6b6665a5 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/imp/constraint3d_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/imp/constraint3d_imp.hpp @@ -67,10 +67,10 @@ namespace dcm { template template template -boost::shared_ptr Module3D::type::Constraint3D_base::clone(Sys& newSys) { +std::shared_ptr Module3D::type::Constraint3D_base::clone(Sys& newSys) { //copy the standart stuff - boost::shared_ptr np = boost::shared_ptr(new Derived(*static_cast(this))); + std::shared_ptr np = std::shared_ptr(new Derived(*static_cast(this))); np->m_system = &newSys; //copy the internals np->content = CBase::content->clone(); diff --git a/src/Mod/Assembly/App/opendcm/module3d/imp/geometry3d_imp.hpp b/src/Mod/Assembly/App/opendcm/module3d/imp/geometry3d_imp.hpp index f35aa1aa91..6389dbb30a 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/imp/geometry3d_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/imp/geometry3d_imp.hpp @@ -125,10 +125,10 @@ typename Visitor::result_type Module3D::type::Geometry3D_base template template template -boost::shared_ptr Module3D::type::Geometry3D_base::clone(Sys& newSys) { +std::shared_ptr Module3D::type::Geometry3D_base::clone(Sys& newSys) { //copy the standart stuff - boost::shared_ptr np = boost::shared_ptr(new Derived(*static_cast(this))); + std::shared_ptr np = std::shared_ptr(new Derived(*static_cast(this))); np->m_system = &newSys; //it's possible that the variant contains pointers, so we need to clone them details::cloner clone_fnc(np->m_geometry); diff --git a/src/Mod/Assembly/App/opendcm/module3d/imp/solver_imp.hpp b/src/Mod/Assembly/App/opendcm/module3d/imp/solver_imp.hpp index 40e1c45a53..d449bf1ecf 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/imp/solver_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/imp/solver_imp.hpp @@ -37,7 +37,7 @@ namespace details { template -MES::MES(boost::shared_ptr cl, int par, int eqn) : Base(par, eqn), m_cluster(cl) { +MES::MES(std::shared_ptr cl, int par, int eqn) : Base(par, eqn), m_cluster(cl) { #ifdef USE_LOGGING log.add_attribute("Tag", attrs::constant< std::string >("MES3D")); #endif @@ -101,7 +101,7 @@ void MES::removeLocalGradientZeros() { template -SystemSolver::Rescaler::Rescaler(boost::shared_ptr c, Mes& m) : cluster(c), mes(m), rescales(0) { +SystemSolver::Rescaler::Rescaler(std::shared_ptr c, Mes& m) : cluster(c), mes(m), rescales(0) { }; @@ -153,7 +153,7 @@ typename SystemSolver::Scalar SystemSolver::Rescaler::scaleClusters(Sc for(; it.first != it.second; it.first++) { if(cluster->isCluster(*it.first)) { - boost::shared_ptr c = cluster->getVertexCluster(*it.first); + std::shared_ptr c = cluster->getVertexCluster(*it.first); c->template getProperty().applyClusterScale(sc, c->template getProperty()); } @@ -168,7 +168,7 @@ typename SystemSolver::Scalar SystemSolver::Rescaler::scaleClusters(Sc template void SystemSolver::Rescaler::collectPseudoPoints( - boost::shared_ptr::Cluster> parent, + std::shared_ptr::Cluster> parent, LocalVertex cluster, std::vector::Kernel::Vector3, Eigen::aligned_allocator::Kernel::Vector3> >& vec) { @@ -217,7 +217,7 @@ void SystemSolver::execute(Sys& sys) { }; template -void SystemSolver::solveCluster(boost::shared_ptr cluster, Sys& sys) { +void SystemSolver::solveCluster(std::shared_ptr cluster, Sys& sys) { //set out and solve all relevant subclusters typedef typename Cluster::cluster_iterator citer; @@ -225,7 +225,7 @@ void SystemSolver::solveCluster(boost::shared_ptr cluster, Sys& sy for(; cit.first != cit.second; cit.first++) { - boost::shared_ptr c = (*cit.first).second; + std::shared_ptr c = (*cit.first).second; if(c->template getProperty() && ((c->template getProperty() == details::cluster3D) @@ -283,7 +283,7 @@ void SystemSolver::solveCluster(boost::shared_ptr cluster, Sys& sy for(; it.first != it.second; it.first++) { if(cluster->isCluster(*it.first)) { - boost::shared_ptr c = cluster->getVertexCluster(*it.first); + std::shared_ptr c = cluster->getVertexCluster(*it.first); details::ClusterMath& cm = c->template getProperty(); //only get maps and propagate downstream if not fixed @@ -454,7 +454,7 @@ void SystemSolver::solveCluster(boost::shared_ptr cluster, Sys& sy }; template -void SystemSolver::finish(boost::shared_ptr cluster, Sys& sys, Mes& mes) { +void SystemSolver::finish(std::shared_ptr cluster, Sys& sys, Mes& mes) { //solving is done, now go to all relevant geometries and clusters and write the values back //(no need to emit recalculated signal as this cluster is never recalculated in this run) @@ -464,7 +464,7 @@ void SystemSolver::finish(boost::shared_ptr cluster, Sys& sys, Mes for(; it.first != it.second; it.first++) { if(cluster->isCluster(*it.first)) { - boost::shared_ptr c = cluster->getVertexCluster(*it.first); + std::shared_ptr c = cluster->getVertexCluster(*it.first); if(!cluster->template getSubclusterProperty(*it.first)) c->template getProperty().finishCalculation(); diff --git a/src/Mod/Assembly/App/opendcm/module3d/imp/state_imp.hpp b/src/Mod/Assembly/App/opendcm/module3d/imp/state_imp.hpp index 0cf9eb2434..c222946656 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/imp/state_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/imp/state_imp.hpp @@ -83,7 +83,7 @@ struct geom_visitor : public boost::static_visitor { }; template -std::string getWeight(boost::shared_ptr ptr) { +std::string getWeight(std::shared_ptr ptr) { geom_visitor v; return ptr->apply(v); }; @@ -104,7 +104,7 @@ typedef std::vector< fusion::vector2 > > string typedef std::vector< fusion::vector2, std::vector > > char_vec; template -string_vec getConstraints(boost::shared_ptr con) { +string_vec getConstraints(std::shared_ptr con) { string_vec vec; std::vector cvec = con->getGenericConstraints(); @@ -174,7 +174,7 @@ string_vec getConstraints(boost::shared_ptr con) { template void constraintCreation(typename char_vec::iterator it, typename char_vec::iterator end, - boost::shared_ptr con) { + std::shared_ptr con) { std::string first(fusion::at_c<0>(*it).begin(), fusion::at_c<0>(*it).end()); std::vector second = fusion::at_c<1>(*it); @@ -212,7 +212,7 @@ void constraintCreation(typename char_vec::iterator it, }; template -void setConstraints(char_vec& vec, boost::shared_ptr con) { +void setConstraints(char_vec& vec, std::shared_ptr con) { constraintCreation(vec.begin(), vec.end(), con); }; @@ -301,7 +301,7 @@ struct inject_set { template bool Create(System* sys, std::string& type, - boost::shared_ptr::type::Geometry3D> geom, + std::shared_ptr::type::Geometry3D> geom, typename System::Kernel::Vector& v) { typedef typename details::getModule3D::type::geometry_types Typelist; @@ -416,7 +416,7 @@ void parser_generator::type::fix_prop, Sys template void parser_parser< typename details::getModule3D::type::Geometry3D, System, iterator >::init(parser& r) { - r = qi::lit("Geometry3D")[ qi::_val = phx::construct >(phx::new_(*qi::_r1))] + r = qi::lit("Geometry3D")[ qi::_val = phx::construct >(phx::new_(*qi::_r1))] >> "" >> (+qi::char_("a-zA-Z"))[qi::_a = phx::construct(phx::begin(qi::_1), phx::end(qi::_1))] >> "" >> "" >> *qi::double_[ vector_in(qi::_b, qi::_c, qi::_1) ] >> "" >> qi::eps[ create(qi::_r1, qi::_a, qi::_val, qi::_b) ]; @@ -440,7 +440,7 @@ void parser_parser< typename details::getModule3D::type::Constraint3D, S r = qi::lit("Constraint3D") >> ("")[ - qi::_val = phx::construct >( + qi::_val = phx::construct >( phx::new_(*qi::_r1, phx::bind(&System::Cluster::template getObject, phx::bind(&System::m_cluster, qi::_r1), qi::_1), phx::bind(&System::Cluster::template getObject, phx::bind(&System::m_cluster, qi::_r1), qi::_2))) diff --git a/src/Mod/Assembly/App/opendcm/module3d/module.hpp b/src/Mod/Assembly/App/opendcm/module3d/module.hpp index 3ab86649bd..94786d8769 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/module.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/module.hpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -60,8 +60,8 @@ struct Module3D { struct vertex_prop; struct inheriter_base; - typedef boost::shared_ptr Geom; - typedef boost::shared_ptr Cons; + typedef std::shared_ptr Geom; + typedef std::shared_ptr Cons; typedef mpl::map3< mpl::pair >, mpl::pair > , @@ -105,7 +105,7 @@ struct Module3D { template T convertTo(); - virtual boost::shared_ptr clone(Sys& newSys); + virtual std::shared_ptr clone(Sys& newSys); protected: typedef typename mpl::push_front::type ExtTypeList; @@ -178,7 +178,7 @@ struct Module3D { Constraint3D_base(Sys& system, Geom f, Geom s) : detail::Constraint(f,s), Object(system) {}; - virtual boost::shared_ptr clone(Sys& newSys); + virtual std::shared_ptr clone(Sys& newSys); }; template @@ -217,7 +217,7 @@ struct Module3D { Cons createConstraint3D(Geom first, Geom second, T1 constraint1); void removeConstraint3D(Cons c); - void system_sub(boost::shared_ptr subsys) {}; + void system_sub(std::shared_ptr subsys) {}; protected: Sys* m_this; diff --git a/src/Mod/Assembly/App/opendcm/module3d/solver.hpp b/src/Mod/Assembly/App/opendcm/module3d/solver.hpp index 0522dce4f3..413c32e3ea 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/solver.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/solver.hpp @@ -35,21 +35,21 @@ struct MES : public Sys::Kernel::MappedEquationSystem { typedef typename Sys::Cluster Cluster; typedef typename system_traits::template getModule::type module3d; typedef typename module3d::Geometry3D Geometry3D; - typedef boost::shared_ptr Geom; + typedef std::shared_ptr Geom; typedef typename module3d::Constraint3D Constraint3D; - typedef boost::shared_ptr Cons; + typedef std::shared_ptr Cons; typedef typename module3d::math_prop math_prop; typedef typename module3d::fix_prop fix_prop; typedef typename Kernel::number_type Scalar; typedef typename Sys::Kernel::MappedEquationSystem Base; - boost::shared_ptr m_cluster; + std::shared_ptr m_cluster; #ifdef USE_LOGGING dcm_logger log; #endif - MES(boost::shared_ptr cl, int par, int eqn); + MES(std::shared_ptr cl, int par, int eqn); virtual void recalculate(); virtual void removeLocalGradientZeros(); }; @@ -62,9 +62,9 @@ struct SystemSolver : public Job { typedef typename Kernel::number_type Scalar; typedef typename system_traits::template getModule::type module3d; typedef typename module3d::Geometry3D Geometry3D; - typedef boost::shared_ptr Geom; + typedef std::shared_ptr Geom; typedef typename module3d::Constraint3D Constraint3D; - typedef boost::shared_ptr Cons; + typedef std::shared_ptr Cons; typedef typename module3d::math_prop math_prop; typedef typename module3d::fix_prop fix_prop; typedef typename module3d::vertex_prop vertex_prop; @@ -76,17 +76,17 @@ struct SystemSolver : public Job { #endif struct Rescaler { - boost::shared_ptr cluster; + std::shared_ptr cluster; Mes& mes; int rescales; - Rescaler(boost::shared_ptr c, Mes& m); + Rescaler(std::shared_ptr c, Mes& m); void operator()(); Scalar calculateScale(); Scalar scaleClusters(Scalar sc); - void collectPseudoPoints(boost::shared_ptr parent, + void collectPseudoPoints(std::shared_ptr parent, LocalVertex cluster, std::vector >& vec); @@ -111,8 +111,8 @@ struct SystemSolver : public Job { SystemSolver(); virtual void execute(Sys& sys); - void solveCluster(boost::shared_ptr cluster, Sys& sys); - void finish(boost::shared_ptr< Cluster > cluster, Sys& sys, Mes& mes); + void solveCluster(std::shared_ptr cluster, Sys& sys); + void finish(std::shared_ptr< Cluster > cluster, Sys& sys, Mes& mes); }; }//details diff --git a/src/Mod/Assembly/App/opendcm/module3d/state.hpp b/src/Mod/Assembly/App/opendcm/module3d/state.hpp index 26ad11ec59..a3dfd7abaa 100644 --- a/src/Mod/Assembly/App/opendcm/module3d/state.hpp +++ b/src/Mod/Assembly/App/opendcm/module3d/state.hpp @@ -48,7 +48,7 @@ template struct parser_generator< typename details::getModule3D::type::Geometry3D , System, iterator > { typedef typename details::getModule3D::type::Geometry3D Geometry; - typedef karma::rule(), karma::locals > generator; + typedef karma::rule(), karma::locals > generator; static void init(generator& r); }; @@ -86,7 +86,7 @@ struct parser_generator< typename details::getModule3D::type::Constraint typedef typename details::getModule3D::type::Constraint3D Constraint3D; typedef typename details::getModule3D::type::vertex_prop vertex_prop; typedef typename details::getModule3D::type::edge_prop edge_prop; - typedef karma::rule()> generator; + typedef karma::rule()> generator; static void init(generator& r); }; @@ -124,7 +124,7 @@ struct parser_parser< typename details::getModule3D::type::Geometry3D, S typedef typename details::getModule3D::type::Geometry3D object_type; typedef typename System::Kernel Kernel; - typedef qi::rule(System*), qi::space_type, qi::locals > parser; + typedef qi::rule(System*), qi::space_type, qi::locals > parser; static void init(parser& r); }; @@ -161,7 +161,7 @@ struct parser_parser< typename details::getModule3D::type::Constraint3D, typedef typename details::getModule3D::type::Constraint3D Constraint3D; typedef typename System::Kernel Kernel; - typedef qi::rule(System*), qi::space_type > parser; + typedef qi::rule(System*), qi::space_type > parser; static void init(parser& r); }; diff --git a/src/Mod/Assembly/App/opendcm/modulePart/module.hpp b/src/Mod/Assembly/App/opendcm/modulePart/module.hpp index b9fe7d0193..386d307a02 100644 --- a/src/Mod/Assembly/App/opendcm/modulePart/module.hpp +++ b/src/Mod/Assembly/App/opendcm/modulePart/module.hpp @@ -47,12 +47,12 @@ struct ModulePart { struct Part; struct PrepareCluster; struct EvaljuateCluster; - typedef boost::shared_ptr Partptr; + typedef std::shared_ptr Partptr; typedef mpl::map2< mpl::pair >, mpl::pair > > PartSignal; typedef ID Identifier; - typedef mpl::map1)> > > signals; + typedef mpl::map1)> > > signals; class Part_base : public Object { protected: @@ -67,7 +67,7 @@ struct ModulePart { //define what we need typedef typename module3d::Geometry3D Geometry3D; - typedef boost::shared_ptr Geom; + typedef std::shared_ptr Geom; typedef typename boost::make_variant_over< Typelist >::type Variant; typedef Object base; @@ -101,13 +101,13 @@ struct ModulePart { }; //collect all clustergraph upstream cluster transforms - void transform_traverse(Transform& t, boost::shared_ptr c); + void transform_traverse(Transform& t, std::shared_ptr c); public: using Object::m_system; template - Part_base(const T& geometry, Sys& system, boost::shared_ptr cluster); + Part_base(const T& geometry, Sys& system, std::shared_ptr cluster); template typename Visitor::result_type apply(Visitor& vis); @@ -124,12 +124,12 @@ struct ModulePart { template T getGlobal(); - virtual boost::shared_ptr clone(Sys& newSys); + virtual std::shared_ptr clone(Sys& newSys); public: Variant m_geometry; Transform m_transform; - boost::shared_ptr m_cluster; + std::shared_ptr m_cluster; void finishCalculation(); void fix(bool fix_value); @@ -142,7 +142,7 @@ struct ModulePart { struct Part_id : public Part_base { template - Part_id(const T& geometry, Sys& system, boost::shared_ptr cluster); + Part_id(const T& geometry, Sys& system, std::shared_ptr cluster); template typename Part_base::Geom addGeometry3D(const T& geom, Identifier id, CoordinateFrame frame = Global); @@ -162,7 +162,7 @@ struct ModulePart { typedef typename mpl::if_, Part_base, Part_id>::type base; template - Part(const T& geometry, Sys& system, boost::shared_ptr cluster); + Part(const T& geometry, Sys& system, std::shared_ptr cluster); friend struct PrepareCluster; friend struct EvaljuateCluster; @@ -209,7 +209,7 @@ struct ModulePart { }; //needed system functions - void system_sub(boost::shared_ptr subsys) {}; + void system_sub(std::shared_ptr subsys) {}; protected: Sys* m_this; @@ -219,9 +219,9 @@ struct ModulePart { typedef typename Sys::Cluster Cluster; typedef typename system_traits::template getModule::type module3d; typedef typename module3d::Geometry3D Geometry3D; - typedef boost::shared_ptr Geom; + typedef std::shared_ptr Geom; typedef typename module3d::Constraint3D Constraint3D; - typedef boost::shared_ptr Cons; + typedef std::shared_ptr Cons; Sys& system; remover(Sys& s); @@ -229,7 +229,7 @@ struct ModulePart { void operator()(GlobalVertex v); //we delete all global edges connecting to this part void operator()(GlobalEdge e); - void operator()(boost::shared_ptr g) {}; + void operator()(std::shared_ptr g) {}; }; }; @@ -283,7 +283,7 @@ struct ModulePart { template template template -ModulePart::type::Part_base::Part_base(const T& geometry, Sys& system, boost::shared_ptr cluster) +ModulePart::type::Part_base::Part_base(const T& geometry, Sys& system, std::shared_ptr cluster) : Object(system), m_geometry(geometry), m_cluster(cluster) { #ifdef USE_LOGGING @@ -336,7 +336,7 @@ ModulePart::type::Part_base::addGeometry3D(const T& geom, Coo template template void ModulePart::type::Part_base::transform_traverse(typename ModulePart::template type::Part_base::Transform& t, - boost::shared_ptr::template type::Part_base::Cluster> c) { + std::shared_ptr::template type::Part_base::Cluster> c) { t *= c->template getProperty().m_transform; @@ -386,19 +386,19 @@ T ModulePart::type::Part_base::getGlobal() { template template -boost::shared_ptr::template type::Part> +std::shared_ptr::template type::Part> ModulePart::type::Part_base::clone(Sys& newSys) { //we need to reset the cluster pointer to the new system cluster LocalVertex lv = Object::m_system->m_cluster->getClusterVertex(m_cluster); GlobalVertex gv = Object::m_system->m_cluster->getGlobalVertex(lv); - boost::shared_ptr np = Object::clone(newSys); + std::shared_ptr np = Object::clone(newSys); //there may be pointer inside the variant cloner clone_fnc(np->m_geometry); boost::apply_visitor(clone_fnc, m_geometry); - fusion::vector, bool> res = newSys.m_cluster->getLocalVertexGraph(gv); + fusion::vector, bool> res = newSys.m_cluster->getLocalVertexGraph(gv); if(!fusion::at_c<2>(res)) { //todo: throw @@ -435,7 +435,7 @@ void ModulePart::type::Part_base::fix(bool fix_value) { template template template -ModulePart::type::Part_id::Part_id(const T& geometry, Sys& system, boost::shared_ptr cluster) +ModulePart::type::Part_id::Part_id(const T& geometry, Sys& system, std::shared_ptr cluster) : Part_base(geometry, system, cluster) { }; @@ -495,7 +495,7 @@ void ModulePart::type::Part_id::setIdentifier(Identifier id) template template template -ModulePart::type::Part::Part(const T& geometry, Sys& system, boost::shared_ptr cluster) +ModulePart::type::Part::Part(const T& geometry, Sys& system, std::shared_ptr cluster) : mpl::if_, Part_base, Part_id>::type(geometry, system, cluster) { @@ -514,7 +514,7 @@ typename ModulePart::template type::Partptr ModulePart::type::inheriter_base::createPart(const T& geometry) { typedef typename Sys::Cluster Cluster; - std::pair, LocalVertex> res = m_this->m_cluster->createCluster(); + std::pair, LocalVertex> res = m_this->m_cluster->createCluster(); Partptr p(new Part(geometry, * ((Sys*) this), res.first)); m_this->m_cluster->template setObject (res.second, p); @@ -642,7 +642,7 @@ void ModulePart::type::EvaljuateCluster::execute(Sys& sys) { }; //get all subsystems and report their recalculation - typedef typename std::vector >::iterator siter; + typedef typename std::vector >::iterator siter; for(siter it = sys.beginSubsystems(); it != sys.endSubsystems(); it++) { diff --git a/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp b/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp index 6146d98d31..c11a980e14 100644 --- a/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleShape3d/generator.hpp @@ -54,7 +54,7 @@ struct ShapeGeneratorBase { typedef typename moduleShape3d::shape_constraint_prop shape_constraint_prop; Sys* m_system; - boost::shared_ptr m_shape; + std::shared_ptr m_shape; GeometryVector* m_geometries; ShapeVector* m_shapes; ConstraintVector* m_constraints; @@ -62,7 +62,7 @@ struct ShapeGeneratorBase { ShapeGeneratorBase(Sys* system) : m_system(system) {}; virtual ~ShapeGeneratorBase() {}; - void set(boost::shared_ptr shape, + void set(std::shared_ptr shape, GeometryVector* geometries, ShapeVector* shapes, ConstraintVector* constraints) { @@ -78,18 +78,18 @@ struct ShapeGeneratorBase { //initialise all relations between the geometries virtual void init() = 0; //get geometry3d for optional types (e.g. midpoints) - virtual boost::shared_ptr getOrCreateG3d(int type) = 0; + virtual std::shared_ptr getOrCreateG3d(int type) = 0; //get hlgeometry3d for optional types - virtual boost::shared_ptr getOrCreateHLG3d(int type) = 0; + virtual std::shared_ptr getOrCreateHLG3d(int type) = 0; //append needs to be on this base class as the shape appends are protected - void append(boost::shared_ptr g) { + void append(std::shared_ptr g) { m_shape->append(g); }; - void append(boost::shared_ptr g) { + void append(std::shared_ptr g) { m_shape->append(g); }; - void append(boost::shared_ptr g) { + void append(std::shared_ptr g) { m_shape->append(g); }; }; @@ -113,11 +113,11 @@ struct dummy_generator { throw creation_error() << boost::errinfo_errno(211) << error_message("dummy generator can't create high level geometry"); }; //get geometry3d for optional types (e.g. midpoints) - virtual boost::shared_ptr::Geometry3D> getOrCreateG3d(int type) { + virtual std::shared_ptr::Geometry3D> getOrCreateG3d(int type) { throw creation_error() << boost::errinfo_errno(212) << error_message("dummy generator has no geometry to access"); }; //get hlgeometry3d for optional types - virtual boost::shared_ptr::Shape3D> getOrCreateHLG3d(int type) { + virtual std::shared_ptr::Shape3D> getOrCreateHLG3d(int type) { throw creation_error() << boost::errinfo_errno(213) << error_message("dummy generator has no high level geometry to access"); }; }; @@ -156,17 +156,17 @@ struct segment3D { if(base::m_shape->getGeometryType() == dcm::tag::weight::segment::value) { //link the line geometrie to our shape - boost::shared_ptr g1 = base::m_system->createGeometry3D(); + std::shared_ptr g1 = base::m_system->createGeometry3D(); base::append(g1); g1->template linkTo(base::m_shape,0); g1->template setProperty(line); g1->template connectSignal(boost::bind(&base::Shape3D::recalc, base::m_shape, bp::_1)); //we have a segment, lets link the two points to it - boost::shared_ptr g2 = base::m_system->createGeometry3D(); + std::shared_ptr g2 = base::m_system->createGeometry3D(); base::append(g2); g2->template setProperty(startpoint); - boost::shared_ptr g3 = base::m_system->createGeometry3D(); + std::shared_ptr g3 = base::m_system->createGeometry3D(); base::append(g3); g3->template setProperty(endpoint); @@ -175,8 +175,8 @@ struct segment3D { g3->template linkTo(base::m_shape, 3); //add the fix constraints - boost::shared_ptr c1 = base::m_system->createConstraint3D(g1,g2, details::fixed); - boost::shared_ptr c2 = base::m_system->createConstraint3D(g1,g3, details::fixed); + std::shared_ptr c1 = base::m_system->createConstraint3D(g1,g2, details::fixed); + std::shared_ptr c2 = base::m_system->createConstraint3D(g1,g3, details::fixed); c1->disable(); //required by fixed constraint base::append(c1); c2->disable(); //requiered by fixed constraint @@ -184,8 +184,8 @@ struct segment3D { } else if(base::m_geometries->size() == 2) { //we have two points, lets get them - boost::shared_ptr g1 = fusion::at_c<0>(base::m_geometries->operator[](0)); - boost::shared_ptr g2 = fusion::at_c<0>(base::m_geometries->operator[](1)); + std::shared_ptr g1 = fusion::at_c<0>(base::m_geometries->operator[](0)); + std::shared_ptr g2 = fusion::at_c<0>(base::m_geometries->operator[](1)); //possibility 1: two points. we add a segment line an link the point in if(g1->getGeometryType() == tag::weight::point::value || g2->getGeometryType() == tag::weight::point::value) { @@ -202,7 +202,7 @@ struct segment3D { base::m_shape->template setValue(val); //and create a segment geometry we use as line - boost::shared_ptr g3 = base::m_system->createGeometry3D(); + std::shared_ptr g3 = base::m_system->createGeometry3D(); base::append(g3); g3->template linkTo(base::m_shape,0); g3->template setProperty(line); @@ -213,8 +213,8 @@ struct segment3D { g2->template linkTo(base::m_shape, 3); //add the fix constraints to show our relation - boost::shared_ptr c1 = base::m_system->createConstraint3D(g1,g3, details::fixed); - boost::shared_ptr c2 = base::m_system->createConstraint3D(g1,g3, details::fixed); + std::shared_ptr c1 = base::m_system->createConstraint3D(g1,g3, details::fixed); + std::shared_ptr c2 = base::m_system->createConstraint3D(g1,g3, details::fixed); c1->disable(); //required by fixed constraint base::append(c1); c2->disable(); //requiered by fixed constraint @@ -226,12 +226,12 @@ struct segment3D { }; }; //get geometry3d for optional types (e.g. midpoints) - virtual boost::shared_ptr::Geometry3D> getOrCreateG3d(int type) { - return boost::shared_ptr::Geometry3D>(); + virtual std::shared_ptr::Geometry3D> getOrCreateG3d(int type) { + return std::shared_ptr::Geometry3D>(); }; //get hlgeometry3d for optional types - virtual boost::shared_ptr::Shape3D> getOrCreateHLG3d(int type) { - return boost::shared_ptr::Shape3D>(); + virtual std::shared_ptr::Shape3D> getOrCreateHLG3d(int type) { + return std::shared_ptr::Shape3D>(); }; }; }; diff --git a/src/Mod/Assembly/App/opendcm/moduleShape3d/module.hpp b/src/Mod/Assembly/App/opendcm/moduleShape3d/module.hpp index 34a7da9536..4479aee749 100644 --- a/src/Mod/Assembly/App/opendcm/moduleShape3d/module.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleShape3d/module.hpp @@ -65,7 +65,7 @@ typename Generator \ BOOST_PP_ENUM_TRAILING_PARAMS(n, typename Arg) \ > \ - boost::shared_ptr createShape3D( \ + std::shared_ptr createShape3D( \ BOOST_PP_ENUM_BINARY_PARAMS(n, Arg, const& arg) \ ); @@ -76,16 +76,16 @@ typename Generator \ BOOST_PP_ENUM_TRAILING_PARAMS(n, typename Arg)\ > \ - boost::shared_ptr::template type::Shape3D> \ + std::shared_ptr::template type::Shape3D> \ ModuleShape3D::type::inheriter_base::createShape3D( \ BOOST_PP_ENUM_BINARY_PARAMS(n, Arg, const& arg) \ ) \ { \ typedef typename system_traits::template getModule::type module3d; \ typedef typename module3d::Geometry3D Geometry3D; \ - boost::shared_ptr g_ptr; \ - boost::shared_ptr hlg_ptr; \ - boost::shared_ptr ptr = boost::shared_ptr(new Shape3D(*m_this)); \ + std::shared_ptr g_ptr; \ + std::shared_ptr hlg_ptr; \ + std::shared_ptr ptr = std::shared_ptr(new Shape3D(*m_this)); \ BOOST_PP_REPEAT(n, APPEND_SINGLE, ptr) \ ptr->template initShape();\ m_this->push_back(ptr);\ @@ -108,7 +108,7 @@ struct converter_g { mpl::and_< mpl::not_< boost::is_same::type,typename mpl::end::type> >, mpl::not_ > - >, boost::shared_ptr >::type apply(T const& t, Sys* sys) { + >, std::shared_ptr >::type apply(T const& t, Sys* sys) { return sys->createGeometry3D(t); }; @@ -118,22 +118,22 @@ struct converter_g { mpl::and_< boost::is_same::type, typename mpl::end::type>, mpl::not_ > - >, boost::shared_ptr >::type apply(T const& t, Sys* sys) { - return boost::shared_ptr(); + >, std::shared_ptr >::type apply(T const& t, Sys* sys) { + return std::shared_ptr(); }; //seems to be an identifier type, lets check if we have such a geometry template static typename boost::enable_if< - boost::is_same, boost::shared_ptr >::type apply(T const& t, Sys* sys) { + boost::is_same, std::shared_ptr >::type apply(T const& t, Sys* sys) { return sys->getGeometry3D(t); }; }; template -struct converter_g< boost::shared_ptr, R> { +struct converter_g< std::shared_ptr, R> { template - static boost::shared_ptr apply(boost::shared_ptr t, Sys* sys) { + static std::shared_ptr apply(std::shared_ptr t, Sys* sys) { return t; }; }; @@ -146,14 +146,14 @@ struct converter_hlg { boost::is_same::type, typename mpl::end::type>, mpl::not_ > >, - boost::shared_ptr >::type apply(T const& t, boost::shared_ptr self, Sys* sys) { - return boost::shared_ptr(); + std::shared_ptr >::type apply(T const& t, std::shared_ptr self, Sys* sys) { + return std::shared_ptr(); }; template static typename boost::enable_if< mpl::not_< boost::is_same::type, typename mpl::end::type> >, - boost::shared_ptr >::type apply(T const& t, boost::shared_ptr self, Sys* sys) { + std::shared_ptr >::type apply(T const& t, std::shared_ptr self, Sys* sys) { //shape can only be set one time, throw an error otherwise if(self->holdsType()) @@ -166,15 +166,15 @@ struct converter_hlg { //seems to be an identifier type, lets check if we have such a geometry template static typename boost::enable_if< - boost::is_same, boost::shared_ptr >::type apply(T const& t, boost::shared_ptr self, Sys* sys) { + boost::is_same, std::shared_ptr >::type apply(T const& t, std::shared_ptr self, Sys* sys) { return sys->getShape3D(t); }; }; template -struct converter_hlg, R> { +struct converter_hlg, R> { template - static boost::shared_ptr apply(boost::shared_ptr t, boost::shared_ptr self, Sys* sys) { + static std::shared_ptr apply(std::shared_ptr t, std::shared_ptr self, Sys* sys) { return t; }; }; @@ -194,8 +194,8 @@ struct ModuleShape3D { struct Shape3D; typedef mpl::map2< - mpl::pair) > >, - mpl::pair) > > > ShapeSig; + mpl::pair) > >, + mpl::pair) > > > ShapeSig; template struct Shape3D_base : public details::Geometry, public Object { @@ -237,29 +237,29 @@ struct ModuleShape3D { return t; }; - virtual boost::shared_ptr clone(Sys& newSys); + virtual std::shared_ptr clone(Sys& newSys); /*shape access functions and extractors to mimic vector<> iterators*/ - typedef std::vector, Connection> > GeometryVector; - typedef std::vector, Connection> > ShapeVector; - typedef std::vector, Connection> > ConstraintVector; + typedef std::vector, Connection> > GeometryVector; + typedef std::vector, Connection> > ShapeVector; + typedef std::vector, Connection> > ConstraintVector; struct geom_extractor { - typedef boost::shared_ptr result_type; + typedef std::shared_ptr result_type; template result_type operator()(T& pair) const { return fusion::at_c<0>(pair); }; }; struct shape_extractor { - typedef boost::shared_ptr result_type; + typedef std::shared_ptr result_type; template result_type operator()(T& pair) const { return fusion::at_c<0>(pair); }; }; struct cons_extractor { - typedef boost::shared_ptr result_type; + typedef std::shared_ptr result_type; template result_type operator()(T& pair) const { return fusion::at_c<0>(pair); @@ -288,15 +288,15 @@ struct ModuleShape3D { return boost::make_transform_iterator(m_constraints.end(), cons_extractor()); }; - boost::shared_ptr geometry(purpose f); + std::shared_ptr geometry(purpose f); template - boost::shared_ptr subshape(); + std::shared_ptr subshape(); //callbacks - void recalc(boost::shared_ptr g); - void remove(boost::shared_ptr g); - void remove(boost::shared_ptr g); - void remove(boost::shared_ptr g); + void recalc(std::shared_ptr g); + void remove(std::shared_ptr g); + void remove(std::shared_ptr g); + void remove(std::shared_ptr g); private: @@ -342,13 +342,13 @@ struct ModuleShape3D { }; Variant m_geometry; //Variant holding the real geometry type - boost::shared_ptr< details::ShapeGeneratorBase > m_generator; + std::shared_ptr< details::ShapeGeneratorBase > m_generator; using Object::m_system; template void initShape() { - m_generator = boost::shared_ptr >(new typename generator::template type(m_system)); + m_generator = std::shared_ptr >(new typename generator::template type(m_system)); m_generator->set(ObjBase::shared_from_this(), &m_geometries, &m_shapes, &m_constraints); if(!m_generator->check()) @@ -362,9 +362,9 @@ struct ModuleShape3D { //the storage is private, all things need to be added by this methods. //this is used to ensure the proper event connections - boost::shared_ptr append(boost::shared_ptr g); - boost::shared_ptr append(boost::shared_ptr g); - boost::shared_ptr append(boost::shared_ptr g); + std::shared_ptr append(std::shared_ptr g); + std::shared_ptr append(std::shared_ptr g); + std::shared_ptr append(std::shared_ptr g); //override protected event functions to emit signals void reset() {}; @@ -428,7 +428,7 @@ struct ModuleShape3D { m_this = (Sys*)this; }; - void system_sub(boost::shared_ptr subsys) {}; + void system_sub(std::shared_ptr subsys) {}; protected: Sys* m_this; @@ -437,7 +437,7 @@ struct ModuleShape3D { //with no vararg templates before c++11 we need preprocessor to create the overloads of create we need BOOST_PP_REPEAT(5, CREATE_DEF, ~) - void removeShape3D(boost::shared_ptr g); + void removeShape3D(std::shared_ptr g); }; struct inheriter_id : public inheriter_base { @@ -446,7 +446,7 @@ struct ModuleShape3D { void removeShape3D(ID id); bool hasShape3D(ID id); - boost::shared_ptr getShape3D(ID id); + std::shared_ptr getShape3D(ID id); using inheriter_base::removeShape3D; @@ -539,10 +539,10 @@ void ModuleShape3D::type::Shape3D_base::set(const T& template template template -boost::shared_ptr ModuleShape3D::type::Shape3D_base::clone(Sys& newSys) { +std::shared_ptr ModuleShape3D::type::Shape3D_base::clone(Sys& newSys) { //copy the standard stuff - boost::shared_ptr np = boost::shared_ptr(new Derived(*static_cast(this))); + std::shared_ptr np = std::shared_ptr(new Derived(*static_cast(this))); np->m_system = &newSys; //it's possible that the variant contains pointers, so we need to clone them cloner clone_fnc(np->m_geometry); @@ -553,7 +553,7 @@ boost::shared_ptr ModuleShape3D::type::Shape3D_base< template template template -boost::shared_ptr::template getModule::type::Geometry3D> +std::shared_ptr::template getModule::type::Geometry3D> ModuleShape3D::type::Shape3D_base::geometry(purpose f) { for(geometry3d_iterator it = beginGeometry3D(); it != endGeometry3D(); it++) { @@ -562,17 +562,17 @@ ModuleShape3D::type::Shape3D_base::geometry(purpose return *it; }; - return boost::shared_ptr(); + return std::shared_ptr(); }; template template template -boost::shared_ptr -ModuleShape3D::type::Shape3D_base::append(boost::shared_ptr g) { +std::shared_ptr +ModuleShape3D::type::Shape3D_base::append(std::shared_ptr g) { g->template setProperty(true); - Connection c = g->template connectSignal(boost::bind(static_cast)>(&Shape3D_base::remove) , this, _1)); + Connection c = g->template connectSignal(boost::bind(static_cast)>(&Shape3D_base::remove) , this, _1)); m_geometries.push_back(fusion::make_vector(g,c)); return ObjBase::shared_from_this(); @@ -582,10 +582,10 @@ ModuleShape3D::type::Shape3D_base::append(boost::sha template template template -boost::shared_ptr -ModuleShape3D::type::Shape3D_base::append(boost::shared_ptr g) { +std::shared_ptr +ModuleShape3D::type::Shape3D_base::append(std::shared_ptr g) { - Connection c = g->template connectSignal(boost::bind(static_cast)>(&Shape3D_base::remove) , this, _1)); + Connection c = g->template connectSignal(boost::bind(static_cast)>(&Shape3D_base::remove) , this, _1)); m_shapes.push_back(fusion::make_vector(g,c)); return ObjBase::shared_from_this(); @@ -594,10 +594,10 @@ ModuleShape3D::type::Shape3D_base::append(boost::sha template template template -boost::shared_ptr -ModuleShape3D::type::Shape3D_base::append(boost::shared_ptr g) { +std::shared_ptr +ModuleShape3D::type::Shape3D_base::append(std::shared_ptr g) { - Connection c = g->template connectSignal(boost::bind(static_cast)>(&Shape3D_base::remove) , this, _1)); + Connection c = g->template connectSignal(boost::bind(static_cast)>(&Shape3D_base::remove) , this, _1)); m_constraints.push_back(fusion::make_vector(g,c)); return ObjBase::shared_from_this(); @@ -626,7 +626,7 @@ void ModuleShape3D::type::Shape3D_base::disconnectAl template template template -void ModuleShape3D::type::Shape3D_base::recalc(boost::shared_ptr g) { +void ModuleShape3D::type::Shape3D_base::recalc(std::shared_ptr g) { //we recalculated thebase line, that means we have our new value. use it. Base::finishCalculation(); @@ -635,7 +635,7 @@ void ModuleShape3D::type::Shape3D_base::recalc(boost template template template -void ModuleShape3D::type::Shape3D_base::remove(boost::shared_ptr g) { +void ModuleShape3D::type::Shape3D_base::remove(std::shared_ptr g) { //before we delete this shape by calling the system remove function, we need to remove //this geometry as this would be deleted again by the system call and we would go into infinite recursion @@ -656,7 +656,7 @@ void ModuleShape3D::type::Shape3D_base::remove(boost template template template -void ModuleShape3D::type::Shape3D_base::remove(boost::shared_ptr g) { +void ModuleShape3D::type::Shape3D_base::remove(std::shared_ptr g) { //before we delete this shape by calling the system remove function, we need to remove //this geometry as this would be deleted again by the system call and we would go into infinite recursion @@ -677,7 +677,7 @@ void ModuleShape3D::type::Shape3D_base::remove(boost template template template -void ModuleShape3D::type::Shape3D_base::remove(boost::shared_ptr g) { +void ModuleShape3D::type::Shape3D_base::remove(std::shared_ptr g) { //before we delete this shape by calling the system remove function, we need to remove //this geometry as this would be deleted again by the system call and we would go into infinite recursion @@ -785,7 +785,7 @@ ModuleShape3D::type::Shape3D::Shape3D(const T& geometry, Sys& template template -void ModuleShape3D::type::inheriter_base::removeShape3D(boost::shared_ptr g) { +void ModuleShape3D::type::inheriter_base::removeShape3D(std::shared_ptr g) { //disconnect all shapes, geometries and constraints, as otherwise we would go into infinite //recursion @@ -822,24 +822,24 @@ bool ModuleShape3D::type::inheriter_id::hasShape3D(Identifier template template -boost::shared_ptr::template type::Shape3D> +std::shared_ptr::template type::Shape3D> ModuleShape3D::type::inheriter_id::getShape3D(Identifier id) { - std::vector< boost::shared_ptr >& vec = inheriter_base::m_this->template objectVector(); - typedef typename std::vector< boost::shared_ptr >::iterator iter; + std::vector< std::shared_ptr >& vec = inheriter_base::m_this->template objectVector(); + typedef typename std::vector< std::shared_ptr >::iterator iter; for(iter it=vec.begin(); it!=vec.end(); it++) { if(compare_traits::compare((*it)->getIdentifier(), id)) return *it; }; - return boost::shared_ptr(); + return std::shared_ptr(); }; template template void ModuleShape3D::type::inheriter_id::removeShape3D(Identifier id) { - boost::shared_ptr s = getShape3D(id); + std::shared_ptr s = getShape3D(id); if(s) removeShape3D(s); diff --git a/src/Mod/Assembly/App/opendcm/moduleState/defines.hpp b/src/Mod/Assembly/App/opendcm/moduleState/defines.hpp index 5840fc05b4..244254f114 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/defines.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/defines.hpp @@ -63,7 +63,7 @@ BOOST_FUSION_ADAPT_TPL_STRUCT( (dcm::System)(Kernel)(M1)(M2)(M3), (typename t1::template t2::template t3::template t4::type::OptionOwner::Properties, m_options->m_properties) (typename Kernel::Properties, m_kernel.m_properties) - (boost::shared_ptr::template t2::template t3::template t4::type::Cluster>, m_cluster) + (std::shared_ptr::template t2::template t3::template t4::type::Cluster>, m_cluster) ) #endif diff --git a/src/Mod/Assembly/App/opendcm/moduleState/extractor.hpp b/src/Mod/Assembly/App/opendcm/moduleState/extractor.hpp index ad435dbfb5..5c1fcee2ad 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/extractor.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/extractor.hpp @@ -67,7 +67,7 @@ struct Extractor { else l = 0; }; - void getClusterRange(typename Sys::Cluster& cluster, std::vector > >& range) { + void getClusterRange(typename Sys::Cluster& cluster, std::vector > >& range) { typedef typename Sys::Cluster::const_cluster_iterator iter; @@ -104,11 +104,11 @@ struct Injector { void setVertexProperty(typename Sys::Cluster* cluster, int value) { cluster->template setProperty(value); }; - void addClusters(std::vector >& clusters, typename Sys::Cluster* cluster) { + void addClusters(std::vector >& clusters, typename Sys::Cluster* cluster) { //vertices for the cluster need to be added already (as edges need vertices created) //so we don't create a vertex here. - typename std::vector >::iterator it; + typename std::vector >::iterator it; for(it = clusters.begin(); it != clusters.end(); it++) { LocalVertex v = cluster->getLocalVertex((*it)->template getProperty()).first; cluster->m_clusters[v] = *it; diff --git a/src/Mod/Assembly/App/opendcm/moduleState/generator.hpp b/src/Mod/Assembly/App/opendcm/moduleState/generator.hpp index e4b62cd23b..61e7445a12 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/generator.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/generator.hpp @@ -64,7 +64,7 @@ struct generator : karma::grammar { karma::rule start; - karma::rule >()> cluster_pair; + karma::rule >()> cluster_pair; karma::rule cluster; karma::rule system; diff --git a/src/Mod/Assembly/App/opendcm/moduleState/imp/generator_imp.hpp b/src/Mod/Assembly/App/opendcm/moduleState/imp/generator_imp.hpp index 643a744ca8..993c7b98cc 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/imp/generator_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/imp/generator_imp.hpp @@ -32,10 +32,10 @@ namespace spirit { namespace traits { template -struct transform_attribute > const, dcm::ClusterGraph&, karma::domain> +struct transform_attribute > const, dcm::ClusterGraph&, karma::domain> { typedef dcm::ClusterGraph& type; - static type pre(boost::shared_ptr > const& val) { + static type pre(std::shared_ptr > const& val) { return *val; } }; @@ -56,11 +56,11 @@ generator::generator() : generator::base_type(start) { << karma::lit(""); cluster_pair %= karma::lit("#" - << qi::attr_cast, graph&>(cluster); + << qi::attr_cast, graph&>(cluster); system %= system_prop << karma::lit("#") << kernel_prop << "$" << karma::eol << karma::lit("") << karma::eol - << karma::lit("#") << qi::attr_cast, graph&>(cluster); + << karma::lit("#") << qi::attr_cast, graph&>(cluster); start %= karma::lit("#") << karma::eol << system << "$" << karma::eol << karma::lit(""); }; diff --git a/src/Mod/Assembly/App/opendcm/moduleState/imp/object_generator_imp.hpp b/src/Mod/Assembly/App/opendcm/moduleState/imp/object_generator_imp.hpp index 2b69e464c6..88864e19c7 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/imp/object_generator_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/imp/object_generator_imp.hpp @@ -28,7 +28,7 @@ obj_grammar::obj_grammar() : obj_grammar::base }; template -void obj_grammar::getProperties(boost::shared_ptr ptr, typename details::pts::type& seq) { +void obj_grammar::getProperties(std::shared_ptr ptr, typename details::pts::type& seq) { if(ptr) seq = ptr->m_properties; else { diff --git a/src/Mod/Assembly/App/opendcm/moduleState/imp/object_parser_imp.hpp b/src/Mod/Assembly/App/opendcm/moduleState/imp/object_parser_imp.hpp index d0a7fdfce1..6f5ec7a5f4 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/imp/object_parser_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/imp/object_parser_imp.hpp @@ -56,7 +56,7 @@ obj_parser::obj_parser(): obj_parser::base_type(start }; template -void obj_parser::setProperties(boost::shared_ptr ptr, typename details::pts::type& seq) { +void obj_parser::setProperties(std::shared_ptr ptr, typename details::pts::type& seq) { if(ptr) ptr->m_properties = seq; }; diff --git a/src/Mod/Assembly/App/opendcm/moduleState/imp/parser_imp.hpp b/src/Mod/Assembly/App/opendcm/moduleState/imp/parser_imp.hpp index 75b9f09ff8..cf79afc65e 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/imp/parser_imp.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/imp/parser_imp.hpp @@ -36,14 +36,14 @@ namespace spirit { namespace traits { template -struct transform_attribute >, typename dcm::ClusterGraph::Properties, qi::domain> +struct transform_attribute >, typename dcm::ClusterGraph::Properties, qi::domain> { typedef typename dcm::ClusterGraph::Properties& type; - static type pre(boost::shared_ptr >& val) { + static type pre(std::shared_ptr >& val) { return val->m_properties; } - static void post(boost::shared_ptr >const& val, typename dcm::ClusterGraph::Properties const& attr) {} - static void fail(boost::shared_ptr > const&) {} + static void post(std::shared_ptr >const& val, typename dcm::ClusterGraph::Properties const& attr) {} + static void fail(std::shared_ptr > const&) {} }; } } @@ -57,10 +57,10 @@ template parser::parser() : parser::base_type(system) { cluster %= qi::lit("" - >> -(qi::eps(qi::_a > 0)[qi::_val = phx::construct >(phx::new_())]) + >> -(qi::eps(qi::_a > 0)[qi::_val = phx::construct >(phx::new_())]) >> qi::eps[phx::bind(&Sys::Cluster::setCopyMode, &(*qi::_val), true)] >> qi::eps[phx::bind(&Injector::setVertexProperty, &in, &(*qi::_val), qi::_a)] - >> qi::attr_cast, typename graph::Properties>(cluster_prop >> qi::eps) + >> qi::attr_cast, typename graph::Properties>(cluster_prop >> qi::eps) >> qi::omit[(*cluster(qi::_r1))[qi::_b = qi::_1]] >> qi::omit[*vertex(&(*qi::_val), qi::_r1)] >> qi::omit[*edge(&(*qi::_val), qi::_r1)] diff --git a/src/Mod/Assembly/App/opendcm/moduleState/module.hpp b/src/Mod/Assembly/App/opendcm/moduleState/module.hpp index 62569a0fbb..c87a873a47 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/module.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/module.hpp @@ -43,7 +43,7 @@ struct ModuleState { void saveState(std::ostream& stream); void loadState(std::istream& stream); - void system_sub(boost::shared_ptr subsys) {}; + void system_sub(std::shared_ptr subsys) {}; }; diff --git a/src/Mod/Assembly/App/opendcm/moduleState/object_generator.hpp b/src/Mod/Assembly/App/opendcm/moduleState/object_generator.hpp index 4dfc06e516..7423fde9e3 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/object_generator.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/object_generator.hpp @@ -18,13 +18,13 @@ namespace details { //grammar for a single object template - struct obj_grammar : public karma::grammar()> { + struct obj_grammar : public karma::grammar()> { typename Gen::generator subrule; - karma::rule()> start; + karma::rule()> start; details::prop_gen prop; obj_grammar(); - static void getProperties(boost::shared_ptr ptr, typename details::pts::type& seq); + static void getProperties(std::shared_ptr ptr, typename details::pts::type& seq); }; //when objects should not be generated we need to get a empy rule, as obj_rule_init diff --git a/src/Mod/Assembly/App/opendcm/moduleState/object_parser.hpp b/src/Mod/Assembly/App/opendcm/moduleState/object_parser.hpp index 4091905c9e..68523470df 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/object_parser.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/object_parser.hpp @@ -38,7 +38,7 @@ struct obj_parser : public qi::grammar ptr, typename details::pts::type& seq); + static void setProperties(std::shared_ptr ptr, typename details::pts::type& seq); }; //when objects should not be generated we need to get a empy rule, as obj_rule_init diff --git a/src/Mod/Assembly/App/opendcm/moduleState/parser.hpp b/src/Mod/Assembly/App/opendcm/moduleState/parser.hpp index 19d2e0eed9..e830606783 100644 --- a/src/Mod/Assembly/App/opendcm/moduleState/parser.hpp +++ b/src/Mod/Assembly/App/opendcm/moduleState/parser.hpp @@ -69,7 +69,7 @@ struct parser : qi::grammar { details::kernel_prop_par kernel_prop; details::system_prop_par system_prop; - qi::rule(Sys*), qi::locals > >, qi::space_type> cluster; + qi::rule(Sys*), qi::locals > >, qi::space_type> cluster; details::cluster_prop_par cluster_prop; details::obj_par objects; diff --git a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp index 41648451c0..1324aa3c94 100644 --- a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp +++ b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.cpp @@ -402,7 +402,7 @@ void TaskAssemblyConstraints::setPossibleOptions() { // Assembly::Product* ass = p1->getParentAssembly(); // //extract the geometries to use for comparison - // boost::shared_ptr g1 = ass->m_solver->getGeometry3D(obj->First.getSubValues()[0].c_str()); + // std::shared_ptr g1 = ass->m_solver->getGeometry3D(obj->First.getSubValues()[0].c_str()); // if(!g1) // return; @@ -414,7 +414,7 @@ void TaskAssemblyConstraints::setPossibleOptions() { // if(!p2) // return; - // boost::shared_ptr g2 = ass->m_solver->getGeometry3D(obj->Second.getSubValues()[0].c_str()); + // std::shared_ptr g2 = ass->m_solver->getGeometry3D(obj->Second.getSubValues()[0].c_str()); // if(!g2) // return; @@ -505,7 +505,7 @@ void TaskAssemblyConstraints::setPossibleConstraints() // Assembly::Product* ass = p1->getParentAssembly(); // //extract the geometries to use for comparison - // boost::shared_ptr g1 = ass->m_solver->getGeometry3D(obj->First.getSubValues()[0].c_str()); + // std::shared_ptr g1 = ass->m_solver->getGeometry3D(obj->First.getSubValues()[0].c_str()); // //let's see if we have a part, if not give feedback to the user by color // if(!g1) { @@ -525,7 +525,7 @@ void TaskAssemblyConstraints::setPossibleConstraints() // if(!p2) // return; - // boost::shared_ptr g2 = ass->m_solver->getGeometry3D(obj->Second.getSubValues()[0].c_str()); + // std::shared_ptr g2 = ass->m_solver->getGeometry3D(obj->Second.getSubValues()[0].c_str()); // //let's see if we have a part, if not give feedback to the user by color // if(!g2) { @@ -616,7 +616,7 @@ void TaskAssemblyConstraints::setPossibleConstraints() //} } -bool TaskAssemblyConstraints::isCombination(boost::shared_ptr g1, boost::shared_ptr g2, dcm::geometry::types t1, dcm::geometry::types t2) +bool TaskAssemblyConstraints::isCombination(std::shared_ptr g1, std::shared_ptr g2, dcm::geometry::types t1, dcm::geometry::types t2) { if(g1->getGeometryType() == t1 && g2->getGeometryType() == t2) return true; diff --git a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.h b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.h index d9f2da7b38..8daf7f039c 100644 --- a/src/Mod/Assembly/Gui/TaskAssemblyConstraints.h +++ b/src/Mod/Assembly/Gui/TaskAssemblyConstraints.h @@ -67,7 +67,7 @@ private: dcm::SolutionSpace getSolutionSpace(); void setPossibleConstraints(); void setPossibleOptions(); - bool isCombination(boost::shared_ptr g1, boost::shared_ptr g2, dcm::geometry::types t1, dcm::geometry::types t2); + bool isCombination(std::shared_ptr g1, std::shared_ptr g2, dcm::geometry::types t1, dcm::geometry::types t2); }; } //namespace AssemblyGui diff --git a/src/Mod/Assembly/Gui/ViewProviderPartRef.cpp b/src/Mod/Assembly/Gui/ViewProviderPartRef.cpp index 381f6f6e77..4315f437ae 100644 --- a/src/Mod/Assembly/Gui/ViewProviderPartRef.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderPartRef.cpp @@ -203,7 +203,7 @@ void ViewProviderPartRef::onChanged(const App::Property* prop) { m_switch->whichChild = 0; int counter = 0; - boost::shared_ptr part = static_cast(getObject())->m_part; + std::shared_ptr part = static_cast(getObject())->m_part; if(!part) { ViewProviderItem::onChanged(prop); @@ -253,7 +253,7 @@ void ViewProviderPartRef::onChanged(const App::Property* prop) { m_points->numPoints = counter; //test - boost::shared_ptr g = part->m_cluster->getProperty::math_prop>().m_geometry[0]; + std::shared_ptr g = part->m_cluster->getProperty::math_prop>().m_geometry[0]; std::stringstream str;