Files
unison/scratch/subdir/scratch-subdir.cc

40 lines
1017 B
C++
Raw Normal View History

/*
2024-06-17 16:17:10 +02:00
* SPDX-License-Identifier: GPL-2.0-only
*/
// This example shows how to create new simulations that are implemented in
// multiple files and headers. The structure of this simulation project
// is as follows:
//
// scratch/
// | subdir/
// | | - scratch-subdir.cc // Main simulation file
// | | - scratch-subdir-additional-header.h // Additional header
// | | - scratch-subdir-additional-header.cc // Additional header implementation
//
// This file contains the main() function, which calls an external function
// defined in the "scratch-subdir-additional-header.h" header file and
// implemented in "scratch-subdir-additional-header.cc".
#include "scratch-subdir-additional-header.h"
2022-10-07 20:08:35 +00:00
#include "ns3/core-module.h"
#include <string>
using namespace ns3;
2022-10-07 20:08:35 +00:00
NS_LOG_COMPONENT_DEFINE("ScratchSubdir");
int
2022-10-07 20:08:35 +00:00
main(int argc, char* argv[])
{
2022-10-07 20:08:35 +00:00
std::string message = ScratchSubdirGetMessage();
NS_LOG_UNCOND(message);
2022-10-07 20:08:35 +00:00
Simulator::Run();
Simulator::Destroy();
2022-10-07 20:08:35 +00:00
return 0;
}