Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
•OT_Classes/TAddr.h
// TAddr.h - Macintosh OpenTransport network "address family independent" class object |
// |
// Apple Macintosh Developer Technical Support |
// Written by: Vinne Moscaritolo |
// |
// Copyright (work in progress) Apple Computer, Inc All rights reserved. |
// |
// You may incorporate this sample code into your applications without |
// restriction, though the sample code has been provided "AS IS" and the |
// responsibility for its operation is 100% yours. However, what you are |
// not permitted to do is to redistribute the source as "DSC Sample Code" |
// after having made changes. If you're going to re-distribute the source, |
// we require that you make it clear in the source that the code was |
// descended from Apple Sample Code, but that you've made changes. |
// |
#ifndef _H_TAddr |
#define _H_TAddr |
#include <OpenTransport.h> |
#include <iostream.h> |
// |
// TAddr.h - "address family independent" class object |
// |
class TAddr |
{ |
public: |
// CONSTRUCTORS AND DESTRUCTORS |
// HIGH LEVEL FUNCTIONS |
public: |
// ACCESSORS |
virtual size_t GetSize (void) const = 0; |
virtual size_t GetMaxSize (void) const = 0; |
virtual OTAddressType GetType (void) const = 0; |
virtual OTAddress* GetAddr (void) const = 0; |
// Conversion |
virtual void ToNetbuf(TNetbuf* n); |
virtual TAddr* Clone() = 0; |
// CLASS FUNCTIONS |
static TAddr* Factory(OTAddressType); |
static TAddr* Factory(TNetbuf* n); |
// PRIVATE FIELDS |
protected: |
TAddr(){}; |
}; |
#endif |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14