OMNeT++ Simulation Library  6.0.3
globals.h
1 //==========================================================================
2 // GLOBALS.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_GLOBALS_H
17 #define __OMNETPP_GLOBALS_H
18 
19 #include <map>
20 #include <string>
21 #include "onstartup.h"
22 #include "cregistrationlist.h"
23 #include "cobjectfactory.h"
24 
25 namespace omnetpp {
26 namespace internal {
27 
28 // Global registration lists
29 SIM_API extern cGlobalRegistrationList componentTypes;
30 SIM_API extern cGlobalRegistrationList nedFunctions;
31 SIM_API extern cGlobalRegistrationList classes;
32 SIM_API extern cGlobalRegistrationList enums;
33 SIM_API extern cGlobalRegistrationList classDescriptors;
34 SIM_API extern cGlobalRegistrationList configOptions;
35 SIM_API extern cGlobalRegistrationList resultFilters;
36 SIM_API extern cGlobalRegistrationList resultRecorders;
37 SIM_API extern cGlobalRegistrationList messagePrinters;
38 SIM_API extern std::map<std::string,std::string> figureTypes;
39 
40 // Internal: list in which objects are accumulated if there is no simple module in context.
41 // @see cOwnedObject::setOwningContext() and cSimulation::setContextModule())
42 SIM_API extern cSoftOwner globalOwningContext;
43 
44 // Internal: Support for embedding NED files as string constants
45 struct EmbeddedNedFile
46 {
47  EmbeddedNedFile(std::string fileName, std::string nedText, std::string garblephrase="") :
48  fileName(fileName), nedText(nedText), garblephrase(garblephrase) {}
49  std::string fileName;
50  std::string nedText;
51  std::string garblephrase;
52 };
53 
54 SIM_API extern std::vector<EmbeddedNedFile> embeddedNedFiles;
55 
56 } // namespace internal
57 } // namespace omnetpp
58 
59 
60 #endif
61