[cig-commits] r13157 - in cs/cigma/trunk: src tests/pytests
luis at geodynamics.org
luis at geodynamics.org
Wed Oct 29 15:11:14 PDT 2008
Author: luis
Date: 2008-10-29 15:11:14 -0700 (Wed, 29 Oct 2008)
New Revision: 13157
Modified:
cs/cigma/trunk/src/Locator.cpp
cs/cigma/trunk/src/Locator.h
cs/cigma/trunk/src/py_Locator.cpp
cs/cigma/trunk/src/py_Locator.h
cs/cigma/trunk/tests/pytests/test_locator.py
Log:
Removed method &Locator::check_idx
Modified: cs/cigma/trunk/src/Locator.cpp
===================================================================
--- cs/cigma/trunk/src/Locator.cpp 2008-10-29 22:11:13 UTC (rev 13156)
+++ cs/cigma/trunk/src/Locator.cpp 2008-10-29 22:11:14 UTC (rev 13157)
@@ -13,8 +13,3 @@
//std::cout << "Calling ~Locator()" << std::endl;
}
-bool Locator::check_idx(int i) const
-{
- return (0 <= i) && (i < n_idx());
-}
-
Modified: cs/cigma/trunk/src/Locator.h
===================================================================
--- cs/cigma/trunk/src/Locator.h 2008-10-29 22:11:13 UTC (rev 13156)
+++ cs/cigma/trunk/src/Locator.h 2008-10-29 22:11:14 UTC (rev 13157)
@@ -17,8 +17,6 @@
virtual int n_dim() const = 0;
virtual int n_idx() const = 0;
virtual int idx(int i) const = 0;
-
- virtual bool check_idx(int i) const; // XXX: no longer necessary...remove it
};
Modified: cs/cigma/trunk/src/py_Locator.cpp
===================================================================
--- cs/cigma/trunk/src/py_Locator.cpp 2008-10-29 22:11:13 UTC (rev 13156)
+++ cs/cigma/trunk/src/py_Locator.cpp 2008-10-29 22:11:14 UTC (rev 13157)
@@ -23,6 +23,7 @@
this->get_override("searchBoundingBox")(bbox);
}
+/*
bool pyLocator::check_idx(int i) const
{
if (override c = this->get_override("check_idx"))
@@ -30,7 +31,7 @@
return c(i);
}
return Locator::check_idx(i);
-}
+}*/
// ----------------------------------------------------------------------------
@@ -44,7 +45,7 @@
.def("n_idx", pure_virtual(&Locator::n_idx))
.def("idx", pure_virtual(&Locator::idx))
//.def("search_bbox", pure_virtual(&Locator::searchBoundingBox))
- .def("check_idx", &pyLocator::check_idx)
+ //.def("check_idx", &pyLocator::check_idx)
;
class_<AnnLocator>("AnnLocator")
Modified: cs/cigma/trunk/src/py_Locator.h
===================================================================
--- cs/cigma/trunk/src/py_Locator.h 2008-10-29 22:11:13 UTC (rev 13156)
+++ cs/cigma/trunk/src/py_Locator.h 2008-10-29 22:11:14 UTC (rev 13157)
@@ -11,7 +11,6 @@
int n_idx() const;
int idx(int i) const;
void searchBoundingBox(double *bbox);
- bool check_idx(int i) const;
};
#endif
Modified: cs/cigma/trunk/tests/pytests/test_locator.py
===================================================================
--- cs/cigma/trunk/tests/pytests/test_locator.py 2008-10-29 22:11:13 UTC (rev 13156)
+++ cs/cigma/trunk/tests/pytests/test_locator.py 2008-10-29 22:11:14 UTC (rev 13157)
@@ -24,13 +24,6 @@
self.assertEqual(self.loc.n_dim(), 3)
def test_locator_nidx(self):
self.assertEqual(self.loc.n_idx(), 8)
- def test_locator_check_idx(self):
- loc = self.loc
- n = loc.n_idx()
- self.assert_(loc.check_idx(0))
- self.assert_(loc.check_idx(1))
- self.assert_(loc.check_idx(n-1))
- self.assert_(not loc.check_idx(n))
def create_suite():
suite = unittest.TestSuite()
More information about the CIG-COMMITS
mailing list