added: mount points have parameters now
added: to the database: table 'thread' git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@499 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
45
core/mount.h
45
core/mount.h
@@ -11,8 +11,8 @@
|
||||
#ifndef headerfilecoremount
|
||||
#define headerfilecoremount
|
||||
|
||||
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
|
||||
class Mount
|
||||
@@ -27,36 +27,25 @@ public:
|
||||
};
|
||||
|
||||
|
||||
enum Param
|
||||
{
|
||||
none = 0,
|
||||
asc,
|
||||
desc
|
||||
};
|
||||
|
||||
|
||||
long dir_id;
|
||||
Type type;
|
||||
|
||||
Mount();
|
||||
const char * TypeToStr();
|
||||
bool ParseStrParam(const std::string & param);
|
||||
bool IsParam(Param p);
|
||||
|
||||
// in the future can be more parameters to a mount point
|
||||
|
||||
|
||||
const char * TypeToStr()
|
||||
{
|
||||
static char buffer[30];
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case cms:
|
||||
sprintf(buffer, "cms");
|
||||
break;
|
||||
|
||||
case thread:
|
||||
sprintf(buffer, "thread");
|
||||
break;
|
||||
|
||||
default:
|
||||
sprintf(buffer, "the name is not set");
|
||||
break;
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
private:
|
||||
std::set<Param> param_table;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user