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 namespace OpenDDS {
00022 namespace DCPS {
00023 
00024 //=============================================================
00025 // These methods are no-ops.
00026 //=============================================================
00027 template <class T, std::size_t N>
00028 void *
00029 FirstTimeFastAllocator<T, N>::calloc(size_t nbytes, char initial_value)
00030 {/* no-op */
00031   ACE_UNUSED_ARG(nbytes);
00032   ACE_UNUSED_ARG(initial_value);
00033   return (void*)0;
00034 }
00035 
00036 template <class T, std::size_t N>
00037 void *
00038 FirstTimeFastAllocator<T, N>::calloc(size_t n_elem, size_t elem_size, char initial_value)
00039 {/* no-op */
00040   ACE_UNUSED_ARG(n_elem);
00041   ACE_UNUSED_ARG(elem_size);
00042   ACE_UNUSED_ARG(initial_value);
00043   return (void*)0;
00044 }
00045 
00046 template <class T, std::size_t N>
00047 int
00048 FirstTimeFastAllocator<T, N>::remove()
00049 {/* no-op */
00050   ACE_ERROR((LM_ERROR,
00051              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00052   return -1;
00053 }
00054 
00055 template <class T, std::size_t N>
00056 int
00057 FirstTimeFastAllocator<T, N>::bind(const char *name, void *pointer, int duplicates)
00058 {/* no-op */
00059   ACE_ERROR((LM_ERROR,
00060              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00061   ACE_UNUSED_ARG(name);
00062   ACE_UNUSED_ARG(pointer);
00063   ACE_UNUSED_ARG(duplicates);
00064   return -1;
00065 }
00066 
00067 template <class T, std::size_t N>
00068 int
00069 FirstTimeFastAllocator<T, N>::trybind(const char *name, void *&pointer)
00070 {/* no-op */
00071   ACE_ERROR((LM_ERROR,
00072              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00073   ACE_UNUSED_ARG(name);
00074   ACE_UNUSED_ARG(pointer);
00075   return -1;
00076 }
00077 
00078 template <class T, std::size_t N>
00079 int
00080 FirstTimeFastAllocator<T, N>::find(const char *name, void *&pointer)
00081 {/* no-op */
00082   ACE_ERROR((LM_ERROR,
00083              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00084   ACE_UNUSED_ARG(name);
00085   ACE_UNUSED_ARG(pointer);
00086   return -1;
00087 }
00088 
00089 template <class T, std::size_t N>
00090 int
00091 FirstTimeFastAllocator<T, N>::find(const char *name)
00092 {/* no-op */
00093   ACE_ERROR((LM_ERROR,
00094              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00095   ACE_UNUSED_ARG(name);
00096   return -1;
00097 }
00098 
00099 template <class T, std::size_t N>
00100 int
00101 FirstTimeFastAllocator<T, N>::unbind(const char *name)
00102 {/* no-op */
00103   ACE_ERROR((LM_ERROR,
00104              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00105   ACE_UNUSED_ARG(name);
00106   return -1;
00107 }
00108 
00109 template <class T, std::size_t N>
00110 int
00111 FirstTimeFastAllocator<T, N>::unbind(const char *name, void *&pointer)
00112 {/* no-op */
00113   ACE_ERROR((LM_ERROR,
00114              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00115   ACE_UNUSED_ARG(name);
00116   ACE_UNUSED_ARG(pointer);
00117   return -1;
00118 }
00119 
00120 template <class T, std::size_t N>
00121 int
00122 FirstTimeFastAllocator<T, N>::sync(ssize_t len, int flags)
00123 {/* no-op */
00124   ACE_ERROR((LM_ERROR,
00125              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00126   ACE_UNUSED_ARG(len);
00127   ACE_UNUSED_ARG(flags);
00128   return -1;
00129 }
00130 
00131 template <class T, std::size_t N>
00132 int
00133 FirstTimeFastAllocator<T, N>::sync(void *addr, size_t len, int flags)
00134 {/* no-op */
00135   ACE_ERROR((LM_ERROR,
00136              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00137   ACE_UNUSED_ARG(addr);
00138   ACE_UNUSED_ARG(len);
00139   ACE_UNUSED_ARG(flags);
00140   return -1;
00141 }
00142 
00143 template <class T, std::size_t N>
00144 int
00145 FirstTimeFastAllocator<T, N>::protect(ssize_t len, int prot)
00146 {/* no-op */
00147   ACE_ERROR((LM_ERROR,
00148              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00149   ACE_UNUSED_ARG(len);
00150   ACE_UNUSED_ARG(prot);
00151   return -1;
00152 }
00153 
00154 template <class T, std::size_t N>
00155 int
00156 FirstTimeFastAllocator<T, N>::protect(void *addr, size_t len, int prot)
00157 {/* no-op */
00158   ACE_ERROR((LM_ERROR,
00159              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00160   ACE_UNUSED_ARG(addr);
00161   ACE_UNUSED_ARG(len);
00162   ACE_UNUSED_ARG(prot);
00163   return -1;
00164 }
00165 
00166 #if defined (ACE_HAS_MALLOC_STATS)
00167 
00168 template <class T, std::size_t N>
00169 void
00170 FirstTimeFastAllocator<T, N>::print_stats() const
00171 {/* no-op */
00172   ACE_ERROR((LM_ERROR,
00173              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00174 }
00175 #endif /* ACE_HAS_MALLOC_STATS */
00176 
00177 template <class T, std::size_t N>
00178 void
00179 FirstTimeFastAllocator<T, N>::dump() const
00180 {/* no-op */
00181   ACE_ERROR((LM_ERROR,
00182              ACE_TEXT("(%P|%t) %T not supported %a\n"))) ;
00183 }
00184 
00185 } // namespace DCPS
00186 } // namespace OpenDDS
00187 
00188 #endif /* ZEROCOPYALLOCATOR_T_CPP  */

Generated on Fri Feb 12 20:05:29 2016 for OpenDDS by  doxygen 1.4.7