← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4059: Remove isIndexable and isFactorable.

 

------------------------------------------------------------
revno: 4059
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2014-07-04 19:46:32 +0200
message:
  Remove isIndexable and isFactorable.
  
  Fix compilation with C++11
modified:
  core/Omega.cpp
  core/Omega.hpp
  lib/base/Math.hpp
  pkg/common/Dispatching.cpp


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'core/Omega.cpp'
--- core/Omega.cpp	2014-07-03 17:24:54 +0000
+++ core/Omega.cpp	2014-07-04 17:46:32 +0000
@@ -142,9 +142,7 @@
 		try {
 			LOG_DEBUG("Factoring plugin "<<name);
 			f = ClassFactory::instance().createShared(name);
-			dynlibs[name].isIndexable    = YADE_PTR_DYN_CAST<Indexable>(f);
-			dynlibs[name].isFactorable   = YADE_PTR_DYN_CAST<Factorable>(f);
-			dynlibs[name].isSerializable = YADE_PTR_DYN_CAST<Serializable>(f);
+			dynlibs[name].isSerializable = ((YADE_PTR_DYN_CAST<Serializable>(f)).get()!=0);
 			for(int i=0;i<f->getBaseClassNumber();i++){
 				dynlibs[name].baseClasses.insert(f->getBaseClassName(i));
 			}

=== modified file 'core/Omega.hpp'
--- core/Omega.hpp	2014-07-02 19:23:14 +0000
+++ core/Omega.hpp	2014-07-04 17:46:32 +0000
@@ -50,7 +50,7 @@
 
 struct DynlibDescriptor{
 	set<string> baseClasses;
-	bool isIndexable, isFactorable, isSerializable;
+	bool isSerializable;
 };
 
 class Omega: public Singleton<Omega>{

=== modified file 'lib/base/Math.hpp'
--- lib/base/Math.hpp	2014-07-03 17:24:54 +0000
+++ lib/base/Math.hpp	2014-07-04 17:46:32 +0000
@@ -62,7 +62,7 @@
 #include <boost/python/module.hpp>
 #include <boost/python/class.hpp>
 
-#ifndef DCXX11
+#ifndef CXX11
 #	include <boost/shared_ptr.hpp>
 	using boost::shared_ptr;
 #else

=== modified file 'pkg/common/Dispatching.cpp'
--- pkg/common/Dispatching.cpp	2014-07-03 07:16:58 +0000
+++ pkg/common/Dispatching.cpp	2014-07-04 17:46:32 +0000
@@ -168,7 +168,7 @@
 			if(interaction->geom){
 				shared_ptr<Body>& b1 = (*bodies)[interaction->getId1()];
 				shared_ptr<Body>& b2 = (*bodies)[interaction->getId2()];
-				bool hadPhys=interaction->phys;
+				bool hadPhys=(interaction->phys.get() != 0);
 				operator()(b1->material, b2->material, interaction);
 				assert(interaction->phys);
 				if(!hadPhys) interaction->iterMadeReal=scene->iter;