72 lines
1.1 KiB
C++
Executable File
72 lines
1.1 KiB
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2009-2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
|
|
#ifndef headerfile_winix_core_mount
|
|
#define headerfile_winix_core_mount
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
|
|
|
|
class Mount
|
|
{
|
|
public:
|
|
|
|
struct ParamRow
|
|
{
|
|
typedef std::vector<std::wstring> ParamArg;
|
|
|
|
bool defined;
|
|
ParamArg arg;
|
|
|
|
ParamRow() { defined = false; }
|
|
void Clear() { defined = false; arg.clear(); }
|
|
};
|
|
|
|
typedef std::vector<ParamRow> Param;
|
|
|
|
|
|
long dir_id;
|
|
int type;
|
|
int fs;
|
|
Param param;
|
|
|
|
|
|
|
|
|
|
Mount();
|
|
void ClearParams();
|
|
|
|
bool IsPar(int code);
|
|
|
|
bool IsArg(int code, const wchar_t * arg);
|
|
bool IsArg(int code, const std::wstring & arg);
|
|
bool IsArg(int code, int arg);
|
|
|
|
// returning the arg argument if defined (or an empty string)
|
|
const std::wstring & Arg(int code, int arg) const;
|
|
|
|
// returning the first argument (arg=0) if defined (or an empty string)
|
|
const std::wstring & FirstArg(int code) const;
|
|
|
|
|
|
private:
|
|
|
|
// for Arg() methods when the argument is not defined
|
|
const std::wstring empty_str;
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|