Ignore:
Timestamp:
Feb 17, 2009, 12:07:04 PM (16 years ago)
Author:
Christoph Mayer
Message:

-memory leaks und corruption gefixt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/SpoVNetProperties.cpp

    r2409 r2440  
    4343const SpoVNetProperties SpoVNetProperties::DEFAULT;
    4444
     45SpoVNetProperties::SpoVNetProperties() :
     46                name( Name::random() ), type( ONE_HOP_OVERLAY ), idLength( 192 ),
     47                initiator( NodeID::UNSPECIFIED ), hidden( false ) {
     48
     49        id = name.toSpoVNetId();
    4550}
     51
     52SpoVNetProperties::SpoVNetProperties(const SpoVNetProperties& copy) :
     53                name( copy.name ), id( copy.id ),
     54                type( copy.type ), idLength( copy.idLength ),
     55                initiator( copy.initiator ), hidden( copy.hidden ) {
     56}
     57
     58SpoVNetProperties::~SpoVNetProperties() {
     59}
     60
     61const Name& SpoVNetProperties::getName() const {
     62        return name;
     63}
     64
     65const SpoVNetID& SpoVNetProperties::getId() const {
     66        return id;
     67}
     68
     69const NodeID& SpoVNetProperties::getInitiator() const {
     70        return initiator;
     71}
     72
     73uint16_t SpoVNetProperties::getIdentifierLength() const {
     74        return idLength;
     75}
     76
     77const SpoVNetProperties::OverlayType SpoVNetProperties::getBaseOverlayType() const {
     78        return (OverlayType)type;
     79}
     80
     81bool SpoVNetProperties::isHidden() const {
     82        return hidden;
     83}
     84
     85std::string SpoVNetProperties::toString() const {
     86        std::ostringstream buf;
     87        buf << "spovnet"
     88                << " name=" << name.toString()
     89                << " id=" << id.toString()
     90                << " overlay_type=" << type
     91                << " id_length=" << idLength
     92                << " initiator=" << initiator
     93                << " hidden=" << hidden;
     94        return buf.str();
     95}
     96
     97} // namespace ariba
Note: See TracChangeset for help on using the changeset viewer.