added functions: ticket, createticket, editticket (there is no 'rm' function working for tickets yet) changed: mount parser and mount points now we have more parameters (arguments in parameters) some refactoring in functions 'emacs' and 'mkdir' git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@554 e52654a7-88a9-db11-a3e9-0013d4bc506e
65 lines
1.2 KiB
C++
Executable File
65 lines
1.2 KiB
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2009, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfilecmslucoremountparser
|
|
#define headerfilecmslucoremountparser
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <stdlib.h>
|
|
#include <limits.h>
|
|
|
|
#include "mount.h"
|
|
#include "item.h"
|
|
#include "error.h"
|
|
|
|
|
|
|
|
class MountParser
|
|
{
|
|
public:
|
|
|
|
Error Parse(const std::string & input, std::map<long, Mount> & output);
|
|
|
|
|
|
private:
|
|
|
|
bool IsWhite(int c);
|
|
void SkipWhite();
|
|
void SkipLine();
|
|
void ReadWordQuote(std::string & res);
|
|
void ReadWordWhite(std::string & res);
|
|
void ReadWordComma(std::string & res);
|
|
void ReadWord(std::string & res, bool comma_bracket_separator = false);
|
|
void ReadParamArgsLoop(Mount::ParamArg & args);
|
|
void ReadParamArgs(Mount::ParamArg & args);
|
|
void ReadParamName(std::string & res);
|
|
void ReadParam(std::string & res, Mount::ParamArg & args);
|
|
void ReadMountType();
|
|
void ReadMountPoint();
|
|
void LogMountParams();
|
|
void ReadMountParams();
|
|
void ReadRow(std::map<long, Mount> & output);
|
|
|
|
const char * pinput;
|
|
std::string temp;
|
|
std::string temp_arg;
|
|
Mount::ParamArg param_args;
|
|
|
|
|
|
Mount mount;
|
|
|
|
Item * pdir;
|
|
Error err;
|
|
};
|
|
|
|
|
|
#endif
|