WSF
WsfPM_ObjectList.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11// ****************************************************************************
12// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef WSFPM_OBJECTLIST_HPP
16#define WSFPM_OBJECTLIST_HPP
17
18#include "wsf_parser_export.h"
19
20#include "WsfPProxyList.hpp"
21#include "WsfPProxyNode.hpp"
22
23class WSF_PARSER_EXPORT WsfPM_List : public WsfPProxyNode
24{
25public:
27
29 : WsfPProxyNode(aNode)
30 {
31 }
32 WsfPProxyList* list() const { return GetValue().GetList(); }
33
34 size_t size() const
35 {
36 WsfPProxyList* listPtr = list();
37 return (listPtr ? listPtr->Size() : 0);
38 }
39
40 WsfPProxyNode back() const;
41
42 bool append(WsfPProxyValue aValue);
43 bool insert(WsfPProxyValue aValue, size_t aIndex);
44 bool remove(size_t aIndex);
45
48 WsfPProxyNode operator[](size_t aIndex);
49};
50
51template<typename TYPE>
52class WSF_PARSER_EXPORT WsfPM_ObjectList : public WsfPM_List
53{
54public:
56
58 : WsfPM_List(aNode)
59 {
60 }
61
64 TYPE operator[](size_t aIndex) { return TYPE(WsfPM_List::operator[](aIndex)); }
65};
66
67#endif
size_t size() const
Definition WsfPM_ObjectList.hpp:34
WsfPProxyList * list() const
Definition WsfPM_ObjectList.hpp:32
WsfPM_List()
Definition WsfPM_ObjectList.hpp:26
WsfPM_List(const WsfPProxyNode &aNode)
Definition WsfPM_ObjectList.hpp:28
WsfPM_ObjectList(const WsfPProxyNode &aNode)
Definition WsfPM_ObjectList.hpp:57
WsfPM_ObjectList()
Definition WsfPM_ObjectList.hpp:55
TYPE operator[](size_t aIndex)
Definition WsfPM_ObjectList.hpp:64
Definition WsfPProxyList.hpp:34
size_t Size()
Definition WsfPProxyList.cpp:25
Definition WsfPProxyNode.hpp:60
WsfPProxyValue GetValue() const
Definition WsfPProxyNode.cpp:79
WsfPProxyNode()
Definition WsfPProxyNode.cpp:24
Definition WsfPProxyValue.hpp:33
WsfPProxyList * GetList() const
Definition WsfPProxyValue.cpp:67
Copyrights Multiple, All Rights Reserved