// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information. #ifndef INCLUDED_GRAS_ELEMENT_I #define INCLUDED_GRAS_ELEMENT_I %module GRAS_Element %{ #include %} namespace gras { %ignore Element::set_container; } //////////////////////////////////////////////////////////////////////// // remove base class warning -- boost::shared_ptr //////////////////////////////////////////////////////////////////////// #pragma SWIG nowarn=401 //////////////////////////////////////////////////////////////////////// // Export swig element comprehension //////////////////////////////////////////////////////////////////////// %include %include %include //////////////////////////////////////////////////////////////////////// // Operator overloads for Element //////////////////////////////////////////////////////////////////////// %extend gras::Element { %insert("python") %{ def __eq__(self, rhs): if not isinstance(rhs, Element): return False return self.equals(rhs) def __str__(self): return self.to_string() %} } #endif /*INCLUDED_GRAS_ELEMENT_I*/