//////////////////////////////////////////////////////////////////////
// CPathSplit.h - Kochise Kochise 2002-2003
//

#ifndef __CPATHSPLIT_H__
#define __CPATHSPLIT_H__

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class CPathSplit
{ 
  // Construction
  public: 
    CPathSplit
    (
    )
    {
    };

    CPathSplit
    (
      CString const& i_poStrPath
    );

  // Operations
    // Split the path
    BOOL Split
    (
      CString const& i_poStrPath
    );
    
    CString GetPath
    (
    )
    {
      return m_oStrPath;
    }

    CString GetDrive
    (
    )
    {
      return m_oStrPath.Mid(m_nDriveFirst, m_nDriveCount);
    }
    
    CString GetDirectory
    (
    )
    {
      return m_oStrPath.Mid(m_nDirectoryFirst, m_nDirectoryCount);
    }

    CString GetFileName
    (
    )
    {
      return m_oStrPath.Mid(m_nFileNameFirst, m_nFileNameCount);
    }
    
    CString GetExtension
    (
    )
    {
      return m_oStrPath.Mid(m_nExtensionFirst, m_nExtensionCount);
    }

  // Attributes
  protected:
    CString m_oStrPath;

    int     m_nDriveFirst;
    int     m_nDriveCount;

    int     m_nDirectoryFirst;
    int     m_nDirectoryCount;

    int     m_nFileNameFirst;
    int     m_nFileNameCount;

    int     m_nExtensionFirst;
    int     m_nExtensionCount;
}; 

#endif // __CPATHSPLIT_H__
