// ik-9/15/2011
// Railroad crossing gate.
// Part of the solution to the problem described by
// http://www.c-jump.com/CIS62/Handout/RRxing.jpg

// TODO:
// *** NOTE: no header guards are present in this file!

const bool GATE_OPEN = true;
const bool GATE_CLOSE = true;

class Gate {
public:
    // member variables
    bool m_state;

    // class operations
    void open()
    {
        std::cout << this << "gate opened!" << '\n'; //DEBUG
        m_state = GATE_OPEN;
    }

    void close()
    {
        std::cout << this << "gate closed!" << '\n'; //DEBUG
        m_state = GATE_CLOSE;
    }
};//class Gate