Changes

Jump to: navigation, search

OOP344 Assignment Two

105 bytes added, 02:45, 5 November 2009
IO_Field
</pre></big>
===Construcotr===
'''IO_Field(int row, int col, void* data = (void*)0);'''
<big><pre>
IO_Field(int row, int col, void* data = (void*)0);
</pre></big>
This constructor sets the corresponding attributes to the values of incoming arguments.
====data()====
'''<big><pre>void* data();'''</pre></big>
Returns the value of the data attribute.
====getRow()====
'''<big><pre>int getRow(void)const;'''</pre></big>*if '''_owner''' is NULL, it returns the '''_row ''' attribute*if '''_owner''' is not NULL it returns the sum of '''_row ''' and '''_owner->getTop(); ''' (see IO_Frame for getTop())
====getCol()====
'''<big><pre>int getCol(void)const;'''</pre></big>*if '''_owner''' is NULL, it returns the '''_col ''' attribute*if '''_owner''' is not NULL it returns the sum of '''_col ''' and '''_owner->getLeft(); ''' (see IO_Frame for getLeft())
===Destructor===
<big><pre>
'''virtual ~IOField();'''
</pre></big>
An empty destructor (the body of the method is blank)
===Pure Virtual Methods===
'''<big><pre>virtual void Display() = 0;'''<br />'''virtual int Edit(IO_Form* Owner=NULL)= 0;'''<br />'''virtual bool Editable() = 0;'''<br />'''virtual void Set(const void *) = 0;'''<br /pre></big
These are pure virtual methods enforcing the creation of the identical methods in the derived classes. This make the IO_Field class an abstract class.

Navigation menu