From 018e1ba581ec6f01f069a45ec4cf89f152b44d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 19 Mar 2025 15:41:36 +0100 Subject: remerge --- xsd/examples/cxx/parser/multiroot/protocol.hxx | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 xsd/examples/cxx/parser/multiroot/protocol.hxx (limited to 'xsd/examples/cxx/parser/multiroot/protocol.hxx') diff --git a/xsd/examples/cxx/parser/multiroot/protocol.hxx b/xsd/examples/cxx/parser/multiroot/protocol.hxx new file mode 100644 index 0000000..bbf5b56 --- /dev/null +++ b/xsd/examples/cxx/parser/multiroot/protocol.hxx @@ -0,0 +1,61 @@ +// file : examples/cxx/parser/multiroot/protocol.hxx +// copyright : not copyrighted - public domain + +#ifndef PROTOCOL_HXX +#define PROTOCOL_HXX + +namespace protocol +{ + class request + { + public: + virtual + ~request () + { + } + + unsigned int + account () const + { + return account_; + } + + protected: + request (unsigned int account) + : account_ (account) + { + } + + private: + unsigned int account_; + }; + + class balance: public request + { + public: + balance (unsigned int account) + : request (account) + { + } + }; + + class withdraw: public request + { + public: + withdraw (unsigned int account, unsigned int amount) + : request (account), amount_ (amount) + { + } + + unsigned int + amount () const + { + return amount_; + } + + private: + unsigned int amount_; + }; +} + +#endif // PROTOCOL_HXX -- cgit v1.2.3