-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathAlias.h
62 lines (48 loc) · 1.13 KB
/
Alias.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Alias.h: interface for the Alias class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_ALIAS_H__ED1B4374_0A53_4BA7_8A25_6790E5C867AF__INCLUDED_)
#define AFX_ALIAS_H__ED1B4374_0A53_4BA7_8A25_6790E5C867AF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class Alias;
class AliasList
{
private:
Alias *first;
Alias *cur;
Alias *last;
public:
AliasList();
virtual ~AliasList();
CString GetCommand(CString alias);
bool AddAlias(CString alias, CString command);
Alias* GetAlias(CString alias);
void DeleteAll();
void DeleteAlias(Alias *alias);
bool DeleteAlias(CString alias);
CString ShowAliasList();
void SaveAliasList(ofstream &file);
void LoadAliasList(ifstream &file);
};
class Alias
{
private:
CString alias;
CString command;
Alias *next;
Alias *prev;
public:
Alias();
Alias(CString al, CString com);
virtual ~Alias();
public:
Alias*GetNext();
void SetNext(Alias *alias);
Alias*GetPrev();
void SetPrev(Alias *alias);
CString GetAlias();
CString GetCommand();
};
#endif // !defined(AFX_ALIAS_H__ED1B4374_0A53_4BA7_8A25_6790E5C867AF__INCLUDED_)