You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
607 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "pathfinderDataStream.h"
  2. pathfinderDataStream::pathfinderDataStream( char *Name){
  3. m_pFID = NULL;
  4. if( Name != NULL ){
  5. pathfinderDataStream::open( Name );
  6. };
  7. };
  8. pathfinderDataStream::~pathfinderDataStream(){
  9. if( m_pFID!= NULL ) pathfinderDataStream::close();
  10. };
  11. bool pathfinderDataStream::open( char *Name ){
  12. if( m_pFID!= NULL ) return false;
  13. m_pFID = fopen( Name, "ab+" );
  14. if( m_pFID == NULL ) return false;
  15. strncpy( m_pName, Name, MAX_PATH );
  16. return true;
  17. };
  18. bool pathfinderDataStream::close(){
  19. if( m_pFID == NULL ) return false;
  20. fclose( m_pFID );
  21. m_pFID = NULL;
  22. return true;
  23. };