User Tools

Site Tools

Navigation:  ABC Library Reference > ASCIIFileClass > AsciiFileClass Methods >====== ASCIIFileClass Functional Organization-Expected UseC6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

As an aid to understanding the ASCIIFileClass, it is useful to organize its methods into two large categories according to their expected use–the primary interface and the virtual methods. This organization reflects what we believe is typical use of the ASCIIFileClass methods.

Non-Virtual Methods

The non-virtual methods, which you are likely to call fairly routinely from your program, can be further divided into three categories:

Housekeeping (one-time) Use:

Init initialize the ASCIIFileClass object
Kill shut down the ASCIIFileClass object

Mainstream Use:

GetLastLineNo return last line number
GetLine return line of text
GetPercentile convert file position to percentage
SetPercentile convert percentage to file position

Occasional Use:

GetFilename return the filename
Reset reset the ASCIIFileClass object

Virtual Methods

Typically you will not call these methods directly–the Non-Virtual Methods call them. However, we anticipate you will often want to override these methods, and because they are virtual, they are very easy to override. These methods do provide reasonable default behavior in case you do not want to override them.

GetDOSFilename prompt end user to select a file
FormatLine a virtual to format text
SetLine position to specific line
ValidateLine a virtual to implement a filter
asciifileclass_functional_organization_expected_use.htm.txt · Last modified: 2021/04/15 15:56 (external edit)