libopenraw
ciffcontainertest.cpp
1/*
2 * libopenraw - ciffcontainertest.cpp
3 *
4 * Copyright (C) 2006-2016 Hubert Figuiere
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 License
8 * as published by the Free Software Foundation, either version 3 of
9 * 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, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
21
22#include <iostream>
23
24#include "trace.hpp"
25#include "ciffcontainer.hpp"
26#include "io/file.hpp"
27
28using namespace OpenRaw::Internals;
29
30int main(int /*argc*/, char **argv)
31{
32 Debug::Trace::setDebugLevel(DEBUG2);
33
34 auto file = OpenRaw::IO::File::Ptr(
35 new OpenRaw::IO::File(argv[1]));
36 CIFFContainer container(file);
37
38 const CIFF::HeapFileHeader & hdr = container.header();
39
40 std::cout << "byteOrder = " << hdr.byteOrder[0] << hdr.byteOrder[1] << std::endl;
41
42 CIFF::Heap::Ref heap = container.heap();
43 std::vector<CIFF::RecordEntry> & records = heap->records();
44
45 std::cout << "vector size " << records.size() << std::endl;
46}
47