How many flows?
От: agrilya  
Дата: 12.06.03 08:57
Оценка:
Find as many flows as you can in the following code. Please describe each of them in detail.

class AbstractHandle
{
public:
  AbstractHandle()
  {
    connect();
  }
  ~AbstractHandle()
  {
    disconnect();
  }
protected:
  virtual void connect() 
  {
  }
  virtual void disconnect() 
  {
  }
};

class ConcreteHandle : public AbstractHandle
{
protected:
  virtual void connect()
  {
    if (MyAPIConnect() != API_OPERATION_OK)
      throw "Connection error.";
  }

  virtual void disconnect()
  {
    if (MyAPIDisconnect() != API_OPERATION_OK)
      throw "Disconnection error";
  }
};


Исправлена подсветка синтаксиса. -- ПК.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.