-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathMultiNitfIsd.cpp
79 lines (69 loc) · 2.26 KB
/
MultiNitfIsd.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//#############################################################################
//
// FILENAME: MultiNitfIsd.cpp
//
// CLASSIFICATION: Unclassified
//
// DESCRIPTION:
//
// This file contains the implementations for the functions defined in CSM.
//
// LIMITATIONS: None
//
// SOFTWARE HISTORY:
// Date Author Comment
// ----------- ------ -------
// 28-NOV-2018 JPK Initial Version.
// 29-NOV-2018 SCM Cleanup formatting and added include of Error.h.
//
// NOTES:
//
//#############################################################################
#ifndef CSM_LIBRARY
#define CSM_LIBRARY
#endif
#include "MultiNitfIsd.h"
#include "Error.h"
namespace csm
{
//*****************************************************************************
// MultiNitfIsd::MultiNitfIsd
//*****************************************************************************
MultiNitfIsd::MultiNitfIsd(const std::vector<csm::NitfIsd>& isdList)
:
Isd("MULTINITF", ""),
theISDs(isdList)
{
}
//*****************************************************************************
// MultiNitfIsd::addIsd
//*****************************************************************************
void MultiNitfIsd::addIsd(const csm::NitfIsd &isd)
{
theISDs.push_back(isd);
}
//*****************************************************************************
// MultiNitfIsd::isdList
//*****************************************************************************
const std::vector<csm::NitfIsd>& MultiNitfIsd::isdList() const
{
return theISDs;
}
//*****************************************************************************
// MultiNitfIsd::isdList
//*****************************************************************************
std::vector<csm::NitfIsd>& MultiNitfIsd::isdList()
{
return theISDs;
}
//*****************************************************************************
// MultiNitfIsd::isd
//*****************************************************************************
const csm::NitfIsd& MultiNitfIsd::isd(std::size_t index) const
{
if (index < theISDs.size()) return theISDs[index];
throw Error(Error::INDEX_OUT_OF_RANGE,
"ISD Index is out of range.",
"csm::MultiNitfIsd::isd");
}
} //namespace csm