PSDL_String.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    PSDL_String.h
00006  *
00007  *  PSDL_String.h,v 1.4 2004/04/24 03:52:23 ossama Exp
00008  *
00009  *  @author Priyanka Gontla <gontla_p@ociweb.com>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_PSDL_STRING_H
00014 #define TAO_PSDL_STRING_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "psdl_export.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "PSDL_Datastore.h"
00024 
00025 /**
00026  * @class TAO_PSDL_String
00027  *
00028  * @brief Wrapper for the ACE_CString to facilitate saving the string
00029  * persistently.
00030  *
00031  *
00032  **/
00033 
00034 class ACE_Allocator;
00035 
00036 class TAO_PSDL_Export TAO_PSDL_String
00037 {
00038 public:
00039 
00040   /// Constructor.
00041   TAO_PSDL_String (void);
00042 
00043   /// Constructor.
00044   TAO_PSDL_String (ACE_Allocator *persistent_allocator);
00045 
00046   /// Copy constructor.
00047   TAO_PSDL_String (const TAO_PSDL_String & rhs);
00048 
00049   /// Destructor.
00050   ~TAO_PSDL_String (void);
00051 
00052   /// Assignment operator.
00053   void operator= (const TAO_PSDL_String & rhs);
00054 
00055   // Conversion operator (assignment)
00056   void operator= (const ACE_CString & rhs);
00057 
00058   /// Equality comparison operator.
00059   bool operator== (const TAO_PSDL_String &rhs) const;
00060 
00061   /// Inequality comparison operator.
00062   bool operator!= (const TAO_PSDL_String &rhs) const;
00063 
00064   /// Returns a hash value for this string.
00065   u_long hash (void) const;
00066 
00067   // Conversion operators (cast)
00068   // (caller owns storage of return values)
00069   operator ACE_CString *() const;
00070 
00071   operator ACE_CString *();
00072 
00073   // Persistent allocator.
00074   ACE_Allocator * allocator_;
00075 
00076   // Persistent buffer.
00077   const char * buffer_;
00078 
00079   // Length of the persistent buffer.
00080   CORBA::ULong length_;
00081 };
00082 
00083 
00084 #include /**/ "ace/post.h"
00085 #endif /* TAO_PSDL_STRING_H */

Generated on Thu Nov 9 14:07:05 2006 for TAO_PSS by doxygen 1.3.6