diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-03-19 15:41:36 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-03-19 15:41:36 +0100 |
commit | 018e1ba581ec6f01f069a45ec4cf89f152b44d5f (patch) | |
tree | 0e7dda4bb693a6714066fbe5efcd2f24ff7c1a65 /xsd/examples/cxx/parser/multiroot/protocol.hxx | |
parent | 1c188393cd2e271ed2581471b601fb5960777fd8 (diff) |
remerge
Diffstat (limited to 'xsd/examples/cxx/parser/multiroot/protocol.hxx')
-rw-r--r-- | xsd/examples/cxx/parser/multiroot/protocol.hxx | 61 |
1 files changed, 61 insertions, 0 deletions
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 |