summaryrefslogtreecommitdiffstats
path: root/nsframework/framework_unified/client/include/native_service/ns_config_parser_if.h
blob: b40c01eb7d6d6f71da4bcedc5ca88d8b0b965c22 (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
/*
 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @file ns_config_parser_if.h
 * @brief \~english This file contains declaration of class CNSConfigReader, CNSConfigWriter and CNSConfigParser. -- API
 *        define head file
 *
 */
/** @addtogroup BaseSystem
 *  @{
 */
/** @addtogroup native_service
 *  @ingroup BaseSystem
 *  @{
 */
/** @addtogroup framework_unified
 *  @ingroup Native_service
 *  @{
 */
/** @addtogroup native
 *  @ingroup framework_unified
 *  @{
 */
#ifndef NS_NATIVESERVICES_INC_NATIVE_NS_CONFIG_PARSER_IF_H_  // NOLINT  (build/header_guard)
#define NS_NATIVESERVICES_INC_NATIVE_NS_CONFIG_PARSER_IF_H_

////////////////////////////////////////////////////////////////////////////////////////////////////
// Include Files
////////////////////////////////////////////////////////////////////////////////////////////////////

#include <native_service/frameworkunified_types.h>
#include <string>

// forward declaration of classes
class IConfigReader;
class IConfigWriter;

/**
 * @class CNSConfigReader
 * @brief \~english Configuration File Read Service Class
 * @par   \~english Brief Introduction
 * \~english This class provides API's to application to read from configuration files.
 *
 */
class CNSConfigReader {
 public:
  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup CNSConfigReader
  /// \~english @par Brief
  ///       Constructor of CNSConfigReader class
  ///       This constructor can only be called by derived class. Application cannot use this constructor
  ///       to create object of CNSConfigReader class.
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///       - None
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       It is called when generating the instance of CNSConfigParser class.
  /// \~english @see CNSConfigReader::~CNSConfigReader
  ////////////////////////////////////////////////////////////////////////////////////////////////
  CNSConfigReader();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup CNSConfigReader
  /// \~english @par Brief
  ///      Constructor of CNSConfigReader class
  ///      This is depricated. Use parameterless constructor instead to create object and
  ///      Parse(filepath) to parse the file using reader object.
  /// \~english @param [in] f_c_filepath
  ///      const std::string&   - Name of the configuration file
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///       - None
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       It doesn't need to call Parse() function to execute parse process of configuration file,
  ///       when using the constructor with file path. However, because we don't execute error process,
  ///       if it needs to reply error about parse process, we must to use the constructor without parameter
  ///       and call Parse() function.
  /// \~english @see CNSConfigReader::~CNSConfigReader
  ////////////////////////////////////////////////////////////////////////////////////////////////
  explicit CNSConfigReader(const std::string &f_c_filepath);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Parse
  /// \~english @par Brief
  ///     This function is used to parse configuration file
  /// \~english @param [in] f_c_filepath
  ///     const std::string& - Name of the configuration file
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - if memory allocation failed or document is not proper
  /// \~english @retval eFrameworkunifiedStatusFail - invalid file type
  /// \~english @retval eFrameworkunifiedStatusInvldParam invalid parameter
  /// \~english @retval eFrameworkunifiedStatusErrOther - file data error
  /// \~english @par Prerequisite
  ///       - None
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File(f_c_filepath) designated by parameter is not proper [eFrameworkunifiedStatusNullPointer]
  ///      - Data of file(f_c_filepath) designated by parameter is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Expansion name of file(f_c_filepath) designated by parameter is not cfg [eFrameworkunifiedStatusFail]
  ///      - Failed to open file(f_c_filepath) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Path of file designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Data of file designated by parameter has error [eFrameworkunifiedStatusErrOther]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Parse designated configuration file. If the data format is correct, get memory to store the parsed result,
  ///       and store the parsed contents in it.
  /// \~english @see CNSConfigWriter::Parse, CNSConfigParser::Parse
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Parse(const std::string &f_c_filepath);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup ~CNSConfigReader
  /// \~english @par Brief
  ///       Destructor of CNSConfigReader class.
  ///       It is used when release the instance.
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Release the used memory and the parsed result of configuration file.
  /// \~english @see CNSConfigReader::CNSConfigReader
  ////////////////////////////////////////////////////////////////////////////////////////////////
  ~CNSConfigReader();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetBool
  /// \~english @par Brief
  ///     This function is used to get the bool value associated with key.
  ///     If there are multiple values associated with the same key, then the first value is returned.
  ///     This API has been depricated, use GetBool(key, ref_value)
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @retval TRUE - value associated with key
  /// \~english @retval FALSE - Failed to get value associated with key
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [FALSE]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [FALSE]
  ///      - Can not find search key(f_c_key) designated by parameter [FALSE]
  ///      - Value getted from configuration file is not true or false [FALSE]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(TRUE/FALSE) associated with key.
  ///       If there are multiple values associated with the same key, return the first value.
  ///       This API has been depricated, please use GetBool(const std::string& f_c_key, BOOL& f_bValue).
  /// \~english @see CNSConfigWriter::SetBool
  ////////////////////////////////////////////////////////////////////////////////////////////////
  BOOL GetBool(const std::string &f_c_key);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetDouble
  /// \~english @par Brief
  ///     This function is used to get the double value associated with key.
  ///     If there are multiple values associated with the same key, then the first value is returned.
  ///     This API has been depricated, use GetDouble(key, ref_value)
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @param [out] - none
  /// \~english @retval F_64 - value associated with key
  /// \~english @retval 0 - Failed to get value associated with key(64bit)
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [0]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [0]
  ///      - Can not find search key(f_c_key) designated by parameter [0]
  ///      - Failed to change data getted from configuration file from string type to double type [0]
  /// \~english @par Classification
  ///       Public
  /// \~english @par
  ///      Please pay attention to the following points when you use this API.\n
  ///      - We can take the value in specification only if it is in the range of
  ///        [1.17549435082228750797e-38F, 3.40282346638528859812e+38F](min value of double, max value of double).
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(64bit) associated with key.
  ///       If there are multiple values associated with the same key, return the first value.
  ///       This API has been depricated, please use GetDouble(const std::string& f_c_key, F_64& f_f_value).
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  F_64 GetDouble(const std::string &f_c_key);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetFloat
  /// \~english @par Brief
  ///     This function is used to get the float value associated with key
  ///     If there are multiple values associated with the same key, then the first value is returned.
  ///     This API has been depricated, use GetFloat(key, ref_value)
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @retval F_32 value associated with key
  /// \~english @retval 0 - Failed to get value associated with key(32bit)
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [0]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [0]
  ///      - Can not find search key(f_c_key) designated by parameter [0]
  ///      - Can not change the data string, because that data string getted
  ///        from configuration file is over range [9.8765436e+12]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(32bit) associated with key.
  ///       If there are multiple values associated with the same key, return the first value.
  ///       This API has been depricated, please use GetFloat(const std::string& f_c_key, F_32& f_f_value).
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  F_32 GetFloat(const std::string &f_c_key);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetInt
  /// \~english @par Brief
  ///     This function is used to get the integer value associated with key
  ///     If there are multiple values associated with the same key, then the first value is returned.
  ///     This API has been depricated, use GetInt(key, ref_value)
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @retval SI_32 - value associated with key
  /// \~english @retval 0.0f - Failed to get value associated with key(32bit)
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [0]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [0]
  ///      - Can not find search key(f_c_key) designated by parameter [0]
  ///      - Failed to change data getted from Configuration file from string type to Int type [0]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(32bit) associated with key.
  ///       If there are multiple values associated with the same key, return the first value.
  ///       This API has been depricated, please use GetInt(const std::string& f_c_key, SI_32& f_si_value).
  /// \~english @par
  ///    Please pay attention to the following points when you use this API.\n
  ///    - If data string getted from file is larger than INT_MAX(2147483648), return -1.
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  SI_32 GetInt(const std::string &f_c_key);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetString
  /// \~english @par Brief
  ///     This function is used to get the string value associated with key
  ///     If there are multiple values associated with the same key, all the values separated by
  ///     delimiter "\n" are returned.
  ///     This API has been depricated, use GetString(key, ref_value)
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @retval std::string value(string) associated with key
  /// \~english @retval nullbuffer - Failed to get value associated with key
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [null buffer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [null buffer]
  ///      - Can not find search key(f_c_key) designated by parameter [null buffer]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(string) associated with key.
  ///       If there are multiple values associated with the same key,
  ///       return all the values separated by delimiter "\n".
  ///       This API has been depricated, please use GetString(
  ///       const std::string& f_c_key, std::string& f_cValue).
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  std::string GetString(const std::string &f_c_key);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetBool
  /// \~english @par Brief
  ///     This function is used to get the bool value associated with key
  ///     If there are multiple values associated with the same key, then the first value is returned.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key string
  /// \~english @param [in] f_b_value
  ///     BOOL& - value associated with key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @retval eFrameworkunifiedStatusErrOther - value is not bool type
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Value getted from configuration file is not true or false  [eFrameworkunifiedStatusErrOther]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(TRUE/FALSE) associated with key.
  ///       If there are multiple values associated with the same key, return the first value.
  /// \~english @see CNSConfigWriter::SetBool
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus GetBool(const std::string &f_c_key, BOOL &f_b_value);  // NOLINT (readability/nolint)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetDouble
  /// \~english @par Brief
  ///     This function is used to get the double value associated with key.
  ///     If there are multiple values associated with the same key, then the first value is returned.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @param [in] f_f_value
  ///     F_64& - value associated with key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @retval eFrameworkunifiedStatusInvldBuf - change error
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Changed result of data string getted from configuration file is overflow or underflow [eFrameworkunifiedStatusInvldBuf]
  /// \~english @par Classification
  ///       Public
  /// \~english @par
  ///      Please pay attention to the following points when you use this API.\n
  ///      - Return eFrameworkunifiedStatusOK if we didn't excute the changing operation
  ///      - We can take the value in specification only if it is in the range of
  ///        [1.17549435082228750797e-38F, 3.40282346638528859812e+38F](min value of double, max value of double).
  /// \~english @par Type
  ///      Sync Only
  /// \~english @par Detail
  ///       Return the value(64bit) associated with key.
  ///       If there are multiple values associated with the same key, return the first value.
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus GetDouble(const std::string &f_c_key, F_64 &f_f_value);  // NOLINT  (readability/nolint)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetFloat
  /// \~english @par Brief
  ///     This function is used to get the float value associated with key
  ///     If there are multiple values associated with the same key, then the first value is returned.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @param [in] f_f_value
  ///     F_32& - value associated with key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @retval eFrameworkunifiedStatusInvldBuf - change error
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Can not change the data string, because that data string getted
  ///        from configuration file is over range [9.8765436e+12]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(32bit) associated with key.
  ///       If there are multiple values associated with the same key, return the first value.
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus GetFloat(const std::string &f_c_key, F_32 &f_f_value);  // NOLINT (readability/nolint)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetInt
  /// \~english @par Brief
  ///     This function is used to get the integer value associated with key
  ///     If there are multiple values associated with the same key, then the first value is returned.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @param [out] f_si_value
  ///     SI_32& - value associated with key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @retval eFrameworkunifiedStatusInvldBuf - change error
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Failed to change data getted from Configuration file from string type to Int type [eFrameworkunifiedStatusInvldBuf]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///      Sync Only
  /// \~english @par Detail
  ///      Return the value(32bit) associated with key.
  ///      If there are multiple values associated with the same key, return all the values separated by delimiter "\n".
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus GetInt(const std::string &f_c_key, SI_32 &f_si_value);  // NOLINT (readability/nolint)

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup GetString
  /// \~english @par Brief
  ///     This function is used to get the string value associated with key
  ///     If there are multiple values associated with the same key, all the values separated by
  ///     delimiter "\n" are returned.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key to search
  /// \~english @param [in] f_c_value
  ///     std::string& - value(string) associated with key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @par Prerequisite
  ///       - Call the construct of CNSConfigReader
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Return the value(string) associated with key.
  ///       If there are multiple values associated with the same key,
  ///       return all the values separated by delimiter "\n".
  /// \~english @see CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus GetString(const std::string &f_c_key, std::string &f_c_value);  // NOLINT (readability/nolint)

 protected:
  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// GetDataPtr
  /// This function is used to get the data pointer. This pointer is then set in config writer.
  /// This is needed to avoid recreation of same data structure object in both reader and writer
  /// when we create object of NSConfigParser.
  ///
  /// \return PVOID - pointer of data structure
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  PVOID GetDataPtr();

 private:
  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// FormatValue
  /// This function is used to remove the line feed or carriage return from string
  ///
  /// \param  [in] f_cValue
  ///     std::string - value
  ///
  /// \return std::string - formated data
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  std::string FormatValue(const std::string &f_c_value);

  // config reader pointer
  IConfigReader *m_pReader;
  static HANDLE m_hNSXMLLibHandle;  // NOLINT (readability/nolint)
};


/**
 * @class CNSConfigWriter
 * @brief \~english File Write Service Class
 * @par   \~english Brief Introduction
 * \~english This class provides API's to application to write to configuration files.
 *
 */
class CNSConfigWriter {
 public:
  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup CNSConfigWriter
  /// \~english @par Brief
  ///     Constructor of CNSConfigWriter class
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///       - None
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       It is called when generating the instance of CNSConfigWriter class.
  /// \~english @see CNSConfigWriter::~CNSConfigWriter
  ////////////////////////////////////////////////////////////////////////////////////////////////
  CNSConfigWriter();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup CNSConfigWriter
  /// \~english @par Brief
  ///     Constructor of CNSConfigWriter class
  ///     This is depricated. Use parameterless constructor instead to create object and
  ///     Parse(filepath) to parse the file using writer object.
  /// \~english @param [in] f_c_filepath
  ///     const std::string& - Full path of the configuration file
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///       - None
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       It doesn't need to call Parse() function to execute parse process of configuration File,
  ///       when using the constructor with file path. However, because we don't execute error process,
  ///       if it needs to reply error about parse process, we must to use the constructor without parameter
  ///       and call Parse() function.
  /// \~english @see CNSConfigWriter::~CNSConfigWriter
  ////////////////////////////////////////////////////////////////////////////////////////////////
  explicit CNSConfigWriter(const std::string &f_c_filepath);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup ~CNSConfigWriter
  /// \~english @par Brief
  ///     Destructor of CNSConfigWriter class
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Release the used memory and the parsed result of Configuration File.
  /// \~english @see CNSConfigWriter::CNSConfigWriter
  ////////////////////////////////////////////////////////////////////////////////////////////////
  ~CNSConfigWriter();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Parse
  /// \~english @par Brief
  ///     This function is used to parse the configuration file
  /// \~english @param [in] f_c_filepath
  ///     const std::string& - Name of the configuration file
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - if memory allocation failed or document not proper
  /// \~english @retval eFrameworkunifiedStatusFail - invalid file type
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusErrOther - file data error
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File(f_c_filepath) designated by parameter is not proper [eFrameworkunifiedStatusNullPointer]
  ///      - Data of file(f_c_filepath) designated by parameter is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Expansion name of file(f_c_filepath) designated by parameter is not cfg [eFrameworkunifiedStatusFail]
  ///      - Failed to open file(f_c_filepath) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Path of file designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Data of file designated by parameter has error [eFrameworkunifiedStatusErrOther]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Parse designated configuration file. If the data format is correct, get memory to store the parsed result,
  ///       and store the parsed contents in it.
  /// \~english @see CNSConfigParser::Parse, CNSConfigWriter::Parse
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Parse(const std::string &f_c_filepath);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Save
  /// \~english @par Brief
  ///     This function is used to save the configuration settings to config file
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusFail - file access fail
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File data is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - File doesn't exit [eFrameworkunifiedStatusFail]
  ///      - File access error [eFrameworkunifiedStatusFail]
  ///      - Can't open file [eFrameworkunifiedStatusFail]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Save the data stored in memory to configuration file.
  /// \~english @see CNSConfigWriter::SetBool, CNSConfigWriter::Set
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Save();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup SetBool
  /// \~english @par Brief
  ///     This function is used to set the bool value corresponding to key
  ///     This function is not overloaded with other Set() API's of this class because
  ///     BOOL is typedef of UI_32 so when we pass integer or BOOL to Set API it would have
  ///     called the same API.
  ///     If multiple identical keys are found it sets the value for all the keys.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key
  /// \~english @param [in] f_b_value
  ///     BOOL - bool value to set for key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @retval eFrameworkunifiedStatusErrOther - if passsed value is invalid
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File data is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Data(f_bValue) of search key designated by parameter is not bool [eFrameworkunifiedStatusInvldParam]
  /// \~english @par Classification
  ///       Public
  /// \~english @par
  ///      Please pay attention to the following points when you use this API.\n
  ///      - Valid condition of search key string: there is no separator and line feed in config tag
  /// \~english @par Type
  ///      Sync Only
  /// \~english @par Detail
  ///      Set the value(bool type) associated with key to data stored in memory.
  ///      If there are multiple keys, set the values associated with all keys.
  /// \~english @see CNSConfigReader::GetBool
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus SetBool(const std::string &f_c_key, BOOL f_b_value);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Set
  /// \~english @par Brief
  ///     This function is used to set the double value corresponding to key.
  ///     If multiple identical keys are found it sets the value for all the keys.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key
  /// \~english @param [in]  f_f_value
  ///     F_64 - double value to set for key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File data is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  /// \~english @par Classification
  ///       Public
  /// \~english @par
  ///       Please pay attention to the following points when you use this API.\n
  ///      - We can take the value in specification only if it is in the range of
  ///        [2.22507385850720138309e-308L, 1.7976931348623157e+308L](min value of double, max value of double).
  ///       - Valid condition of search key string: there is no separator and line feed in config tag
  /// \~english @par Type
  ///      Sync Only
  /// \~english @par Detail
  ///      Set the bool type value(64bit) associated with key to data stored in memory.
  ///      If there are multiple keys, set the values associated with all keys.
  /// \~english @see CNSConfigReader::GetDouble
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Set(const std::string &f_c_key, F_64 f_f_value);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Set
  /// \~english @par Brief
  ///     This function is used to set the float value corresponding to key.
  ///     If multiple identical keys are found it sets the value for all the keys.
  /// \~english @param [in]  f_c_key
  ///     const std::string& - key
  /// \~english @param [in]  f_f_value
  ///     F_32 - float value to set for key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File data is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  /// \~english @par Classification
  ///       Public
  /// \~english @par
  ///       Please pay attention to the following points when you use this API.\n
  ///      - We can take the value in specification only if it is in the range of
  ///        [1.17549435082228750797e-38F, 3.40282346638528859812e+38F](min value of double, max value of double).
  ///       - Valid condition of search key string: there is no separator and line feed in config tag
  /// \~english @par Type
  ///      Sync Only
  /// \~english @par Detail
  ///      Set the float type value(32bit) associated with key to data stored in memory.
  ///      If there are multiple keys, set the values associated with all keys.
  /// \~english @see CNSConfigReader::GetFloat
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Set(const std::string &f_c_key, F_32 f_f_value);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Set
  /// \~english @par Brief
  ///     This function is used to set the integer value corresponding to key.
  ///     If multiple identical keys are found it sets the value for all the keys.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key
  /// \~english @param [in] f_si_value
  ///     SI_32 - integer value to set for key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File data is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  /// \~english @par Classification
  ///       Public
  /// \~english @par
  ///      Please pay attention to the following points when you use this API.\n
  ///      - Valid condition of search key string: there is no separator and line feed in config tag
  /// \~english @par Type
  ///      Sync Only
  /// \~english @par Detail
  ///      Set the int type value(32bit) associated with key to data stored in memory.
  ///      If there are multiple keys, set the values associated with all keys.
  /// \~english @see CNSConfigReader::GetInt
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Set(const std::string &f_c_key, SI_32 f_si_value);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Set
  /// \~english @par Brief
  ///     This function is used to set the string value corresponding to key.
  ///     If multiple identical keys are found it sets the value for all the keys.
  /// \~english @param [in] f_c_key
  ///     const std::string& - key
  /// \~english @param [in] f_s_value
  ///     const std::string&  - string value to set for key
  /// \~english @retval eFrameworkunifiedStatusOK - success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - memory allocation failed
  /// \~english @retval eFrameworkunifiedStatusInvldParam - invalid parameter
  /// \~english @retval eFrameworkunifiedStatusFail - can not find key
  /// \~english @par Prerequisite
  ///      - Call the construct of CNSConfigWriter
  /// \~english @par Change of internal state
  ///      - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File data is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Data of search key(f_c_key) designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Can not find search key(f_c_key) designated by parameter [eFrameworkunifiedStatusFail]
  /// \~english @par Classification
  ///       Public
  /// \~english @par
  ///      Please pay attention to the following points when you use this API.\n
  ///      - Valid condition of search key string: there is no separator and line feed in config tag
  /// \~english @par Type
  ///      Sync Only
  /// \~english @par Detail
  ///      Set the string type value associated with key to data stored in memory.
  ///      If there are multiple keys, set the values associated with all keys.
  /// \~english @see CNSConfigReader::GetString
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Set(const std::string &f_c_key, const std::string &f_s_value);

 protected:
  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// CNSConfigWriter
  /// Constructor of CNSConfigWriter class
  ///
  /// \param  [in] f_c_filepath
  ///     const std::string& - Full path of the configuration file
  /// \param  [in] f_b_noload
  ///     BOOL - load writer with no data
  ///
  /// \return
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  CNSConfigWriter(const std::string &f_c_filepath, BOOL f_b_noload);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// SetDataPtr
  /// This function is used to set the data pointer in writer class with data pointer
  /// created in config reader class.
  /// This is needed to avoid recreation of same data structure object in both reader and writer
  /// when we create object of NSConfigParser
  ///
  /// \param  [in] f_p_data
  ///     PVOID - Pointer to data structure
  ///
  /// \return VOID
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  VOID SetDataPtr(PVOID f_p_data);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// Create
  /// This function is used to create config object
  ///
  /// \param  [in] f_c_filepath
  ///     const std::string& - Name of the configuration file
  ///
  /// \return EFrameworkunifiedStatus - success or failure
  ///
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Create(const std::string &f_c_filepath);

 private:
  // config writer pointer
  IConfigWriter *m_pWriter;
  static HANDLE m_hNSXMLLibHandle;  // NOLINT (readability/nolint)
};


/**
 * @class CNSConfigParser
 * @brief \~english File both Reade and Write Service Class
 * @par   \~english Brief Introduction
 * \~english This class provides API's to application for both reading and writing into configuration files.
 *
 */
class CNSConfigParser: public CNSConfigReader, public CNSConfigWriter {
 public:
  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup CNSConfigParser
  /// \~english @par Brief
  ///       Constructor of CNSConfigParser class
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///       - None
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       It is called when generating the instance of CNSConfigParser class.
  /// \~english @see CNSConfigParser::~CNSConfigParser
  ////////////////////////////////////////////////////////////////////////////////////////////////
  CNSConfigParser();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup CNSConfigParser
  /// \~english @par Brief
  ///       Constructor of CNSConfigParser class
  ///       This is depricated. Use parameterless constructor instead to create object and
  ///       Parse(filepath) to parse the file using parser object.
  /// \~english @param [in] f_c_filepath
  ///     const std::string& - Full path of the configuration file
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///       - None
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       It doesn't need to call Parse() function to execute parse process of configuration File,
  ///       when using the constructor with file path. However, because we don't execute error process,
  ///       if it needs to reply error about parse process, we must to use the constructor without parameter
  ///       and call Parse() function.
  /// \~english @see CNSConfigParser::~CNSConfigParser
  ////////////////////////////////////////////////////////////////////////////////////////////////
  explicit CNSConfigParser(const std::string &f_c_filepath);

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup ~CNSConfigParser
  /// \~english @par Brief
  ///     Destructor of CNSConfigParser class
  /// \~english @retval none
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigParser
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///       - None
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Release the used memory and the parsed result of Configuration File.
  /// \~english @see CNSConfigParser::CNSConfigParser
  ////////////////////////////////////////////////////////////////////////////////////////////////
  ~CNSConfigParser();

  ////////////////////////////////////////////////////////////////////////////////////////////////
  /// \ingroup Parse
  /// \~english @par Brief
  ///     This function is used to create config reader object and config writer object
  ///     which then parses the configuration file.
  /// \~english @param [in] f_c_filepath
  ///     const std::string& - Name of the configuration file
  /// \~english @retval eFrameworkunifiedStatusOK on success
  /// \~english @retval eFrameworkunifiedStatusNullPointer - if memory allocation failed or document not proper
  /// \~english @retval eFrameworkunifiedStatusFail - invalid file type
  /// \~english @retval eFrameworkunifiedStatusInvldParam invalid parameter
  /// \~english @retval eFrameworkunifiedStatusErrOther file data error
  /// \~english @par Prerequisite
  ///     - Call the construct of CNSConfigParser
  /// \~english @par Change of internal state
  ///       - None
  /// \~english @par Conditions of processing failure
  ///      - Memory allocation failed [eFrameworkunifiedStatusNullPointer]
  ///      - File(f_c_filepath) designated by parameter is not proper [eFrameworkunifiedStatusNullPointer]
  ///      - Data of file(f_c_filepath) designated by parameter is NULL [eFrameworkunifiedStatusNullPointer]
  ///      - Expansion name of file(f_c_filepath) designated by parameter is not cfg [eFrameworkunifiedStatusFail]
  ///      - Failed to open file(f_c_filepath) designated by parameter [eFrameworkunifiedStatusFail]
  ///      - Path of file designated by parameter is NULL [eFrameworkunifiedStatusInvldParam]
  ///      - Data of file designated by parameter has error [eFrameworkunifiedStatusErrOther]
  /// \~english @par Classification
  ///       Public
  /// \~english @par Type
  ///       Sync Only
  /// \~english @par Detail
  ///       Parse designated configuration file. If the data format is correct, get memory to store the parsed result,
  ///       and store the parsed contents in it.
  /// \~english @see CNSConfigReader::Parse, CNSConfigWriter::Parse
  ////////////////////////////////////////////////////////////////////////////////////////////////
  EFrameworkunifiedStatus Parse(const std::string &f_c_filepath);
};

#endif  // NS_NATIVESERVICES_INC_NATIVE_NS_CONFIG_PARSER_IF_H_  // NOLINT  (build/header_guard)
/** @}*/
/** @}*/
/** @}*/
/** @}*/