1 /*
2    Source File : PDFArray.h
3 
4 
5    Copyright 2011 Gal Kahana PDFWriter
6 
7    Licensed under the Apache License, Version 2.0 (the "License");
8    you may not use this file except in compliance with the License.
9    You may obtain a copy of the License at
10 
11        http://www.apache.org/licenses/LICENSE-2.0
12 
13    Unless required by applicable law or agreed to in writing, software
14    distributed under the License is distributed on an "AS IS" BASIS,
15    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16    See the License for the specific language governing permissions and
17    limitations under the License.
18 
19 
20 */
21 #pragma once
22 #include "PDFObject.h"
23 #include "SingleValueContainerIterator.h"
24 
25 #include <vector>
26 
27 
28 
29 typedef std::vector<PDFObject*> PDFObjectVector;
30 
31 class PDFArray : public PDFObject
32 {
33 public:
34 
35 	enum EType
36 	{
37 		eType = ePDFObjectArray
38 	};
39 
40 	PDFArray(void);
41 	virtual ~PDFArray(void);
42 
43 	// Will add to end, calls AddRef
44 	void AppendObject(PDFObject* inObject);
45 
46 	// Returns an object for iterating the array
47 	SingleValueContainerIterator<PDFObjectVector> GetIterator();
48 
49 	// Returns object at a given index, calls AddRef
50 	PDFObject* QueryObject(unsigned long i);
51 	unsigned long GetLength();
52 
53 private:
54 	PDFObjectVector mValues;
55 };
56