src/core/object.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed, 02 May 2007 09:16:32 +0200
changeset 466 33710ab0ecf9
parent 379 ae74e8a7bb44
child 502 1b13c6e1ca1b
permissions -rw-r--r--
add Object::Dispose
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     2
/*
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     3
 * Copyright (c) 2007 INRIA
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     4
 * All rights reserved.
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     5
 *
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     8
 * published by the Free Software Foundation;
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
     9
 *
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    13
 * GNU General Public License for more details.
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    14
 *
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    18
 *
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    19
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    20
 */
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    21
#ifndef OBJECT_H
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    22
#define OBJECT_H
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    23
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    24
#include <stdint.h>
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    25
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    26
namespace ns3 {
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    27
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    28
class Object 
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    29
{
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    30
public:
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    31
  Object ();
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    32
  virtual ~Object ();
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    33
  void Ref (void);
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    34
  void Unref (void);
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    35
  bool IsSingle (void);
466
33710ab0ecf9 add Object::Dispose
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 379
diff changeset
    36
  virtual void Dispose (void);
379
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    37
private:
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    38
  uint32_t m_count;
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    39
};
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    40
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    41
}//namespace ns3
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    42
ae74e8a7bb44 net device copy and assignment, reference counted channel.
Craig Dowell
parents:
diff changeset
    43
#endif /* OBJECT_H */