code stringlengths 1 2.01M | repo_name stringlengths 3 62 | path stringlengths 1 267 | language stringclasses 231
values | license stringclasses 13
values | size int64 1 2.01M |
|---|---|---|---|---|---|
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/model/realtime-simulator-impl.cc | C++ | gpl2 | 26,533 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005 INRIA
*
* 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... | zy901002-gpsr | src/core/model/event-id.h | C++ | gpl2 | 2,832 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/system-path.cc | C++ | gpl2 | 7,788 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA, Gustavo Carneiro
*
* 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 prog... | zy901002-gpsr | src/core/model/object.cc | C++ | gpl2 | 10,748 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006,2007 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/log.cc | C++ | gpl2 | 13,116 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/attribute.cc | C++ | gpl2 | 2,197 |
#include "int64x64.h"
#include <stdint.h>
#include <iostream>
#include <sstream>
#include "assert.h"
namespace ns3 {
static uint8_t MostSignificantDigit (uint64_t value)
{
uint8_t n = 0;
do
{
n++;
value /= 10;
} while (value != 0);
return n;
}
static uint64_t PowerOfTen (uint8_t n)
{
uint... | zy901002-gpsr | src/core/model/int64x64.cc | C++ | gpl2 | 2,128 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/attribute-helper.h | C++ | gpl2 | 10,585 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/attribute.h | C++ | gpl2 | 7,308 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006 INRIA
*
* 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... | zy901002-gpsr | src/core/model/scheduler.cc | C++ | gpl2 | 1,099 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/model/wall-clock-synchronizer.h | C++ | gpl2 | 6,912 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/trace-source-accessor.cc | C++ | gpl2 | 985 |
#include "ns3/core-config.h"
#if !defined(INT64X64_DOUBLE_H) && (defined (INT64X64_USE_DOUBLE) || defined(PYTHON_SCAN))
#define INT64X64_DOUBLE_H
#include <iostream>
#include <math.h>
namespace ns3 {
class int64x64_t
{
public:
inline int64x64_t ()
: _v (0) {}
inline int64x64_t (double v)
: _v (v) {}
in... | zy901002-gpsr | src/core/model/int64x64-double.h | C++ | gpl2 | 4,046 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/config.cc | C++ | gpl2 | 19,814 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
* Copyright (c) 2007 Emmanuelle Laprise
*
* 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... | zy901002-gpsr | src/core/model/time.cc | C++ | gpl2 | 4,619 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/boolean.h | C++ | gpl2 | 1,899 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 Georgia Tech Research Corporation
*
* 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;
*
*... | zy901002-gpsr | src/core/model/ref-count-base.h | C++ | gpl2 | 1,611 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005 INRIA
*
* 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... | zy901002-gpsr | src/core/model/unix-system-wall-clock-ms.cc | C++ | gpl2 | 4,546 |
#include "ref-count-base.h"
namespace ns3 {
RefCountBase::~RefCountBase ()
{
}
} // namespace ns3
| zy901002-gpsr | src/core/model/ref-count-base.cc | C++ | gpl2 | 101 |
#include "int64x64-128.h"
#include "abort.h"
#include "assert.h"
namespace ns3 {
#define OUTPUT_SIGN(sa,sb,ua,ub) \
({ bool negA, negB; \
negA = sa < 0; \
negB = s... | zy901002-gpsr | src/core/model/int64x64-128.cc | C++ | gpl2 | 3,326 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006 INRIA
*
* 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... | zy901002-gpsr | src/core/model/int64x64-cairo.cc | C++ | gpl2 | 5,212 |
#ifndef EMPTY_H
#define EMPTY_H
namespace ns3 {
/**
* \brief make Callback use a separate empty type
*/
class empty {};
}
#endif /* EMPTY_H */
| zy901002-gpsr | src/core/model/empty.h | C++ | gpl2 | 147 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 INRIA
*
* 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... | zy901002-gpsr | src/core/model/calendar-scheduler.cc | C++ | gpl2 | 8,169 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/simulator.cc | C++ | gpl2 | 8,355 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA, Gustavo Carneiro
*
* 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 prog... | zy901002-gpsr | src/core/model/object.h | C++ | gpl2 | 13,539 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 1997 David Wetherall
* Copyright (c) 2005 David Wei
* Copyright (c) 2009 INRIA
*
* 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
* publis... | zy901002-gpsr | src/core/model/ns2-calendar-scheduler.h | C++ | gpl2 | 3,233 |
#ifndef TYPE_TRAITS_H
#define TYPE_TRAITS_H
template <typename T>
struct TypeTraits
{
private:
struct NullType {};
template <typename U> struct UnConst
{
typedef U Result;
};
template <typename U> struct UnConst<const U>
{
typedef U Result;
};
template <typename U> struct ReferenceTraits
{
... | zy901002-gpsr | src/core/model/type-traits.h | C++ | gpl2 | 7,897 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2010 NICTA
*
* 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... | zy901002-gpsr | src/core/model/fatal-impl.h | C++ | gpl2 | 3,148 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/object-base.cc | C++ | gpl2 | 9,420 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2011 Mathieu Lacage
*
* 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 di... | zy901002-gpsr | src/core/model/attribute-construction-list.cc | C++ | gpl2 | 2,153 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/type-id.cc | C++ | gpl2 | 17,703 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA, Mathieu Lacage
*
* 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 progra... | zy901002-gpsr | src/core/model/object-vector.h | C++ | gpl2 | 3,491 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/double.cc | C++ | gpl2 | 2,573 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA
*
* 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... | zy901002-gpsr | src/core/model/timer.cc | C++ | gpl2 | 3,302 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/simulator-impl.h | C++ | gpl2 | 7,447 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/model/unix-system-condition.cc | C++ | gpl2 | 4,638 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/double.h | C++ | gpl2 | 2,584 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/model/names.h | C++ | gpl2 | 20,768 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/boolean.cc | C++ | gpl2 | 2,113 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/ptr.h | C++ | gpl2 | 11,505 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006,2007 INESC Porto, INRIA
*
* 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 prog... | zy901002-gpsr | src/core/model/breakpoint.h | C++ | gpl2 | 2,758 |
#ifndef MAKE_EVENT_H
#define MAKE_EVENT_H
namespace ns3 {
class EventImpl;
template <typename MEM, typename OBJ>
EventImpl * MakeEvent (MEM mem_ptr, OBJ obj);
template <typename MEM, typename OBJ,
typename T1>
EventImpl * MakeEvent (MEM mem_ptr, OBJ obj, T1 a1);
template <typename MEM, typename OBJ,
... | zy901002-gpsr | src/core/model/make-event.h | C++ | gpl2 | 11,382 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006 INRIA, 2010 NICTA
*
* 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... | zy901002-gpsr | src/core/model/fatal-error.h | C++ | gpl2 | 3,003 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006,2007 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/log.h | C++ | gpl2 | 12,931 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006,2007 INRIA
*
* 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 d... | zy901002-gpsr | src/core/model/traced-callback.h | C++ | gpl2 | 9,300 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/global-value.cc | C++ | gpl2 | 5,083 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2006 INRIA
* Copyright (c) 2005 Mathieu Lacage
*
* 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 Foundati... | zy901002-gpsr | src/core/model/heap-scheduler.cc | C++ | gpl2 | 4,267 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/command-line.cc | C++ | gpl2 | 7,879 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA
*
* 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... | zy901002-gpsr | src/core/model/vector.cc | C++ | gpl2 | 2,525 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/config.h | C++ | gpl2 | 7,986 |
#include "simulator-impl.h"
namespace ns3 {
TypeId
SimulatorImpl::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::SimulatorImpl")
.SetParent<Object> ()
;
return tid;
}
} // namespace ns3
| zy901002-gpsr | src/core/model/simulator-impl.cc | C++ | gpl2 | 206 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/model/pointer.h | C++ | gpl2 | 4,155 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/callback.h | C++ | gpl2 | 37,337 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 Georgia Tech Research Corporation, INRIA
*
* 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... | zy901002-gpsr | src/core/model/simple-ref-count.h | C++ | gpl2 | 4,005 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/nstime.h | C++ | gpl2 | 18,567 |
#include "ns3/core-config.h"
#if !defined(INT64X64_128_H) && defined (INT64X64_USE_128) && !defined(PYTHON_SCAN)
#define INT64X64_128_H
#include "ns3/core-config.h"
#include <stdint.h>
#include <math.h>
#if defined(HAVE___UINT128_T) && !defined(HAVE_UINT128_T)
typedef __uint128_t uint128_t;
typedef __int128_t int128_... | zy901002-gpsr | src/core/model/int64x64-128.h | C++ | gpl2 | 5,313 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA, Mathieu Lacage
*
* 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 progra... | zy901002-gpsr | src/core/model/object-map.h | C++ | gpl2 | 3,478 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/model/default-simulator-impl.cc | C++ | gpl2 | 7,861 |
#include "ns3/core-config.h"
#if !defined(INT64X64_CAIRO_H) && defined (INT64X64_USE_CAIRO) && !defined(PYTHON_SCAN)
#define INT64X64_CAIRO_H
#include <stdint.h>
#include <math.h>
#include "cairo-wideint-private.h"
#ifdef __i386__
// this assembly code does not appear to work right yet.
#define noInt64x64_CAIRO_ASM 1... | zy901002-gpsr | src/core/model/int64x64-cairo.h | C++ | gpl2 | 6,048 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA, Mathieu Lacage
*
* 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 progra... | zy901002-gpsr | src/core/model/object-ptr-container.cc | C++ | gpl2 | 2,743 |
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | zy901002-gpsr | src/core/bindings/modulegen__gcc_ILP32.py | Python | gpl2 | 278,190 |
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | zy901002-gpsr | src/core/bindings/modulegen__gcc_LP64.py | Python | gpl2 | 278,187 |
#include "ns3module.h"
#include "ns3/ref-count-base.h"
namespace {
class PythonEventImpl : public ns3::EventImpl
{
private:
PyObject *m_callback;
PyObject *m_args;
public:
PythonEventImpl (PyObject *callback, PyObject *args)
{
m_callback = callback;
Py_INCREF (m_callback);
m_args = args;
Py_... | zy901002-gpsr | src/core/bindings/module_helpers.cc | C++ | gpl2 | 9,972 |
callback_classes = [
['void', 'unsigned char*', 'long', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'std::string', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
]
| zy901002-gpsr | src/core/bindings/callbacks_list.py | Python | gpl2 | 302 |
import re
import os
import sys
from pybindgen.typehandlers import base as typehandlers
from pybindgen import ReturnValue, Parameter
from pybindgen.cppmethod import CustomCppMethodWrapper, CustomCppConstructorWrapper
from pybindgen.typehandlers.codesink import MemoryCodeSink
from pybindgen.typehandlers import ctypepars... | zy901002-gpsr | src/core/bindings/modulegen_customizations.py | Python | gpl2 | 20,774 |
# "from _core import *" doesn't work here because symbols starting
# with underscore would not be imported. But they are needed because
# other modules depend on them...
import _core
g = globals()
for k,v in _core.__dict__.iteritems():
g[k] = v
del g, k, v, _core
# Without this, Python programs often crash beca... | zy901002-gpsr | src/core/bindings/core.py | Python | gpl2 | 518 |
// -*- c++ -*-
#include "ns3/core-module.h"
using namespace ns3;
namespace
{
static inline Ptr<Object>
__dummy_function_to_force_template_instantiation (Ptr<Object> obj, TypeId typeId)
{
return obj->GetObject<Object> (typeId);
}
static inline void
__dummy_function_to_force_template_instantiation_v2 ()
{
Time... | zy901002-gpsr | src/core/bindings/scan-header.h | C++ | gpl2 | 682 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* 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 us... | zy901002-gpsr | src/core/test/names-test-suite.cc | C++ | gpl2 | 29,104 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/test/callback-test-suite.cc | C++ | gpl2 | 17,817 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/test/simulator-test-suite.cc | C++ | gpl2 | 23,190 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/test/traced-callback-test-suite.cc | C++ | gpl2 | 3,747 |
#include "ns3/int64x64.h"
#include "ns3/test.h"
namespace ns3
{
class Int64x64FracTestCase : public TestCase
{
public:
Int64x64FracTestCase ();
virtual void DoRun (void);
void CheckFrac (int64_t hi, uint64_t lo);
};
void
Int64x64FracTestCase::CheckFrac (int64_t hi, uint64_t lo)
{
int64x64_t tmp = int64x64_t... | zy901002-gpsr | src/core/test/int64x64-test-suite.cc | C++ | gpl2 | 9,969 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
//
// Copyright (c) 2006 Georgia Tech Research Corporation
//
// 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;
//
//... | zy901002-gpsr | src/core/test/random-variable-test-suite.cc | C++ | gpl2 | 4,417 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/test/command-line-test-suite.cc | C++ | gpl2 | 6,740 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* 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 us... | zy901002-gpsr | src/core/test/rng-test-suite.cc | C++ | gpl2 | 9,742 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/test/global-value-test-suite.cc | C++ | gpl2 | 2,775 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA
*
* 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... | zy901002-gpsr | src/core/test/watchdog-test-suite.cc | C++ | gpl2 | 2,425 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA
*
* 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... | zy901002-gpsr | src/core/test/timer-test-suite.cc | C++ | gpl2 | 5,801 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/test/attribute-test-suite.cc | C++ | gpl2 | 43,517 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 INRIA
*
* 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... | zy901002-gpsr | src/core/test/config-test-suite.cc | C++ | gpl2 | 19,974 |
#! /usr/bin/env python
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# A list of C++ examples to run in order to ensure that they remain
# buildable and runnable over time. Each tuple in the list contains
#
# (example_name, do_run, do_valgrind_run).
#
# See test.py for more i... | zy901002-gpsr | src/core/test/examples-to-run.py | Python | gpl2 | 863 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* 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 distri... | zy901002-gpsr | src/core/test/ptr-test-suite.cc | C++ | gpl2 | 5,287 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
// An essential include is test.h
#include "ns3/test.h"
// Do not put your test classes in namespace ns3. You may find it useful
// to use the using directive to access the ns3 namespace directly
using namespace ns3;
// This is an example TestCase.
c... | zy901002-gpsr | src/core/test/sample-test-suite.cc | C++ | gpl2 | 1,696 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
* Copyright (c) 2007 Emmanuelle Laprise
*
* 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... | zy901002-gpsr | src/core/test/time-test-suite.cc | C++ | gpl2 | 4,363 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007 INRIA, Gustavo Carneiro
*
* 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 prog... | zy901002-gpsr | src/core/test/object-test-suite.cc | C++ | gpl2 | 14,095 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 University of Washington
*
* 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 pro... | zy901002-gpsr | src/core/test/type-traits-test-suite.cc | C++ | gpl2 | 2,084 |
# -*- Mode:Python; -*-
# /*
# * 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 WARRA... | zy901002-gpsr | src/core/examples/sample-rng-plot.py | Python | gpl2 | 1,246 |
# -*- Mode:Python; -*-
# /*
# * Copyright (c) 2010 INRIA
# *
# * 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 b... | zy901002-gpsr | src/core/examples/sample-simulator.py | Python | gpl2 | 1,989 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
#include "ns3/callback.h"
#include "ns3/assert.h"
#include <iostream>
using namespace ns3;
static double
CbOne (double a, double b)
{
std::cout << "invoke cbOne a=" << a << ", b=" << b << std::endl;
return a;
}
class MyCb {
public:
int CbTwo (d... | zy901002-gpsr | src/core/examples/main-callback.cc | C++ | gpl2 | 2,089 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
#include "ns3/ptr.h"
#include "ns3/object.h"
#include <iostream>
using namespace ns3;
class A : public Object
{
public:
A ();
~A ();
void Method (void);
};
A::A ()
{
std::cout << "A constructor" << std::endl;
}
A::~A()
{
std::cout << "A destr... | zy901002-gpsr | src/core/examples/main-ptr.cc | C++ | gpl2 | 1,234 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* 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 us... | zy901002-gpsr | src/core/examples/sample-random-variable.cc | C++ | gpl2 | 2,319 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008 Timo Bingmann
*
* 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 dis... | zy901002-gpsr | src/core/examples/main-random-variable.cc | C++ | gpl2 | 14,071 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2010 INRIA
*
* 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... | zy901002-gpsr | src/core/examples/sample-simulator.cc | C++ | gpl2 | 2,328 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
#include "ns3/simulator.h"
#include "ns3/realtime-simulator-impl.h"
#include "ns3/nstime.h"
#include "ns3/log.h"
#include "ns3/system-thread.h"
#include "ns3/string.h"
#include "ns3/config.h"
#include "ns3/global-value.h"
#include "ns3/ptr.h"
#include ... | zy901002-gpsr | src/core/examples/main-test-sync.cc | C++ | gpl2 | 2,845 |
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
if not bld.env['ENABLE_EXAMPLES']:
return;
obj = bld.create_ns3_program('main-callback', ['core'])
obj.source = 'main-callback.cc'
obj = bld.create_ns3_program('sample-simulator', ['core'])
... | zy901002-gpsr | src/core/examples/wscript | Python | gpl2 | 969 |
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
import sys
import Options
def options(opt):
opt.add_option('--int64x64-as-double',
help=('Whether to use a double floating point'
' type for int64x64 values'
' W... | zy901002-gpsr | src/core/wscript | Python | gpl2 | 10,733 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
*
* 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 Foundatio... | zy901002-gpsr | src/lte/model/path-loss-model.cc | C++ | gpl2 | 2,050 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
*
* 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 Foundatio... | zy901002-gpsr | src/lte/model/ue-net-device.h | C++ | gpl2 | 3,080 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
*
* 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 Foundatio... | zy901002-gpsr | src/lte/model/ue-mac-entity.cc | C++ | gpl2 | 2,299 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
*
* 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 Fou... | zy901002-gpsr | src/lte/model/jakes-fading-realizations.h | C | gpl2 | 1,636 |