123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- // { dg-do run }
- class EtherCtrl {
- protected:
- int ssap;
- public:
- EtherCtrl(void);
- ~EtherCtrl();
- virtual int getSsap(void) const;
- virtual void setSsap(int);
- };
- class EtherFrameWithLLC {
- protected:
- int ssap;
- public:
- EtherFrameWithLLC(const char *, int);
- ~EtherFrameWithLLC();
- virtual int getSsap(void) const;
- virtual void setSsap(int);
- };
- EtherCtrl::EtherCtrl()
- {
- this->ssap = 0;
- }
- EtherCtrl::~EtherCtrl()
- {
- }
- int EtherCtrl::getSsap() const
- {
- return ssap;
- }
- void EtherCtrl::setSsap(int ssap)
- {
- this->ssap = ssap;
- }
- EtherFrameWithLLC::EtherFrameWithLLC(const char *name, int kind)
- {
- this->ssap = 0;
- }
- EtherFrameWithLLC::~EtherFrameWithLLC()
- {
- }
- int EtherFrameWithLLC::getSsap() const
- {
- return ssap;
- }
- void EtherFrameWithLLC::setSsap(int ssap)
- {
- this->ssap = ssap;
- }
- int
- main (int argc, char **argv)
- {
- EtherCtrl *etherctrl = new EtherCtrl ();
- EtherFrameWithLLC *frame = new EtherFrameWithLLC ("test", 10);
- int my_value;
- etherctrl->setSsap(43);
- frame->setSsap(etherctrl->getSsap());
- my_value = frame->getSsap();
- return 0;
- }
|