SST 15.0
Structural Simulation Toolkit
mapper.h
1// Copyright 2009-2025 NTESS. Under the terms
2// of Contract DE-NA0003525 with NTESS, the U.S.
3// Government retains certain rights in this software.
4//
5// Copyright (c) 2009-2025, NTESS
6// All rights reserved.
7//
8// This file is part of the SST software package. For license
9// information, see the LICENSE file in the top level directory of the
10// distribution.
11
12#ifndef SST_CORE_SERIALIZATION_IMPL_MAPPER_H
13#define SST_CORE_SERIALIZATION_IMPL_MAPPER_H
14
15#ifndef SST_INCLUDING_SERIALIZER_H
16#warning \
17 "The header file sst/core/serialization/impl/mapper.h should not be directly included as it is not part of the stable public API. The file is included in sst/core/serialization/serializer.h"
18#endif
19
20#include <string>
21#include <typeinfo>
22#include <vector>
23
24namespace SST::Core::Serialization {
25
26class ObjectMap;
27
28namespace pvt {
29
30
32{
33 std::vector<ObjectMap*> obj_;
34 bool next_item_read_only = false;
35
36public:
37 void map_primitive(const std::string& name, ObjectMap* map);
38 void map_container(const std::string& name, ObjectMap* map);
39 void map_existing_object(const std::string& name, ObjectMap* map);
40 void map_hierarchy_start(const std::string& name, ObjectMap* map);
41 void map_hierarchy_end();
42 void init(ObjectMap* object);
43 void reset();
44
45 void setNextObjectReadOnly();
46
47private:
48 int indent = 0;
49};
50
51} // namespace pvt
52} // namespace SST::Core::Serialization
53
54#endif // SST_CORE_SERIALIZATION_IMPL_MAPPER_H
Base class for objects created by the serializer mapping mode used to map the variables for objects.
Definition objectMap.h:112