globals.h Source File

API: globals.h Source File
API
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
25namespace omnetpp {
26namespace internal {
27
28// Global registration lists
29SIM_API extern cGlobalRegistrationList componentTypes;
30SIM_API extern cGlobalRegistrationList nedFunctions;
31SIM_API extern cGlobalRegistrationList classes;
32SIM_API extern cGlobalRegistrationList enums;
33SIM_API extern cGlobalRegistrationList classDescriptors;
34SIM_API extern cGlobalRegistrationList configOptions;
35SIM_API extern cGlobalRegistrationList resultFilters;
36SIM_API extern cGlobalRegistrationList resultRecorders;
37SIM_API extern cGlobalRegistrationList messagePrinters;
38SIM_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())
42SIM_API extern cSoftOwner globalOwningContext;
43
44// Internal: Support for embedding NED files as string constants
45struct 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
54SIM_API extern std::vector<EmbeddedNedFile> embeddedNedFiles;
55
56} // namespace internal
57} // namespace omnetpp
58
59
60#endif
61