Created
February 8, 2011 01:24
-
-
Save skhaz/815661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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