Open main menu

CDOT Wiki β

Changes

OOP344 Assignment Two

307 bytes added, 12:13, 4 November 2009
Constructors
</pre></big>
===Constructorsand Destructor=== ====Constructors====
IO_Edit can be created in two ways:
<big><pre>
All the arguments needed for ciol's io_edit() function should be kept as attributes so they can be used at edit() time.
 
<big><pre>
 
IO_Edit::IO_Edit(char* str, int row, int col, int fieldlen,
int maxdatalen, int* insertmode,
This constructor works exactly like the above constructor, with one exception. The data being edited is not dynamic here. So the IO_Fields::_data should point where the '''str''' argument is pointing to.
Obviously, in this case IO_Edit should be marked as non-dynamic so at destruction time, the memory is NOT deallocated.
 
====Destrucotr====
 
The IO_Edit's destructor, check to see if the object is marked to be dynamic. In this case it will delete[] the the character content of IO_Field's _data.
 
===Public Methods===
 
====display()====
 
====edit()====
 
====editable()====
 
====set()====
==IO_CheckList==