52 lines
1.7 KiB
C++
52 lines
1.7 KiB
C++
|
|
/*
|
||
|
|
* This program is free software; you can redistribute it and/or modify
|
||
|
|
* it under the terms of the GNU General Public License version 2 as
|
||
|
|
* published by the Free Software Foundation;
|
||
|
|
*
|
||
|
|
* This program is distributed in the hope that it will be useful,
|
||
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
|
* GNU General Public License for more details.
|
||
|
|
*
|
||
|
|
* You should have received a copy of the GNU General Public License
|
||
|
|
* along with this program; if not, write to the Free Software
|
||
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||
|
|
*/
|
||
|
|
|
||
|
|
// 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/
|
||
|
|
// | nested-subdir/
|
||
|
|
// | | - scratch-nested-subdir-executable.cc // Main simulation file
|
||
|
|
// | | lib
|
||
|
|
// | | | - scratch-nested-subdir-library-header.h // Additional header
|
||
|
|
// | | | - scratch-nested-subdir-library-source.cc // Additional header implementation
|
||
|
|
//
|
||
|
|
// This file contains the main() function, which calls an external function
|
||
|
|
// defined in the "scratch-nested-subdir-library-header.h" header file and
|
||
|
|
// implemented in "scratch-nested-subdir-library-source.cc".
|
||
|
|
|
||
|
|
#include "lib/scratch-nested-subdir-library-header.h"
|
||
|
|
|
||
|
|
#include "ns3/core-module.h"
|
||
|
|
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
using namespace ns3;
|
||
|
|
|
||
|
|
NS_LOG_COMPONENT_DEFINE("ScratchNestedSubdir");
|
||
|
|
|
||
|
|
int
|
||
|
|
main(int argc, char* argv[])
|
||
|
|
{
|
||
|
|
std::string message = ScratchNestedSubdirGetMessage();
|
||
|
|
NS_LOG_UNCOND(message);
|
||
|
|
|
||
|
|
Simulator::Run();
|
||
|
|
Simulator::Destroy();
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
}
|