Merge pull request #2268 from AndyAyersMS/FractalPerf
[platform/upstream/coreclr.git] / src / ilasm / nvpair.h
1 //
2 // Copyright (c) Microsoft. All rights reserved.
3 // Licensed under the MIT license. See LICENSE file in the project root for full license information. 
4 //
5 /***************************************************************************/
6 /* Name value pair (both strings) which can be linked into a list of pairs */
7
8 #ifndef NVPAIR_H
9 #define NVPAIR_H
10
11 #include "binstr.h"
12
13 class NVPair
14 {
15 public:
16
17     NVPair(BinStr *name, BinStr *value)
18     {
19         m_Name = name;
20         m_Value = value;
21         m_Tail = NULL;
22     }
23
24     ~NVPair()
25     {
26         delete m_Name;
27         delete m_Value;
28         delete m_Tail;
29     }
30
31     NVPair *Concat(NVPair *list)
32     {
33         m_Tail = list;
34         return this;
35     }
36
37     BinStr *Name() { return m_Name; }
38     BinStr *Value() { return m_Value; }
39     NVPair *Next() { return m_Tail; }
40
41 private:
42     BinStr *m_Name;
43     BinStr *m_Value;
44     NVPair *m_Tail;
45 };
46
47 #endif