ZeroCopyAllocator_T.cpp

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef ZEROCOPYALLOCATOR_T_CPP
00009 #define ZEROCOPYALLOCATOR_T_CPP
00010 
00011 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00012 # pragma once
00013 #endif /* ACE_LACKS_PRAGMA_ONCE */
00014 
00015 #include "dds/DCPS/ZeroCopyAllocator_T.h"
00016 
00017 #if !defined (__ACE_INLINE__)
00018 #include "dds/DCPS/ZeroCopyAllocator_T.inl"
00019 #endif /* __//ACE_INLINE__ */
00020 
00021 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00022 
00023 namespace OpenDDS {
00024 namespace DCPS {
00025 
00026 //=============================================================
00027 // These methods are no-ops.
00028 //=============================================================
00029 template <class T, std::size_t N>
00030 void *
00031 FirstTimeFastAllocator<T, N>::calloc(size_t nbytes, char initial_value)
00032 {/* no-op */
00033   ACE_UNUSED_ARG(nbytes);
00034   ACE_UNUSED_ARG(initial_value);
00035   return (void*)0;
00036 }
00037 
00038 template <class T, std::size_t N>
00039 void *
00040 FirstTimeFastAllocator<T, N>::calloc(size_t n_elem, size_t elem_size, char initial_value)
00041 {/* no-op */
00042   ACE_UNUSED_ARG(n_elem);
00043   ACE_UNUSED_ARG(elem_size);
00044   ACE_UNUSED_ARG(initial_value);
00045   return (void*)0;
00046 }
00047 
00048 template <class T, std::size_t N>
00049 int
00050 FirstTimeFastAllocator<T, N>::remove()
00051 {/* no-op */
00052   ACE_ERROR((LM_ERROR,
00053              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00054   return -1;
00055 }
00056 
00057 template <class T, std::size_t N>
00058 int
00059 FirstTimeFastAllocator<T, N>::bind(const char *name, void *pointer, int duplicates)
00060 {/* no-op */
00061   ACE_ERROR((LM_ERROR,
00062              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00063   ACE_UNUSED_ARG(name);
00064   ACE_UNUSED_ARG(pointer);
00065   ACE_UNUSED_ARG(duplicates);
00066   return -1;
00067 }
00068 
00069 template <class T, std::size_t N>
00070 int
00071 FirstTimeFastAllocator<T, N>::trybind(const char *name, void *&pointer)
00072 {/* no-op */
00073   ACE_ERROR((LM_ERROR,
00074              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00075   ACE_UNUSED_ARG(name);
00076   ACE_UNUSED_ARG(pointer);
00077   return -1;
00078 }
00079 
00080 template <class T, std::size_t N>
00081 int
00082 FirstTimeFastAllocator<T, N>::find(const char *name, void *&pointer)
00083 {/* no-op */
00084   ACE_ERROR((LM_ERROR,
00085              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00086   ACE_UNUSED_ARG(name);
00087   ACE_UNUSED_ARG(pointer);
00088   return -1;
00089 }
00090 
00091 template <class T, std::size_t N>
00092 int
00093 FirstTimeFastAllocator<T, N>::find(const char *name)
00094 {/* no-op */
00095   ACE_ERROR((LM_ERROR,
00096              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00097   ACE_UNUSED_ARG(name);
00098   return -1;
00099 }
00100 
00101 template <class T, std::size_t N>
00102 int
00103 FirstTimeFastAllocator<T, N>::unbind(const char *name)
00104 {/* no-op */
00105   ACE_ERROR((LM_ERROR,
00106              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00107   ACE_UNUSED_ARG(name);
00108   return -1;
00109 }
00110 
00111 template <class T, std::size_t N>
00112 int
00113 FirstTimeFastAllocator<T, N>::unbind(const char *name, void *&pointer)
00114 {/* no-op */
00115   ACE_ERROR((LM_ERROR,
00116              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00117   ACE_UNUSED_ARG(name);
00118   ACE_UNUSED_ARG(pointer);
00119   return -1;
00120 }
00121 
00122 template <class T, std::size_t N>
00123 int
00124 FirstTimeFastAllocator<T, N>::sync(ssize_t len, int flags)
00125 {/* no-op */
00126   ACE_ERROR((LM_ERROR,
00127              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00128   ACE_UNUSED_ARG(len);
00129   ACE_UNUSED_ARG(flags);
00130   return -1;
00131 }
00132 
00133 template <class T, std::size_t N>
00134 int
00135 FirstTimeFastAllocator<T, N>::sync(void *addr, size_t len, int flags)
00136 {/* no-op */
00137   ACE_ERROR((LM_ERROR,
00138              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00139   ACE_UNUSED_ARG(addr);
00140   ACE_UNUSED_ARG(len);
00141   ACE_UNUSED_ARG(flags);
00142   return -1;
00143 }
00144 
00145 template <class T, std::size_t N>
00146 int
00147 FirstTimeFastAllocator<T, N>::protect(ssize_t len, int prot)
00148 {/* no-op */
00149   ACE_ERROR((LM_ERROR,
00150              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00151   ACE_UNUSED_ARG(len);
00152   ACE_UNUSED_ARG(prot);
00153   return -1;
00154 }
00155 
00156 template <class T, std::size_t N>
00157 int
00158 FirstTimeFastAllocator<T, N>::protect(void *addr, size_t len, int prot)
00159 {/* no-op */
00160   ACE_ERROR((LM_ERROR,
00161              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00162   ACE_UNUSED_ARG(addr);
00163   ACE_UNUSED_ARG(len);
00164   ACE_UNUSED_ARG(prot);
00165   return -1;
00166 }
00167 
00168 #if defined (ACE_HAS_MALLOC_STATS)
00169 
00170 template <class T, std::size_t N>
00171 void
00172 FirstTimeFastAllocator<T, N>::print_stats() const
00173 {/* no-op */
00174   ACE_ERROR((LM_ERROR,
00175              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00176 }
00177 #endif /* ACE_HAS_MALLOC_STATS */
00178 
00179 template <class T, std::size_t N>
00180 void
00181 FirstTimeFastAllocator<T, N>::dump() const
00182 {/* no-op */
00183   ACE_ERROR((LM_ERROR,
00184              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00185 }
00186 
00187 } // namespace DCPS
00188 } // namespace OpenDDS
00189 
00190 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00191 
00192 #endif /* ZEROCOPYALLOCATOR_T_CPP  */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1