00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file PSDL_OctetSeq.h 00006 * 00007 * $Id: PSDL_OctetSeq.h 51175 2003-07-21 23:51:40Z dhinton $ 00008 * 00009 * @author Ossama Othman <ossama@uci.edu> 00010 * @author Priyanka Gontla <gontla_p@ociweb.com> 00011 */ 00012 //============================================================================= 00013 00014 00015 #ifndef TAO_PSDL_OCTETSEQ_H 00016 #define TAO_PSDL_OCTETSEQ_H 00017 #include /**/ "ace/pre.h" 00018 00019 #include "psdl_export.h" 00020 #include "tao/OctetSeqC.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include "PSDL_Datastore.h" 00027 00028 /** 00029 * @class TAO_PSDL_OctetSeq 00030 * 00031 * @brief This class facilitates implementation of Persistent 00032 * Service. Helps perform the bind and find to the hash_map and to 00033 * make the data persistent. 00034 **/ 00035 00036 class ACE_Allocator; 00037 00038 class TAO_PSDL_Export TAO_PSDL_OctetSeq 00039 { 00040 public: 00041 00042 /// Constructor. 00043 TAO_PSDL_OctetSeq (void); 00044 00045 /// Constructor. 00046 TAO_PSDL_OctetSeq (ACE_Allocator *persistent_allocator); 00047 00048 /// Copy constructor. 00049 TAO_PSDL_OctetSeq (const TAO_PSDL_OctetSeq & rhs); 00050 00051 /// Destructor. 00052 ~TAO_PSDL_OctetSeq (void); 00053 00054 /// Assignment operator. 00055 void operator= (const TAO_PSDL_OctetSeq & rhs); 00056 00057 // Conversion operator (assignment) 00058 void operator= (const CORBA::OctetSeq & rhs); 00059 00060 // Conversion operators (cast) 00061 // (caller owns storage of return values) 00062 operator CORBA::OctetSeq *() const; 00063 00064 operator CORBA::OctetSeq *(); 00065 00066 // Persistent allocator. 00067 ACE_Allocator * allocator_; 00068 00069 // Persistent buffer. 00070 CORBA::Octet * buffer_; 00071 00072 // Length of the persistent buffer. 00073 CORBA::ULong length_; 00074 }; 00075 00076 00077 #include /**/ "ace/post.h" 00078 #endif /* TAO_PSDL_OCTETSEQ_H */