Line 13: |
Line 13: |
| | | |
| {| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1" | | {| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1" |
− | |-style="background: #f2f2f2; text-align: center;" '''SamFile Class Methods''' | + | |-style="background: #f2f2f2; text-align: center;" |
| ! Method Name !! Description | | ! Method Name !! Description |
| + | |- |
| + | | <code>SamFile::SamFile()</code> |
| + | | Default Constructor - initializes the variables, but does not open any files. |
| + | |- |
| + | | <code>SamFile::SamFile(const char* filename, OpenType mode = READ)</code> |
| + | | Constructor - initializes the variables, and opens the specified file for READ/WRITE based on the passed in mode. If the mode is not specified, it defaults to READ. |
| + | Aborts if the specified file could not be opened. |
| |- | | |- |
| | <code>bool SamFile::IsEOF()</code> | | | <code>bool SamFile::IsEOF()</code> |
| | bool: true if the end of file has been reached, false if not. | | | bool: true if the end of file has been reached, false if not. |
| Be careful using this method when you are only reading a specific section since you may reach the end of your section without hitting the end of the file | | Be careful using this method when you are only reading a specific section since you may reach the end of your section without hitting the end of the file |
− |
| |
| |- | | |- |
| | <code>bool SamFile::OpenForRead(const char* filename)</code> | | | <code>bool SamFile::OpenForRead(const char* filename)</code> |
Line 85: |
Line 91: |
| === Class Enums === | | === Class Enums === |
| {| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1" | | {| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1" |
| + | |-style="background: #f2f2f2; text-align: center;" |
| + | ! colspan="2"| enum OpenType |
| + | |- |
| + | ! Enum Value !! Description |
| + | |- |
| + | | READ |
| + | | Open the file for read. |
| + | |- |
| + | | WRITE |
| + | | Open the file for write. |
| |-style="background: #f2f2f2; text-align: center;" | | |-style="background: #f2f2f2; text-align: center;" |
| ! colspan="2"| enum SortedType | | ! colspan="2"| enum SortedType |
Line 103: |
Line 119: |
| |} | | |} |
| | | |
− | === Usage Examples === | + | |
| + | == Child Classes == |
| + | |
| + | === SamFileReader === |
| + | |
| + | {| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1" |
| + | |+ '''Additional Child Class Methods''' |
| + | |-style="background: #f2f2f2; text-align: center;" |
| + | ! Method Name !! Description |
| + | |- |
| + | | <code>SamFileReader::SamFileReader(const char* filename)</code> |
| + | | Constructor - initializes the variables, and opens the specified file for reading. |
| + | Aborts if the specified file could not be opened. |
| + | |} |
| + | |
| + | === SamFileWriter === |
| + | |
| + | {| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1" |
| + | |+ '''Additional Child Class Methods''' |
| + | |-style="background: #f2f2f2; text-align: center;" |
| + | ! Method Name !! Description |
| + | |- |
| + | | <code>SamFileWriter::SamFileWriter(const char* filename)</code> |
| + | | Constructor - initializes the variables, and opens the specified file for writing. |
| + | Aborts if the specified file could not be opened. |
| + | |} |
| + | |
| + | == Usage Examples == |
| [[Sam Library Usage Examples]] | | [[Sam Library Usage Examples]] |