November 8, 2009
Updated everything onto the repository. Now I'm trying to code
IO Edit PseudoCode:
Create an array of 'maxdatalen + 1 chars' and set IO_Field::_data to point to it
Constructor:
+ "row", "col", and "frameChars" pass directly to the Frames class "top" "left" and "framechars". pass width of (fieldlen + 2) and height of (fieldlen + 3)
+ pass to IO_Field constructor. if framed false: row and col. if framed true: row+1 and col+1
Destructor:
+ if object is marked to be dynamic (it should unless i did the 2nd type of constructor) delete[] character content of data in IO_Field
Display():
+ if IO_Edit is framed call IO_Frame display(). Use: _owner->getTop(), _owner->getLeft() as topOffset and leftOffset arguments.
+ call ciol's io_display() function passing getRow() and getCol() and fieldlen from IO_Field and IO_Edit, respectively
Edit():
+ call ciol's io_edit with corresponding data from IO_Edits attributes
+ ignore Owner argument
+ return value returned by ciol's io_edit
Editable():
+return true;
Set():
+copy incoming str into _data (in IO_Field) up to 'maxdatalen' characters (note: if using strncpy() make sure string is null terminated)
Sunday, November 8, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment