cvaluecontainer.h Source File

API: cvaluecontainer.h Source File
API
cvaluecontainer.h
1//==========================================================================
2// CVALUECONTAINER.H - part of
3// OMNeT++/OMNEST
4// Discrete System Simulation in C++
5//
6//==========================================================================
7
8/*--------------------------------------------------------------*
9 Copyright (C) 1992-2017 Andras Varga
10 Copyright (C) 2006-2017 OpenSim Ltd.
11
12 This file is distributed WITHOUT ANY WARRANTY. See the file
13 `license' for details on this and other legal matters.
14*--------------------------------------------------------------*/
15
16#ifndef __OMNETPP_CVALUECONTAINER_H
17#define __OMNETPP_CVALUECONTAINER_H
18
19#include <string>
20#include <vector>
21#include "cvalue.h"
22#include "cownedobject.h"
23
24
25namespace omnetpp {
26
32class SIM_API cValueContainer : public cOwnedObject
33{
34 private:
35 virtual void parsimPack(cCommBuffer *) const override {throw cRuntimeError(this, E_CANTPACK);}
36 virtual void parsimUnpack(cCommBuffer *) override {throw cRuntimeError(this, E_CANTPACK);}
37
38 protected:
39 void valueCloned(cValue& value, const cValueContainer& other);
40 void takeValue(cValue& value);
41 void dropValue(cValue& value);
42 void dropAndDeleteValue(cValue& value);
43
44 public:
46
49 explicit cValueContainer(const char *name=nullptr) : cOwnedObject(name) {}
51};
52
53
54} // namespace omnetpp
55
56#endif
57
58
Buffer for the communications layer of parallel simulation.
Definition ccommbuffer.h:42
Thrown when the simulation kernel or other components detect a runtime error.
Definition cexception.h:343
cValueContainer(const char *name=nullptr)
Definition cvaluecontainer.h:49
A variant-like value class used during evaluating NED expressions.
Definition cvalue.h:48