Skip to content

Instantly share code, notes, and snippets.

@skhaz
Created February 8, 2011 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skhaz/815661 to your computer and use it in GitHub Desktop.
Save skhaz/815661 to your computer and use it in GitHub Desktop.
class Size
{
public:
Size();
Size(uint width, uint height);
const Size& setWidth(uint width);
const Size& setHeight(uint height);
uint width() const;
uint height() const;
private:
uint m_width;
uint m_height;
};
module(L)
[
class_<Size>("Size")
.def(constructor<>())
.def(constructor<uint, uint>())
.def("setWidth", &Size::setWidth)
.def("setHeight", &Size::setHeight)
.def("width", &Size::width)
.def("height", &Size::height)
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment