forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnvpair.h
45 lines (36 loc) · 883 Bytes
/
nvpair.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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
/***************************************************************************/
/* Name value pair (both strings) which can be linked into a list of pairs */
#ifndef NVPAIR_H
#define NVPAIR_H
#include "binstr.h"
class NVPair
{
public:
NVPair(BinStr *name, BinStr *value)
{
m_Name = name;
m_Value = value;
m_Tail = NULL;
}
~NVPair()
{
delete m_Name;
delete m_Value;
delete m_Tail;
}
NVPair *Concat(NVPair *list)
{
m_Tail = list;
return this;
}
BinStr *Name() { return m_Name; }
BinStr *Value() { return m_Value; }
NVPair *Next() { return m_Tail; }
private:
BinStr *m_Name;
BinStr *m_Value;
NVPair *m_Tail;
};
#endif