-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSubCodeList.h
More file actions
69 lines (62 loc) · 1.7 KB
/
SubCodeList.h
File metadata and controls
69 lines (62 loc) · 1.7 KB
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
/*
* Argus Open Source
* Software to apply Statistical Disclosure Control techniques
*
* Copyright 2014 Statistics Netherlands
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the European Union Public Licence
* (EUPL) version 1.1, as published by the European Commission.
*
* You can find the text of the EUPL v1.1 on
* https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
*
* This software is distributed on an "AS IS" basis without
* warranties or conditions of any kind, either express or implied.
*/
#if !defined SubCodeList_h
#define SubCodeList_h
#include <string>
#include <vector>
class CSubCodeList
{
private:
long m_lSequenceNumber;
std::string m_sParentCode;
long m_lParentCodeIndex;
long m_lNumberOfSubCodes;
std::vector<std::string> m_colSubCodeCollection;
long * m_lSubCodeIndex;
public:
CSubCodeList()
{
m_lSequenceNumber = 0;
m_sParentCode = "";
m_lParentCodeIndex = 0;
m_lNumberOfSubCodes = 0;
m_lSubCodeIndex = 0;
m_colSubCodeCollection.resize(0) ;
}
~CSubCodeList()
{
if (m_colSubCodeCollection.size() != 0) {
m_colSubCodeCollection.clear();
//m_colSubCodeCollection.resize(0);
}
if (m_lSubCodeIndex != 0) {
delete[] m_lSubCodeIndex;
}
}
std::string GetSubCode(long icodenum);
void FillSubCodes(std::vector<std::string> &codes, long *indices);
long IsInSubCodes(const std::string &sCode);
void SetSequenceNumber(long num);
void SetParentCode(const std::string &code);
void SetParentIndex(long Index);
long GetSubCodeIndex(long i);
long GetParentIndex();
long GetSequenceNumber();
std::string GetParentCode();
long NumberOfSubCodes();
};
#endif // SubCodeList_h