summaryrefslogtreecommitdiffstats
path: root/src/Integer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Integer.cpp')
-rw-r--r--src/Integer.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/Integer.cpp b/src/Integer.cpp
new file mode 100644
index 0000000..d4a7645
--- /dev/null
+++ b/src/Integer.cpp
@@ -0,0 +1,52 @@
1/*
2 * Integer.cpp
3 *
4 * Copyright (c) 2009 Jonathan Beck All Rights Reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#include <stdlib.h>
22#include <plist/Integer.h>
23
24namespace PList
25{
26
27Integer::Integer() : Node(PLIST_UINT)
28{
29}
30
31Integer::Integer(uint64_t i) : Node(PLIST_UINT)
32{
33 plist_set_uint_val(_node, i);
34}
35
36Integer::~Integer()
37{
38}
39
40void Integer::SetValue(uint64_t i)
41{
42 plist_set_uint_val(_node, i);
43}
44
45uint64_t Integer::GetValue()
46{
47 uint64_t i = 0;
48 plist_get_uint_val(_node, &i);
49 return i;
50}
51
52};