activemq-cpp-3.9.5
BufferFactory.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _DECAF_INTERNAL_NIO_BUFFERFACTORY_H_
19#define _DECAF_INTERNAL_NIO_BUFFERFACTORY_H_
20
26#include <decaf/nio/IntBuffer.h>
28
30
31namespace decaf{
32namespace internal{
33namespace nio{
34
42 public:
43
44 virtual ~BufferFactory() {}
45
58
83 unsigned char* buffer, int size, int offset, int length );
84
100 static decaf::nio::ByteBuffer* createByteBuffer( std::vector<unsigned char>& buffer );
101
114
138 static decaf::nio::CharBuffer* createCharBuffer( char* buffer, int size, int offset, int length );
139
155 static decaf::nio::CharBuffer* createCharBuffer( std::vector<char>& buffer );
156
169
193 static decaf::nio::DoubleBuffer* createDoubleBuffer( double* buffer, int size, int offset, int length );
194
210 static decaf::nio::DoubleBuffer* createDoubleBuffer( std::vector<double>& buffer );
211
224
248 static decaf::nio::FloatBuffer* createFloatBuffer( float* buffer, int size, int offset, int length );
249
265 static decaf::nio::FloatBuffer* createFloatBuffer( std::vector<float>& buffer );
266
276
300 static decaf::nio::LongBuffer* createLongBuffer( long long* buffer, int size, int offset, int length );
301
317 static decaf::nio::LongBuffer* createLongBuffer( std::vector<long long>& buffer );
318
330 static decaf::nio::IntBuffer* createIntBuffer( int capacity );
331
355 static decaf::nio::IntBuffer* createIntBuffer( int* buffer, int size, int offset, int length );
356
372 static decaf::nio::IntBuffer* createIntBuffer( std::vector<int>& buffer );
373
386
410 static decaf::nio::ShortBuffer* createShortBuffer( short* buffer, int size, int offset, int length );
411
427 static decaf::nio::ShortBuffer* createShortBuffer( std::vector<short>& buffer );
428
429 };
430
431}}}
432
433#endif /*_DECAF_INTERNAL_NIO_BUFFERFACTORY_H_*/
Factory class used by static methods in the decaf::nio package to create the various default version ...
Definition BufferFactory.h:41
static decaf::nio::LongBuffer * createLongBuffer(std::vector< long long > &buffer)
Wraps the passed STL Long Vector in a LongBuffer.
static decaf::nio::LongBuffer * createLongBuffer(long long *buffer, int size, int offset, int length)
Wraps the passed buffer with a new LongBuffer.
static decaf::nio::CharBuffer * createCharBuffer(char *buffer, int size, int offset, int length)
Wraps the passed buffer with a new CharBuffer.
static decaf::nio::CharBuffer * createCharBuffer(std::vector< char > &buffer)
Wraps the passed STL Byte Vector in a CharBuffer.
virtual ~BufferFactory()
Definition BufferFactory.h:44
static decaf::nio::DoubleBuffer * createDoubleBuffer(double *buffer, int size, int offset, int length)
Wraps the passed buffer with a new DoubleBuffer.
static decaf::nio::IntBuffer * createIntBuffer(int *buffer, int size, int offset, int length)
Wraps the passed buffer with a new IntBuffer.
static decaf::nio::FloatBuffer * createFloatBuffer(int capacity)
Allocates a new float buffer whose position will be zero its limit will be its capacity and its mark ...
static decaf::nio::FloatBuffer * createFloatBuffer(float *buffer, int size, int offset, int length)
Wraps the passed buffer with a new FloatBuffer.
static decaf::nio::DoubleBuffer * createDoubleBuffer(int capacity)
Allocates a new double buffer whose position will be zero its limit will be its capacity and its mark...
static decaf::nio::DoubleBuffer * createDoubleBuffer(std::vector< double > &buffer)
Wraps the passed STL Double Vector in a DoubleBuffer.
static decaf::nio::ByteBuffer * createByteBuffer(std::vector< unsigned char > &buffer)
Wraps the passed STL Byte Vector in a ByteBuffer.
static decaf::nio::ByteBuffer * createByteBuffer(unsigned char *buffer, int size, int offset, int length)
Wraps the passed buffer with a new ByteBuffer.
static decaf::nio::ShortBuffer * createShortBuffer(short *buffer, int size, int offset, int length)
Wraps the passed buffer with a new ShortBuffer.
static decaf::nio::CharBuffer * createCharBuffer(int capacity)
Allocates a new char buffer whose position will be zero its limit will be its capacity and its mark i...
static decaf::nio::ShortBuffer * createShortBuffer(int capacity)
Allocates a new short buffer whose position will be zero its limit will be its capacity and its mark ...
static decaf::nio::ByteBuffer * createByteBuffer(int capacity)
Allocates a new byte buffer whose position will be zero its limit will be its capacity and its mark i...
static decaf::nio::ShortBuffer * createShortBuffer(std::vector< short > &buffer)
Wraps the passed STL Short Vector in a ShortBuffer.
static decaf::nio::IntBuffer * createIntBuffer(int capacity)
Allocates a new int buffer whose position will be zero its limit will be its capacity and its mark is...
static decaf::nio::IntBuffer * createIntBuffer(std::vector< int > &buffer)
Wraps the passed STL int Vector in a IntBuffer.
static decaf::nio::FloatBuffer * createFloatBuffer(std::vector< float > &buffer)
Wraps the passed STL Float Vector in a FloatBuffer.
static decaf::nio::LongBuffer * createLongBuffer(int capacity)
Allocates a new long long buffer whose position will be zero its limit will be its capacity and its m...
This class defines six categories of operations upon byte buffers:
Definition ByteBuffer.h:98
This class defines four categories of operations upon character buffers:
Definition CharBuffer.h:68
This class defines four categories of operations upon double buffers:
Definition DoubleBuffer.h:53
This class defines four categories of operations upon float buffers:
Definition FloatBuffer.h:51
This class defines four categories of operations upon int buffers:
Definition IntBuffer.h:51
This class defines four categories of operations upon long long buffers:
Definition LongBuffer.h:51
This class defines four categories of operations upon short buffers:
Definition ShortBuffer.h:51
#define DECAF_API
Definition Config.h:29
Definition BufferFactory.h:33
Definition AprPool.h:26
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25