diff options
| author | 2009-10-13 20:04:06 +0200 | |
|---|---|---|
| committer | 2009-10-13 20:04:06 +0200 | |
| commit | a922b714c9b75fdc67735d674758d4eaedfd32f9 (patch) | |
| tree | 509ec53c18c0be36a9e650eb0f760854cd8d4957 /include/plist/Array.h | |
| parent | e492ef675c404cc6c0d1cfa26e47a1c16c850d5f (diff) | |
| download | libplist-a922b714c9b75fdc67735d674758d4eaedfd32f9.tar.gz libplist-a922b714c9b75fdc67735d674758d4eaedfd32f9.tar.bz2 | |
Add C++ binding.
Diffstat (limited to 'include/plist/Array.h')
| -rw-r--r-- | include/plist/Array.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/plist/Array.h b/include/plist/Array.h new file mode 100644 index 0000000..8f8d992 --- /dev/null +++ b/include/plist/Array.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* | ||
| 2 | * Array.h | ||
| 3 | * Array node type for C++ binding | ||
| 4 | * | ||
| 5 | * Copyright (c) 2009 Jonathan Beck All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This library is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU Lesser General Public | ||
| 9 | * License as published by the Free Software Foundation; either | ||
| 10 | * version 2.1 of the License, or (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This library is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * Lesser General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU Lesser General Public | ||
| 18 | * License along with this library; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef STRING_H | ||
| 23 | #define STRING_H | ||
| 24 | |||
| 25 | #include <plist/Structure.h> | ||
| 26 | #include <vector> | ||
| 27 | |||
| 28 | namespace PList | ||
| 29 | { | ||
| 30 | |||
| 31 | class Array : public Structure | ||
| 32 | { | ||
| 33 | public : | ||
| 34 | Array(); | ||
| 35 | Array(plist_t node); | ||
| 36 | Array(Array& a); | ||
| 37 | Array& operator=(const Array& a); | ||
| 38 | virtual ~Array(); | ||
| 39 | |||
| 40 | Node* operator[](unsigned int index); | ||
| 41 | void Append(Node* node); | ||
| 42 | void Insert(Node* node, unsigned int pos); | ||
| 43 | void Remove(Node* node); | ||
| 44 | void Remove(unsigned int pos); | ||
| 45 | |||
| 46 | private : | ||
| 47 | std::vector<Node*> _array; | ||
| 48 | }; | ||
| 49 | |||
| 50 | }; | ||
| 51 | |||
| 52 | #endif // STRING_H | ||
