Panda3D

bioStreamPtr.h

00001 // Filename: bioStreamPtr.h
00002 // Created by:  drose (15Oct02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef BIOSTREAMPTR_H
00016 #define BIOSTREAMPTR_H
00017 
00018 #include "pandabase.h"
00019 
00020 // This module is not compiled if OpenSSL is not available.
00021 #ifdef HAVE_OPENSSL
00022 #define OPENSSL_NO_KRB5
00023 
00024 #include "bioStream.h"
00025 #include "referenceCount.h"
00026 #include "openssl/ssl.h"
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //       Class : BioStreamPtr
00030 // Description : A wrapper around an BioStream object to make a
00031 //               reference-counting pointer to it.
00032 ////////////////////////////////////////////////////////////////////
00033 class EXPCL_PANDAEXPRESS BioStreamPtr : public ReferenceCount {
00034 public:
00035   INLINE BioStreamPtr(BioStream *stream);
00036   virtual ~BioStreamPtr();
00037 
00038   INLINE BioStream &operator *() const;
00039   INLINE BioStream *operator -> () const;
00040   INLINE operator BioStream * () const;
00041 
00042   INLINE void set_stream(BioStream *stream);
00043   INLINE BioStream *get_stream() const;
00044 
00045 private:
00046   BioStream *_stream;
00047 };
00048 
00049 #include "bioStreamPtr.I"
00050 
00051 #endif  // HAVE_OPENSSL
00052 
00053 
00054 #endif
00055 
00056 
 All Classes Functions Variables Enumerations