1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4/***************************************************************************/
5/* Name value pair (both strings) which can be linked into a list of pairs */
6
7#ifndef NVPAIR_H
8#define NVPAIR_H
9
10#include "binstr.h"
11
12class NVPair
13{
14public:
15
16 NVPair(BinStr *name, BinStr *value)
17 {
18 m_Name = name;
19 m_Value = value;
20 m_Tail = NULL;
21 }
22
23 ~NVPair()
24 {
25 delete m_Name;
26 delete m_Value;
27 delete m_Tail;
28 }
29
30 NVPair *Concat(NVPair *list)
31 {
32 m_Tail = list;
33 return this;
34 }
35
36 BinStr *Name() { return m_Name; }
37 BinStr *Value() { return m_Value; }
38 NVPair *Next() { return m_Tail; }
39
40private:
41 BinStr *m_Name;
42 BinStr *m_Value;
43 NVPair *m_Tail;
44};
45
46#endif
47