JD2022-TU1/main/extern/gear4/gear_detection/detection/geardisk.h

85 lines
2.4 KiB
C++

////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) Ubisoft Entertainment. All rights reserved.
//
////////////////////////////////////////////////////////////////////////////////
#pragma once
#ifndef GEAR_GEARSYSTEMDETECTIONDISK__INCLUDED
#define GEAR_GEARSYSTEMDETECTIONDISK__INCLUDED
#include <gear_core/base/ealallocator.h>
#include <gear_core/generics/vector.h>
#include <gear_detection/detection/disk.h>
namespace G4 {
namespace SystemDetection
{
/*! \addtogroup detection detection
@{
\addtogroup disk Disk
@{
*/
class G4_DETECTION_DLL_ENTRY GearDisk : public Disk
{
public:
/// \sa Disk::GetDriveLetter
virtual const char* GetDriveLetter() const;
/// \sa Disk::GetDeviceId
virtual const char* GetDeviceId() const;
/// \sa Disk::GetFileSystem
virtual const char* GetFileSystem() const;
/// Set drive letter
/*! /param name Drive letter
*/
void SetDriveLetter(const char* name);
/// Set device identifier
/*! /param name Device identifier
*/
void SetDeviceId(const char* name);
/// Set file system
/*! /param name File system name
*/
void SetFileSystem(const char* name);
private:
GearDetectionString m_driveLetter;
GearDetectionString m_deviceId;
GearDetectionString m_fileSystem;
};
class G4_DETECTION_DLL_ENTRY GearLogicalDisks : public LogicalDisks
{
public:
/// Default constructor, it initializes the object with information
/// gathered from the system
GearLogicalDisks();
virtual ~GearLogicalDisks();
/// \sa LogicalDisks::GetDisk
virtual const GearDisk* GetDisk(unsigned long index) const;
/// Add a disk to the list of found devices
/*! /param disk Disk to add
*/
void AddDisk(const GearDisk& disk);
private:
void FillInformation();
private:
Vector<GearDisk, EalAllocator<EAL_ID_TG_GEAR_DETECTION> > disks;
};
/*! @} */
/*! @} */
}//namespace SystemDetection
} // namespace G4()
#endif