*
* @since 2.0
*
- * @param[in] value The input @c bool value to initialize the %Boolean instance
+ * @param[in] value The input @c bool value to initialize the %Boolean instance
*/
Boolean(bool value);
*
* @since 2.0
*
- * @param[in] value An instance of the %Boolean class
+ * @param[in] value An instance of the %Boolean class
*/
Boolean(const Boolean& value);
/**
* Initializes this instance of %Boolean with the specified input string. @n
- * If the input is "true" (ignoring case), the object is initialized to @c true,
+ * If the input is "true" (ignoring case), the object is initialized to @c true,
* else @c false.
*
* @since 2.0
*
- * @param[in] value An instance of String
+ * @param[in] value An instance of String
*/
Boolean(const String& value);
* @since 2.0
*
* @return @c true if the values of the objects are equal, @n
- * else @c false.
+ * else @c false.
* @param[in] rhs An instance of %Boolean to compare with the current instance
*/
bool operator ==(const Boolean& rhs) const;
* @since 2.0
*
* @return @c true if the values of the objects are not equal, @n
- * else @c false
+ * else @c false
* @param[in] rhs An instance of %Boolean to compare with the current instance
*/
bool operator !=(const Boolean& rhs) const;
* @since 2.0
*
* @return @c true if the value of @c obj matches the value of the calling %Boolean instance, @n
- * else @c false
+ * else @c false
* @param[in] obj A reference to the Object instance to compare with the calling %Boolean instance
* @see Tizen::Base::Object::Equals()
*/
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The two Tizen::Base::Object::Equals() instances must return the same hash value. For better performance, @n
- * the used hash function must generate a random distribution for all inputs.
+ * @remarks The two Tizen::Base::Object::Equals() instances must return the same hash value. For better performance, @n
+ * the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
* @since 2.0
*
* @return @c true if the parameter matches the calling %Boolean instance, @n
- * else @c false
+ * else @c false
* @param[in] value The @c bool value to compare to this instance
*/
bool Equals(bool value) const;
* @since 2.0
*
* @return @c true if the value of the specified string is "true", @n
- * else @c false
+ * else @c false
* @param[in] s An instance of String
* @remarks This method is case sensitive. @n
* It only accepts lowercase strings.
* @since 2.0
*
* @return @c true if the value of the specified string is "true", @n
- * else @c false
- * @param[in] s An instance of String
+ * else @c false
+ * @param[in] s An instance of String
* @param[in] caseSensitive Set to @c true to perform a
* case sensitive comparison of string @c s
* @remarks If @c caseSensitive is @c true, L"True" returns @c false, else @c true.
* @since 2.0
*
* @return @c true if this instance is @c true, @n
- * else @c false
+ * else @c false
*/
String ToString(void) const;
* @since 2.0
*
* @return @c true if the parameter is @c true, @n
- * else @c false
+ * else @c false
* @param[in] value A @c bool value to convert to String
*/
static String ToString(bool value);
private:
friend class _BooleanImpl;
- class _BooleanImpl * __pBooleanImpl;
+ class _BooleanImpl* __pBooleanImpl;
}; // Boolean
*
* This header file contains the declarations of the %Buffer classes.
*/
-
#ifndef _FBASE_BUFFER_H_
#define _FBASE_BUFFER_H_
* The following example demonstrates how to use the %Buffer class.
*
* @code
- *
+ *
* #include <FBase.h>
*
* using namespace Tizen::Base;
- *
+ *
* void
* MyClass::BufferSample(void)
* {
* intBuf.Construct(BUFFER_SIZE_MAX);
*
* int intArray[] = {0,1,2,3,4,5,6,7,8,9};
- *
+ *
* // Copies all values from intArray to intBuffer instance
* // position = 10 (num of element copied)
* intBuf.SetArray(intArray, 0, (sizeof(intArray) / sizeof(int)));
* // Flips the buffer: The limit is set to the current position and
* // then the position is set to zero
* intBuf.Flip(); // position = 0, limit = 10
- *
+ *
* // Gets the number of elements between the current position and the limit
* int remaining = intBuf.GetRemaining();
- *
+ *
* // Initializes a doubleBuf with capacity(10) using Construct() method
* DoubleBuffer doubleBuf;
* doubleBuf.Construct(remaining);
- *
+ *
* // Reads and writes elements from the intBuf to the doubleBuf
* for (int i = 0; i < remaining; i++)
* {
* int value;
*
* // Demonstrates relative reading and writing
- *
+ *
* // Reads the value at the current position, and then increments the position
* intBuf.Get(value);
- *
+ *
* // Writes the value * 12.34 at the current position of the doubleBuf
* // and then increment the position
* doubleBuf.Set(value * 12.34);
- *
+ *
* // Now, positions of the intBuf and the doubleBuf have been incremented by one
* }
- *
+ *
* // Flips the doubleBuf
* doubleBuf.Flip();
* // Now, the doubleBuf's position = 0 and limit = 10
- *
+ *
* // Gets the remaining elements of the doubleBuf
* remaining = doubleBuf.GetRemaining();
- *
+ *
* // Gets the second double value with index
* double doubleValue;
* doubleBuf.Get(1, doubleValue); // 12.34
* }
- *
+ *
* @endcode
*/
-template<class Type>
+template< class Type >
class _OSP_EXPORT_ Buffer
: public BufferBase
{
*
* @since 2.0
*
- * @param[in] buffer The other %Buffer instance
+ * @param[in] buffer The other %Buffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid, or
* the source buffer is not constructed.
* @see Buffer()
*/
- result Construct(const Buffer <Type>& buffer)
+ result Construct(const Buffer< Type >& buffer)
{
TryReturn(null != buffer._pData, E_INVALID_ARG, ("[E_INVALID_ARG] The source buffer is not constructed."));
* @since 2.0
*
* @return An error code
- * @param[in] capacity The number of elements
+ * @param[in] capacity The number of elements
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c capacity is negative.
* @see Buffer()
*
* @since 2.0
*
- * @return An error code
- * @param[in] pBuffer The buffer which is shared
- * @param[in] index The starting index of the buffer from where the first @c byte value is read
- * @param[in] length The number of bytes to read from the given buffer @n This is a limit of this instance.
- * @param[in] capacity The capacity of this instance
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the @c pBuffer is @c null.
- * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
- * the @c index is larger than the @c length.
+ * @return An error code
+ * @param[in] pBuffer The buffer which is shared
+ * @param[in] index The starting index of the buffer from where the first @c byte value is read
+ * @param[in] length The number of bytes to read from the given buffer @n This is a limit of this instance.
+ * @param[in] capacity The capacity of this instance
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid, or
+ * the @c pBuffer is @c null.
+ * @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
+ * the @c index is larger than the @c length.
*/
result Construct(const Type* pBuffer, int index, int length, int capacity)
{
TryReturn(pBuffer != null, E_INVALID_ARG, "[E_INVALID_ARG] The pBuffer is null.");
- TryReturn(index >= 0 && length >= 0 && capacity >=0, E_OUT_OF_RANGE,
+ TryReturn(index >= 0 && length >= 0 && capacity >= 0, E_OUT_OF_RANGE,
"[E_OUT_OF_RANGE] index(%d), length(%d) and capacity(%d) MUST be greater than or equal to 0.", index,
length, capacity);
TryReturn(index < capacity && length <= capacity && index + length <= capacity, E_OUT_OF_RANGE,
void* pTemp = null;
int sizeofBufferData = sizeof(_BufferData);
- Type* tempByte = const_cast <Type *> (pBuffer + index);
- __pArrayStart = reinterpret_cast <byte *> (tempByte);
+ Type* tempByte = const_cast< Type* >(pBuffer + index);
+ __pArrayStart = reinterpret_cast< byte* >(tempByte);
pTemp = malloc(sizeofBufferData);
TryReturn(pTemp != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
memset(pTemp, 0, sizeofBufferData);
- _pData = static_cast <_BufferData*>(pTemp);
+ _pData = static_cast< _BufferData* >(pTemp);
_pData->refCount = 1;
_pData->capacityInByte = capacity * sizeof(Type);
*
* @return A reference to the indexed element
* @param[in] index The index of the element @n
- * It must be less than the limit.
+ * It must be less than the limit.
*/
Type& operator [](int index) const
{
* @since 2.0
*
* @return @c true if the buffers being compared are equal, @n
- * else @c false
+ * else @c false
* @param[in] buffer The buffer to compare with the current instance of %Buffer
- * @remarks This method returns @c true only if the two buffers have the same number of remaining elements @n
+ * @remarks This method returns @c true only if the two buffers have the same number of remaining elements @n
* and the two sequences of remaining elements are equal (considered independently of their starting positions).
- * @see Equals()
+ * @see Equals()
*/
- bool operator ==(const Buffer <Type>& buffer) const
+ bool operator ==(const Buffer< Type >& buffer) const
{
bool r = true;
if (this == (void*) (&buffer))
* @since 2.0
*
* @return @c true if the buffers are not equal, @n
- * else @c false
+ * else @c false
* @param[in] buffer The buffer to compare with the current instance of %Buffer
- * @remarks This method returns @c false only if the two buffers being compared have the same @n
+ * @remarks This method returns @c false only if the two buffers being compared have the same @n
* number of remaining elements and the two sequences of remaining elements are equal @n
* (considered independently of their starting positions).
- * @see Equals()
+ * @see Equals()
*/
- bool operator !=(const Buffer <Type>& buffer) const
+ bool operator !=(const Buffer< Type >& buffer) const
{
return !(*this == buffer);
}
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow. @n
* The number of remaining bytes of the current buffer is less than
* the number of remaining bytes of the given buffer.
- * @remarks After the copy operation, the current (destination) buffer's position and the given
+ * @remarks After the copy operation, the current (destination) buffer's position and the given
* (source) buffer's position are incremented by the number of elements copied (the number
* of remaining elements of the given buffer). @n
* If the remaining part of the current instance is not less than the remaining part of the input instance,
* }
* @endcode
*/
- result CopyFrom(Buffer<Type>& buffer)
+ result CopyFrom(Buffer< Type >& buffer)
{
- TryReturn(this != static_cast <void*>(&buffer), E_INVALID_ARG,
+ TryReturn(this != static_cast< void* >(&buffer), E_INVALID_ARG,
"[E_INVALID_ARG] The source and target buffers are identical.");
int copyLength = buffer.GetRemaining();
TryReturn(GetRemaining() >= copyLength, E_OVERFLOW, "[E_OVERFLOW]");
memcpy(__pArrayStart + _position * sizeof(Type), buffer.__pArrayStart + buffer._position * sizeof(Type),
- copyLength * sizeof(Type));
+ copyLength * sizeof(Type));
_position += copyLength;
buffer._position += copyLength;
* @since 2.0
*
* @return An error code
- * @param[out] value The value at the current position
+ * @param[out] value The value at the current position
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow. @n
- * The current position is greater than the limit.
- * @see Set()
+ * The current position is greater than the limit.
+ * @see Set()
*/
result Get(Type& value)
{
*
* @return An error code
* @param[in] index The index into the buffer from where the value is read
- * @param[out] value The value at the given index
+ * @param[out] value The value at the given index
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure. @n
- * The @c index is greater than the limit or less than @c 0.
- * @see Set()
+ * The @c index is greater than the limit or less than @c 0.
+ * @see Set()
*/
result Get(int index, Type& value) const
{
* the @c index or length is less than @c 0.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow. @n
* The remaining elements of this buffer are smaller than @c length.
- * @remarks After the copy operation, the position is incremented by @c length.
+ * @remarks After the copy operation, the position is incremented by @c length.
* @see SetArray()
*/
result GetArray(Type* pArray, int index, int length)
* @return An error code
* @param[in] buffer The source buffer from where the bytes are read @n
* It must not be this buffer.
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid. @n
* The given buffer is same as the current buffer instance.
- * @remarks After the copy operation, the current (destination) buffer's position and the given
+ * @remarks After the copy operation, the current (destination) buffer's position and the given
* (source) buffer's position are incremented by the number of elements copied (the smaller value
* between the number of elements remaining in the calling buffer and the source buffer). @n
* If there are more elements remaining in the calling buffer than elements remaining in the input instance,
* }
* @endcode
*/
- result ReadFrom(Buffer<Type>& buffer)
+ result ReadFrom(Buffer< Type >& buffer)
{
- TryReturn(this != static_cast <void*>(&buffer), E_INVALID_ARG,
+ TryReturn(this != static_cast< void* >(&buffer), E_INVALID_ARG,
"[E_INVALID_ARG] The source and target buffers are identical.");
int copyLength = (GetRemaining() < buffer.GetRemaining()) ? GetRemaining() : buffer.GetRemaining();
memcpy(__pArrayStart + _position * sizeof(Type), buffer.__pArrayStart + buffer._position * sizeof(Type),
- copyLength * sizeof(Type));
+ copyLength * sizeof(Type));
_position += copyLength;
buffer._position += copyLength;
* and then increments the position. @n
* Provides a way for relative indexing and writing.
*
- * @since 2.0
+ * @since 2.0
*
* @return An error code
* @param[in] value The value to write to the calling %Buffer
* @return An error code
* @param[in] index The index at which the value is written
* @param[in] value The value to write
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is not smaller than the limit or less than @c 0.
* @see Get()
* the @c index or length is less than @c 0.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow. @n
* The remainder of this buffer is smaller than @c length.
- * @remarks This method copies @c length number of values from the source array,
+ * @remarks This method copies @c length number of values from the source array,
* starting from the given @c index in the array, into the calling
* buffer, starting at the current position.
* After the copy operation, the position is incremented by @c length.
* @since 2.0
*
* @return A pointer to the new buffer
- * @remarks The content of the new buffer starts at the current position of this instance of %Buffer.
+ * @remarks The content of the new buffer starts at the current position of this instance of %Buffer.
* The new buffer's position is @c 0, its capacity and limit is
* the number of bytes remaining in the current instance of %Buffer,
* and it is marked as undefined.
*/
- Buffer <Type>* SliceN(void) const
+ Buffer< Type >* SliceN(void) const
{
- Buffer <Type>* pBuffer = new Buffer <Type>();
+ Buffer< Type >* pBuffer = new Buffer< Type >();
pBuffer->_pData = _pData;
AddRef();
pBuffer->_capacity = GetRemaining();
* @return @c true if the input equals the calling %Buffer instance, @n
* else @c false
* @param[in] obj The object to compare with the calling %Buffer
- * @remarks This method returns @c true if and only if the specified object is also an instance of %Buffer class,
+ * @remarks This method returns @c true if and only if the specified object is also an instance of %Buffer class,
* the two buffers have the same number of remaining elements, and the two sequences of
* remaining elements are equal (considered independently of their starting positions).
* @see Tizen::Base::BufferBase::GetHashCode()
virtual bool Equals(const Tizen::Base::Object& obj) const
{
bool out = false;
- const Buffer <Type>* other = static_cast <const Buffer <Type>*>(&obj);
+ const Buffer< Type >* other = static_cast< const Buffer< Type >* >(&obj);
if ((other == this) || (*other == *this))
{
out = true;
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The hash code of a buffer depends only upon its remaining elements.
+ * @remarks The hash code of a buffer depends only upon its remaining elements.
*/
virtual int GetHashCode(void) const
{
int offset = _position * GetTypeSize();
for (int i = 0; i < len; ++i)
{
- hash = (hash<<5) - hash + (int) __pArrayStart[offset + (i * sizeof(int))];
+ hash = (hash << 5) - hash + (int) __pArrayStart[offset + (i * sizeof(int))];
}
return hash;
/**
* This is the copy constructor for this class.
*/
- Buffer(const Buffer <Type>& buffer)
+ Buffer(const Buffer< Type >& buffer)
{
Construct(buffer);
}
/**
* This is the assignment operator.
*/
- Buffer <Type>& operator =(const Buffer <Type>& buffer);
+ Buffer< Type >& operator =(const Buffer< Type >& buffer);
/**
* Returns the size of the type of this buffer.
* The @c double buffer type
* @since 2.0
*/
-typedef Buffer <double> DoubleBuffer;
+typedef Buffer< double > DoubleBuffer;
/**
* The @c float buffer type
* @since 2.0
*/
-typedef Buffer <float> FloatBuffer;
+typedef Buffer< float > FloatBuffer;
/**
* The @c int buffer type
* @since 2.0
*/
-typedef Buffer <int> IntBuffer;
+typedef Buffer< int > IntBuffer;
/**
* The @c long buffer type
* @since 2.0
*/
-typedef Buffer <long> LongBuffer;
+typedef Buffer< long > LongBuffer;
/**
* The @c long @c long buffer type
* @since 2.0
*/
-typedef Buffer <long long> LongLongBuffer;
+typedef Buffer< long long > LongLongBuffer;
/**
* The @c wchar_t buffer type
* @since 2.0
*/
-typedef Buffer <wchar_t> WcharBuffer;
+typedef Buffer< wchar_t > WcharBuffer;
/**
* The @c short buffer type
* @since 2.0
*/
-typedef Buffer <short> ShortBuffer;
+typedef Buffer< short > ShortBuffer;
#ifdef _MSC_VER
-template class _OSP_EXPORT_ Buffer <double>;
-template class _OSP_EXPORT_ Buffer <float>;
-template class _OSP_EXPORT_ Buffer <int>;
-template class _OSP_EXPORT_ Buffer <long>;
-template class _OSP_EXPORT_ Buffer <long long>;
-template class _OSP_EXPORT_ Buffer <wchar_t>;
-template class _OSP_EXPORT_ Buffer <short>;
+template class _OSP_EXPORT_ Buffer< double >;
+template class _OSP_EXPORT_ Buffer< float >;
+template class _OSP_EXPORT_ Buffer< int >;
+template class _OSP_EXPORT_ Buffer< long >;
+template class _OSP_EXPORT_ Buffer< long long >;
+template class _OSP_EXPORT_ Buffer< wchar_t >;
+template class _OSP_EXPORT_ Buffer< short >;
#endif
}} // Tizen::Base
*
* This header file contains the declarations of the %BufferBase class.
*/
-
#ifndef _FBASE_BUFFER_BASE_H_
#define _FBASE_BUFFER_BASE_H_
*
* @since 2.0
*
- * @remarks After copying, the position is set to the number of elements copied rather than to @c 0,
+ * @remarks After copying, the position is set to the number of elements copied rather than to @c 0,
* so that an invocation of this method can be followed immediately by an invocation
* of another relative set method. The limit is set to the capacity, and the mark is discarded.
*/
*
* @param[in] to The value to set the buffer position @n
* The parameter may contain @c POSITION_TO_ZERO or @c POSITION_TO_MARK.
- * @remarks If @c to is POSITION_TO_ZERO (or unspecified), the position is set to @c 0 after setting a limit to
+ * @remarks If @c to is POSITION_TO_ZERO (or unspecified), the position is set to @c 0 after setting a limit to
* the current position, and the mark is discarded.
* Otherwise, if @c to is POSITION_TO_MARK, the position is set to the mark and
* the mark is not discarded. If the mark is undefined, the position is set to @c 0.
* @since 2.0
*
* @return The hash value of the calling object
- * @remarks The hash code of a buffer depends only upon its remaining elements.
+ * @remarks The hash code of a buffer depends only upon its remaining elements.
* @see Tizen::Base::Object::Equals()
*/
virtual int GetHashCode(void) const;
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The mark has not been set.
- * @remarks Invoking this method neither changes nor discards the mark's value.
+ * @remarks Invoking this method neither changes nor discards the mark's value.
*/
result Reset(void);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
* The @c amount is larger than the capacity or smaller than @c 0 starting from the current limit.
- * @remarks If the position is larger than the new limit, it is set to the new limit.
+ * @remarks If the position is larger than the new limit, it is set to the new limit.
* If the mark is defined and larger than the new limit, it is discarded.
* @see SetLimit()
*/
*
* @since 2.0
*
- * @return The limit of the calling object
+ * @return The limit of the calling object
* @see SetLimit()
*/
int GetLimit(void) const;
*
* @since 2.0
*
- * @return The mark of the calling %BufferBase instance
+ * @return The mark of the calling %BufferBase instance
* @see SetMark()
*/
int GetMark(void) const;
*
* @since 2.0
*
- * @return The current position of the calling %BufferBase instance
+ * @return The current position of the calling %BufferBase instance
* @see SetPosition()
*/
int GetPosition(void) const;
*
* @since 2.0
*
- * @return The number of elements between the current position and the limit
+ * @return The number of elements between the current position and the limit
* @see HasRemaining()
*/
int GetRemaining(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] limit The new limit
+ * @param[in] limit The new limit
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
+ * @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
* The @c limit is larger than the capacity or less than @c 0.
- * @remarks If the position is larger than the new limit, it is set to the new limit.
+ * @remarks If the position is larger than the new limit, it is set to the new limit.
* If the mark is defined and larger than the new limit, it is discarded.
* @see GetLimit()
*/
* @since 2.0
*
* @return An error code
- * @param[in] position The new position
+ * @param[in] position The new position
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
+ * @exception E_OUT_OF_RANGE The value of an argument is outside the valid range defined by the method. @n
* The @c position is larger than the current limit or less than @c 0.
- * @remarks If the mark is defined and larger than the new position then it is discarded.
+ * @remarks If the mark is defined and larger than the new position then it is discarded.
* @see GetPosition()
*/
result SetPosition(int position);
* @since 2.0
*
* @return @c true if there is at least one element between the current position and the limit of the current instance of %BufferBase, @n
- * else @c false
- * @see GetRemaining()
+ * else @c false
+ * @see GetRemaining()
*/
bool HasRemaining(void) const;
*
* @return An error code
* @param[in] newCapacity The new capacity of this instance
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified @c capacity is less than the current capacity.
- * @remarks After calling this method, the address of the internal buffer may be either the same or a new location.
+ * @remarks After calling this method, the address of the internal buffer may be either the same or a new location.
*/
result ExpandCapacity(int newCapacity);
* @since 2.0
*
* @return An error code
- * @param[in] capacity The number of elements
+ * @param[in] capacity The number of elements
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid. @n
- * The @c capacity is negative.
+ * The @c capacity is negative.
*/
result Construct(int capacity);
BufferBase& operator =(const BufferBase& rhs);
friend class _BufferBaseImpl;
- class _BufferBaseImpl * __pBufferBaseImpl;
+ class _BufferBaseImpl* __pBufferBaseImpl;
}; // BufferBase
*
* This header file contains the declarations of the %ByteBuffer class.
*/
-
#ifndef _FBASE_BYTE_BUFFER_H_
#define _FBASE_BYTE_BUFFER_H_
*
* // Flips the buf
* buf.Flip();
- * // Now, position = 0 and limit = 5
+ * // Now, position = 0 and limit = 5
*
* // Reads bytes from the buf using "relative access method"
* while (buf.HasRemaining())
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the source buffer is not constructed.
- * @see ByteBuffer()
+ * @see ByteBuffer()
*/
result Construct(const ByteBuffer& buffer);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the specified @c capacity is negative.
- * @see ByteBuffer()
+ * @see ByteBuffer()
*/
result Construct(int capacity);
*
* @since 2.0
*
- * @return An error code
- * @param[in] pBuffer The buffer which is shared
- * @param[in] index The starting index of the buffer from where the first @c byte value is read
- * @param[in] length The number of bytes to read from the given buffer @n This is a limit of this instance.
- * @param[in] capacity The capacity of this instance
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the @c pBuffer is @c null.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
- * the @c index is larger than the @c length.
+ * @return An error code
+ * @param[in] pBuffer The buffer which is shared
+ * @param[in] index The starting index of the buffer from where the first @c byte value is read
+ * @param[in] length The number of bytes to read from the given buffer @n This is a limit of this instance.
+ * @param[in] capacity The capacity of this instance
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG A specified input parameter is invalid, or
+ * the @c pBuffer is @c null.
+ * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
+ * the @c index is larger than the @c length.
*/
- result Construct(const byte *pBuffer, int index, int length, int capacity);
+ result Construct(const byte* pBuffer, int index, int length, int capacity);
/**
* Gets the reference to the byte value at the specified index.
* @return @c true if the input buffer is equal to the calling %ByteBuffer instance, @n
* else @c false
* @param[in] buffer The %ByteBuffer instance to compare with the current instance
- * @remarks This method returns @c true only if the two buffers have the same number of
+ * @remarks This method returns @c true only if the two buffers have the same number of
* remaining elements, and the two sequences of remaining elements are equal
* (considered independently, irrespective of their starting positions).
- * @see Equals()
+ * @see Equals()
*/
bool operator ==(const ByteBuffer& buffer) const;
* @return @c true if the two objects are not the same, @n
* else @c false
* @param[in] buffer The buffer to compare with the current instance
- * @remarks This method returns @c false only if the two buffers being compared have the same
+ * @remarks This method returns @c false only if the two buffers being compared have the same
* number of remaining elements, and the two sequences of remaining elements are equal
* (considered independently, irrespective of their starting positions).
- * @see Equals()
+ * @see Equals()
*/
bool operator !=(const ByteBuffer& buffer) const;
/**
* Creates a new @c double buffer view for the content of the byte buffer.
- *
+ *
* @since 2.0
*
* @return DoubleBuffer A pointer to the current position of the calling object
- * @remarks The content of the view buffer starts at the current position of the calling buffer.
+ * @remarks The content of the view buffer starts at the current position of the calling buffer.
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of this buffer divided by the size of @c double.
* Any change to the byte buffer content is visible in the @c double buffer view, and vice versa.
/**
* Creates a new @c float buffer view for the content of the byte buffer.
*
- * @since 2.0
+ * @since 2.0
*
* @return FloatBuffer A pointer to the current position of the calling buffer
- * @remarks The content of the view buffer starts at the current position of the calling buffer.
+ * @remarks The content of the view buffer starts at the current position of the calling buffer.
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of the calling buffer divided by the size of @c float.
* Any change to the byte buffer content is visible in the @c float buffer view, and vice versa.
/**
* Creates a new @c int buffer view for the content of the byte buffer.
*
- * @since 2.0
+ * @since 2.0
*
* @return IntBuffer A pointer to the current position of the calling buffer
- * @remarks The content of the view buffer starts at the current position of the calling buffer.
+ * @remarks The content of the view buffer starts at the current position of the calling buffer.
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of calling buffer divided by the size of @c int.
* Any change to the byte buffer content is visible in the Int buffer view, and vice versa.
/**
* Creates a new @c long buffer view for the content of the byte buffer.
*
- * @since 2.0
+ * @since 2.0
*
* @return LongBuffer A pointer to the current position of the calling buffer
- * @remarks The content of the view buffer starts at the current position of this buffer.
+ * @remarks The content of the view buffer starts at the current position of this buffer.
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of calling buffer divided by the size of @c long.
* Any change to the byte buffer content is visible in the @c long buffer view, and vice versa.
/**
* Creates a new @c long @c long buffer view for the content of the byte buffer.
*
- * @since 2.0
+ * @since 2.0
*
* @return LongLongBuffer A pointer to the current position of the calling buffer
- * @remarks The content of the view buffer starts at the current position of this buffer.
+ * @remarks The content of the view buffer starts at the current position of this buffer.
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of calling buffer divided by the size of @c long.
* Any change to the byte buffer content is visible in the @c long @c long buffer view, and vice versa.
* @brief <i> [Deprecated] </i>
* @deprecated This method is deprecated as @c mchar type is changed to @c wchar_t type.
* Instead of using this method, use the AsWcharBufferN() method.
- * @since 2.0
+ * @since 2.0
*
* @return McharBuffer A pointer to the current position of the calling buffer
- * @remarks The content of the view buffer starts at the current position of this buffer.
+ * @remarks The content of the view buffer starts at the current position of this buffer.
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of the calling buffer divided by the size of @c long.
* Any change to the byte buffer content is visible in the @c mchar buffer view, and vice versa.
* @since 2.0
*
* @return WcharBuffer pointer to the current position of the calling buffer
- * @remarks The content of the view buffer start at the current position of this buffer. @n
+ * @remarks The content of the view buffer start at the current position of this buffer. @n
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of the calling buffer divided by the size of @c long. @n
* Any changes to the calling buffer's content (that is, the content of %ByteBuffer instance) @n
* @since 2.0
*
* @return ShortBuffer pointer to the current position of the calling buffer
- * @remarks The content of the view buffer starts at the current position of this buffer.
+ * @remarks The content of the view buffer starts at the current position of this buffer.
* The new buffer's position is zero, the mark is undefined, and the capacity and limit
* are equal to the remaining part of calling buffer divided by the size of @c long.
* Any change to the byte buffer content is visible in the @c short buffer view, and vice versa.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow. @n
* The number of remaining bytes of the current buffer is smaller than
* the number of remaining bytes of the input buffer.
- * @remarks After the copy operation, the current (destination) buffer's position and the given
+ * @remarks After the copy operation, the current (destination) buffer's position and the given
* (source) buffer's positions are incremented by the number of bytes copied (the number of
* remaining bytes of the given buffer). @n
* If the remaining part of the current instance is greater than or equal to the remaining part of the input instance,
* The following example has exactly the same effect as the above %CopyFrom() method.
*
* @code
- *
+ *
* int copyNum = srcBuf.GetRemaining();
* for (int i = 0; i < copyNum; i++)
* {
* The @c index or @c length is less than @c 0.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than @c length.
- * @remarks This method copies @c length bytes from the current instance of %ByteBuffer to the given array,
+ * @remarks This method copies @c length bytes from the current instance of %ByteBuffer to the given array,
* starting at the current position and at the given index in the array.
* After the copy operation, the position is incremented by @c length bytes.
* @see SetArray()
* @since 2.0
*
* @return An error code
- * @param[out] value The @c byte value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c byte value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the current position is not smaller than the limit.
*
* @return An error code
* @param[in] index The index of the current %ByteBuffer instance, from which the byte is read
- * @param[out] value The @c byte value at the given @c index
+ * @param[out] value The @c byte value at the given @c index
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is not smaller than the limit or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[out] value The @c double value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c double value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than the size of @c double.
- * @remarks This method reads the next size of @c double number of bytes at the current position,
+ * @remarks This method reads the next size of @c double number of bytes at the current position,
* composing it into a @c double value, and then increments the position by the size of @c double.
* @see SetDouble()
*/
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c double or less than @c 0.
- * @remarks This method reads size of @c double number of bytes at the given index,
+ * @remarks This method reads size of @c double number of bytes at the given index,
* composing them into a @c double value.
* @see SetDouble()
*/
* @since 2.0
*
* @return An error code
- * @param[out] value The @c float value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c float value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than the size of @c float.
- * @remarks This method reads the next size of @c float number of bytes at the current position,
+ * @remarks This method reads the next size of @c float number of bytes at the current position,
* composing it into a @c float value, and then increments the position by the size of @c float.
* @see SetFloat()
*/
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
- * @param[out] value The @c float value at the given index
+ * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
+ * @param[out] value The @c float value at the given index
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c float or less than @c 0.
- * @remarks This method reads the size of @c float number of bytes at the given index,
+ * @remarks This method reads the size of @c float number of bytes at the given index,
* composing it into a @c float value.
* @see SetFloat()
*/
* @since 2.0
*
* @return An error code
- * @param[out] value The @c int value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c int value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than the size of @c int.
- * @remarks This method reads the next size of @c int number of bytes at the current position,
+ * @remarks This method reads the next size of @c int number of bytes at the current position,
* composing them into an @c int value, and then increments the position by the size of @c int.
* @see SetInt()
*/
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
- * @param[out] value The @c int value at the given index
+ * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
+ * @param[out] value The @c int value at the given index
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c int or negative.
- * @remarks This method reads the size of @c int number of bytes at the given index,
+ * @remarks This method reads the size of @c int number of bytes at the given index,
* composing it into an @c int value.
* @see SetInt()
*/
* @since 2.0
*
* @return An error code
- * @param[out] value The @c long value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c long value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than the size of @c long.
- * @remarks This method reads the next size of @c long number of bytes at the current position,
+ * @remarks This method reads the next size of @c long number of bytes at the current position,
* composing it into a @c long value, and then increments the position by the size of @c long.
* @see SetLong()
*/
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
- * @param[out] value The @c long value at the given index
+ * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
+ * @param[out] value The @c long value at the given index
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c long or less than @c 0.
- * @remarks This method reads the size of @c long number of bytes at the given index,
+ * @remarks This method reads the size of @c long number of bytes at the given index,
* composing it into a @c long value.
* @see SetLong()
*/
* @since 2.0
*
* @return An error code
- * @param[out] value The @c long @c long value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c long @c long value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than the size of @c long @c long.
- * @remarks This method reads the next size of @c long @c long number of bytes at the current position,
+ * @remarks This method reads the next size of @c long @c long number of bytes at the current position,
* composing it into a @c long @c long value, and then increments the position by the size of @c long @c long.
* @see SetLongLong()
- */
+ */
result GetLongLong(long long& value);
/**
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
- * @param[out] value The @c long @c long value at the given index
+ * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
+ * @param[out] value The @c long @c long value at the given index
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c long @c long or less than @c 0.
- * @remarks This method reads the size of @c long @c long number of bytes at the given index,
+ * @remarks This method reads the size of @c long @c long number of bytes at the given index,
* composing it into a @c long @c long value.
* @see SetLongLong()
*/
* @since 2.0
*
* @return An error code
- * @param[out] value The @c wchar_t value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c wchar_t value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than the size of @c wchar_t.
- * @remarks This method reads the next size of @c wchar_t number of bytes at the current position,
+ * @remarks This method reads the next size of @c wchar_t number of bytes at the current position,
* composing it into a @c wchar_t value, and then increments the position by the size of @c wchar_t.
* @see SetMchar()
* @endif
*
* @since 2.0
*
- * @return An error code
- * @param[out] value The @c wchar_t value at the current position in the %ByteBuffer instance
- * @exception E_SUCCESS The method is successful.
- * @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
- * the remaining bytes of this buffer are smaller than the size of @c wchar_t.
- * @remarks This method reads the next size of @c wchar_t number of bytes at the current position,
- * composing it into a @c wchar_t value, and then increments the position by the size of @c wchar_t.
+ * @return An error code
+ * @param[out] value The @c wchar_t value at the current position in the %ByteBuffer instance
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
+ * the remaining bytes of this buffer are smaller than the size of @c wchar_t.
+ * @remarks This method reads the next size of @c wchar_t number of bytes at the current position,
+ * composing it into a @c wchar_t value, and then increments the position by the size of @c wchar_t.
* @see SetWchar()
*/
result GetWchar(wchar_t& value);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c wchar_t or less than @c 0.
- * @remarks This method reads the size of @c wchar_t number of bytes at the given index,
+ * @remarks This method reads the size of @c wchar_t number of bytes at the given index,
* composing it into a @c wchar_t value.
* @see SetMchar()
* @endif
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
- * @param[out] value The @c wchar_t value at the given index
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
- * the @c index is larger than the limit minus size of @c wchar_t or less than @c 0.
- * @remarks This method reads the size of @c wchar_t number of bytes at the given index,
- * composing it into a @c wchar_t value.
+ * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
+ * @param[out] value The @c wchar_t value at the given index
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
+ * the @c index is larger than the limit minus size of @c wchar_t or less than @c 0.
+ * @remarks This method reads the size of @c wchar_t number of bytes at the given index,
+ * composing it into a @c wchar_t value.
* @see SetWchar()
*/
result GetWchar(int index, wchar_t& value) const;
* @since 2.0
*
* @return An error code
- * @param[out] value The @c short value at the current position in the %ByteBuffer instance
+ * @param[out] value The @c short value at the current position in the %ByteBuffer instance
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* the remaining bytes of this buffer are smaller than the size of @c short.
- * @remarks This method reads the next size of @c short number of bytes at the current position,
+ * @remarks This method reads the next size of @c short number of bytes at the current position,
* composing it into a @c short value, and then increments the position by the size of @c short.
* @see SetShort()
*/
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
- * @param[out] value The @c short value at the given index
+ * @param[in] index The index of the current %ByteBuffer instance, from which the bytes are read
+ * @param[out] value The @c short value at the given index
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c short or less than @c 0.
- * @remarks This method reads the size of @c short number of bytes at the given index,
+ * @remarks This method reads the size of @c short number of bytes at the given index,
* composing it into a @c short value.
* @see SetShort()
*/
* It must not be the calling %ByteBuffer instance.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
- *
- * @remarks After the copy operation, the current (destination) buffer's position and the given
+ *
+ * @remarks After the copy operation, the current (destination) buffer's position and the given
* (source) buffer's position are incremented by the number of elements copied (the lesser of
* the number of elements remaining in the current buffer and the given buffer). @n
* If the remaining part of the current instance is greater than or equal to the remaining part of the input instance,
* the @c index or length is less than @c 0.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes are smaller than @c length.
- * @remarks This method copies the specified number (@c length) of @c byte values into
+ * @remarks This method copies the specified number (@c length) of @c byte values into
* the calling object of buffer from the source array,
* starting from the current position, and at the given index in the array.
* After the copy operation, the position is incremented by @c length.
* @since 2.0
*
* @return An error code
- * @param[in] value The @c byte value to write to the current instance of %ByteBuffer
+ * @param[in] value The @c byte value to write to the current instance of %ByteBuffer
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the current position is not smaller than the limit.
* @since 2.0
*
* @return An error code
- * @param[in] value The @c double value to write
+ * @param[in] value The @c double value to write
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes of this buffer are smaller than the size of @c double.
- * @remarks This method writes the size of @c double number of bytes containing the given @c double value
+ * @remarks This method writes the size of @c double number of bytes containing the given @c double value
* into the calling buffer, at the current position, and then increments the position by the size of @c double.
* @see GetDouble()
*/
* @since 2.0
*
* @return An error code
- * @param[in] value The @c float value to write
+ * @param[in] value The @c float value to write
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes of this buffer are smaller than the size of @c float.
- * @remarks This method writes the size of @c float number of bytes containing the given @c float value
+ * @remarks This method writes the size of @c float number of bytes containing the given @c float value
* into this buffer at the current position, and then increments the position by the size of @c float.
* @see GetFloat()
*/
* @since 2.0
*
* @return An error code
- * @param[in] value The @c int value to write
+ * @param[in] value The @c int value to write
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes of this buffer are smaller than the size of @c int.
- * @remarks This method writes the size of @c int number of bytes containing the given @c int value
+ * @remarks This method writes the size of @c int number of bytes containing the given @c int value
* into this buffer at the current position, and then increments the position by the size of @c int.
* @see GetInt()
*/
* @since 2.0
*
* @return An error code
- * @param[in] value The @c long value to write
+ * @param[in] value The @c long value to write
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes of this buffer are smaller than size of @c long.
- * @remarks This method writes the size of @c long number of bytes containing the given @c long value
+ * @remarks This method writes the size of @c long number of bytes containing the given @c long value
* into this buffer at the current position, and then increments the position by the size of @c long.
* @see GetLong()
*/
* @since 2.0
*
* @return An error code
- * @param[in] value The @c long @c long value to write
+ * @param[in] value The @c long @c long value to write
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes of this buffer are smaller than the size of @c long @c long.
- * @remarks This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
+ * @remarks This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
* into this buffer at the current position, and then increments the position by the size of @c long @c long.
* @see GetLongLong()
*/
* @since 2.0
*
* @return An error code
- * @param[in] value The @c wchar_t value to write
+ * @param[in] value The @c wchar_t value to write
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes of this buffer are smaller than size of @c wchar_t.
- * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+ * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
* into this buffer at the current position, and then increments the position by the size of @c wchar_t.
* @see GetMchar()
* @endif
* @since 2.0
*
* @return An error code
- * @param[in] value The @c wchar_t value to write
- * @exception E_SUCCESS The method is successful.
- * @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
- * the remaining bytes of this buffer are smaller than size of @c wchar_t.
- * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
- * into this buffer at the current position, and then increments the position by the size of @c wchar_t.
+ * @param[in] value The @c wchar_t value to write
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
+ * the remaining bytes of this buffer are smaller than size of @c wchar_t.
+ * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+ * into this buffer at the current position, and then increments the position by the size of @c wchar_t.
* @see GetWchar()
*/
result SetWchar(wchar_t value);
* @since 2.0
*
* @return An error code
- * @param[in] value The @c short value to write
+ * @param[in] value The @c short value to write
* @exception E_SUCCESS The method is successful.
* @exception E_OVERFLOW The operation (arithmetic/casting/conversion) has caused an overflow, or
* the remaining bytes of this buffer are smaller than the size of @c short.
- * @remarks This method writes the size of @c short number of bytes containing the given @c short value
+ * @remarks This method writes the size of @c short number of bytes containing the given @c short value
* into this buffer at the current position, and then increments the position by the size of @c short.
* @see GetShort()
*/
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus the size of @c double or less than @c 0.
- * @remarks This method writes the size of @c double number of bytes containing the given @c double value
+ * @remarks This method writes the size of @c double number of bytes containing the given @c double value
* into this buffer at the given index.
* @see GetDouble()
*/
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus the size of @c float or less than @c 0.
- * @remarks This method writes the size of @c float number of bytes containing the given @c float value
+ * @remarks This method writes the size of @c float number of bytes containing the given @c float value
* into this buffer at the given index.
* @see GetFloat()
*/
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus size of @c int or less than @c 0.
- * @remarks This method writes the size of @c int number of bytes containing the given @c int value
+ * @remarks This method writes the size of @c int number of bytes containing the given @c int value
* into this buffer at the given index.
* @see GetInt()
*/
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus the size of @c long or less than @c 0.
- * @remarks This method writes size of @c long number of bytes containing the given @c long value
+ * @remarks This method writes size of @c long number of bytes containing the given @c long value
* into this buffer at the given index.
* @see GetLong()
*/
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus the size of @c long @c long or less than @c 0.
- * @remarks This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
+ * @remarks This method writes the size of @c long @c long number of bytes containing the given @c long @c long value
* into this buffer at the given index.
* @see GetLongLong()
*/
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus the size of @c wchar_t or less than @c 0.
- * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+ * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
* into this buffer at the given index.
* @see GetMchar()
* @endif
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the bytes will be written
- * @param[in] value The @c wchar_t value to write
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
- * the @c index is larger than the limit minus the size of @c wchar_t or less than @c 0.
- * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
- * into this buffer at the given index.
+ * @param[in] index The index at which the bytes will be written
+ * @param[in] value The @c wchar_t value to write
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
+ * the @c index is larger than the limit minus the size of @c wchar_t or less than @c 0.
+ * @remarks This method writes the size of @c wchar_t number of bytes containing the given @c wchar_t value
+ * into this buffer at the given index.
* @see GetWchar()
*/
result SetWchar(int index, wchar_t value);
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c index is larger than the limit minus the size of @c short or less than @c 0.
- * @remarks This method writes the size of @c short number of bytes containing the given @c short value
+ * @remarks This method writes the size of @c short number of bytes containing the given @c short value
* into this buffer at the given index.
* @see GetShort()
*/
* @since 2.0
*
* @return %ByteBuffer pointer to the current position of the calling object
- * @remarks The content of the new buffer starts at the current position of the calling %ByteBuffer object.
+ * @remarks The content of the new buffer starts at the current position of the calling %ByteBuffer object.
* The new buffer's position is zero, its capacity and limit are
* the number of bytes remaining of the current instance of %ByteBuffer,
* and its mark is undefined.
* @return @c true if the input object equals the calling %ByteBuffer instance, @n
* else @c false
* @param[in] obj The object instance to compare with the calling object
- * @remarks This method returns @c true only if the specified object is also an instance of
+ * @remarks This method returns @c true only if the specified object is also an instance of
* the %ByteBuffer class, the two buffers have the same number of remaining elements, and the two
* sequences of remaining elements are equal (considered independent of their starting positions).
* @see Tizen::Base::BufferBase::GetHashCode()
* @since 2.0
*
* @return The hash value of the current instance
- * @remarks The hash code of a buffer depends only upon its remaining elements.
+ * @remarks The hash code of a buffer depends only upon its remaining elements.
*/
virtual int GetHashCode(void) const;
* This copy constructor is intentionally declared as private to prohibit copying of objects by users.
*/
ByteBuffer(const ByteBuffer& buffer)
- :__pByteBufferImpl(null)
+ : __pByteBufferImpl(null)
{
Construct(buffer);
}
friend class _ByteBufferImpl;
- class _ByteBufferImpl * __pByteBufferImpl;
+ class _ByteBufferImpl* __pByteBufferImpl;
}; // ByteBuffer
* @li == 0 if the value of the current instance is equal to the value of the input instance
* @li > 0 if the value of the current instance is greater than the value of the input instance
* @endcode
- *
+ *
*/
int CompareTo(const Character& value) const;
* @since 2.0
* @return @c true if the input Object is equal to the calling %Object, @n
* else @c false
- * @param[in] obj The object to compare with the calling object
+ * @param[in] obj The object to compare with the calling object
* @see Tizen::Base::Object::Equals()
*/
virtual bool Equals(const Object& obj) const;
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompCharacterIsAlphaNumericPage "here".
+ * For more information, see @ref CompCharacterIsAlphaNumericPage "here".
* @endif
* @return @c true if the input character is alphanumeric, @n
* else @c false
* @if OSPCOMPAT
* @page CompCharacterIsAlphaNumericPage Compatibility for IsAlphaNumeric()
* @section CompCharacterIsAlphaNumericPageIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
+ * Implementing this method in OSP compatible applications has the following issues: @n
*
* -# The method returns true only if the character is alphabet character and cannot checks other Unicode character in Letter and digit category.
*
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompCharacterIsLetterPage "here".
+ * For more information, see @ref CompCharacterIsLetterPage "here".
* @endif
* @return @c true if the input character is an alphabet, @n
* else @c false
* @if OSPCOMPAT
* @page CompCharacterIsLetterPage Compatibility for IsLetter()
* @section CompCharacterIsLetterPageIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
+ * Implementing this method in OSP compatible applications has the following issues: @n
*
* -# The method returns true only if the character is alphabet character and cannot checks other Unicode character in Letter category.
*
/**
* Returns the value of the input character in the supplied radix. @n
- * The value of radix must be between RADIX_MIN and RADIX_MAX.
+ * The value of radix must be between RADIX_MIN and RADIX_MAX.
*
* @since 2.0
*
/**
* Returns the value which represents the input digit with specified radix. @n
- * The value of radix must be between RADIX_MIN and RADIX_MAX.
+ * The value of radix must be between RADIX_MIN and RADIX_MAX.
*
* @since 2.0
*
/**
* Gets the numeric value of the input unicode character. @n
- * This is used when some numeric values are fractions, negative, or too large for @c int value.
+ * This is used when some numeric values are fractions, negative, or too large for @c int value.
*
* @since 2.0
*
* @since 2.0
*
* @return @c true if the Unicode character is an assigned character, @n
- * else @c false
+ * else @c false
* @param[in] ch A Unicode character
*/
static bool IsDefined(wchar_t ch);
* @since 2.0
*
* @return @c true if the Unicode character is a whitespace character, @n
- * else @c false
+ * else @c false
* @param[in] ch A Unicode character
*
* @code
* @since 2.0
*
* @return @c true if the Unicode character is a title character, @n
- * else @c false
+ * else @c false
* @param[in] ch A Unicode character
*/
static bool IsTitleCase(wchar_t ch);
* @since 2.0
*
* @return @c true if the Unicode character is an ISO control character, @n
- * else @c false
+ * else @c false
* @param[in] ch A Unicode character
*/
static bool IsISOControl(wchar_t ch);
wchar_t __val;
friend class _CharacterImpl;
- class _CharacterImpl * __pCharacterImpl;
+ class _CharacterImpl* __pCharacterImpl;
}; // Character
* This header file contains the declarations and descriptions of the %Collection namespace.
*
*/
-
#ifndef _FBASE_COL_H_
#define _FBASE_COL_H_
*
* The following diagrams illustrate the relationships between the classes belonging to the %Collection namespace.
*
- * @image html base_collection_namespace_obj_based_classdiagram.png
+ * @image html base_collection_namespace_obj_based_classdiagram.png
*
- * @image html base_collection_namespace_template_based_classdiagram.png
+ * @image html base_collection_namespace_template_based_classdiagram.png
*
*
*
*
* This header file contains the declarations of the %AllElementsDeleter struct.
*/
-
#ifndef _FBASE_COL_ALL_ELEMENTS_DELETER_H_
#define _FBASE_COL_ALL_ELEMENTS_DELETER_H_
* @since 2.0
*
* @param[in] c The collection to clean up
- * @remarks The collection should be destructible and support the RemoveAll(bool) method.
- * IList, IMap, and IMultiMap support this concept.
+ * @remarks The collection should be destructible and support the RemoveAll(bool) method.
+ * IList, IMap, and IMultiMap support this concept.
*/
template< typename Collection >
void operator ()(Collection* c)
*
* @return An error code
* @param[in] capacity The number of elements @n
- * The default capacity is @c 10.
+ * The default capacity is @c 10.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the specified @c capacity is negative.
* @since 2.0
*
* @return An error code
- * @param[in] collection A collection to add
+ * @param[in] collection A collection to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[in] pObj An pointer to object to add
+ * @param[in] pObj An pointer to object to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks This method performs a shallow copy. It adds just the pointer; not the element itself.
* @since 2.0
*
* @return An error code
- * @param[in] collection A collection to add
+ * @param[in] collection A collection to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
*
* @since 2.0
*
- * @return An instance of the IBidirectionalEnumerator derived class, @n
- * else @c null if some exception occurs
- * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
- * to iterate over a collection (an instance of the IList derived class).
- * The specific error code can be accessed using GetLastResult() method.
- * @see Tizen::Base::Collection::IBidirectionalEnumerator
+ * @return An instance of the IBidirectionalEnumerator derived class, @n
+ * else @c null if some exception occurs
+ * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
+ * to iterate over a collection (an instance of the IList derived class).
+ * The specific error code can be accessed using GetLastResult() method.
+ * @see Tizen::Base::Collection::IBidirectionalEnumerator
*/
virtual IBidirectionalEnumerator* GetBidirectionalEnumeratorN(void) const;
*
* @return The object at the specified @c index of this list, @n
* else @c null if the index is not valid
- * @param[in] index The index of the object in the calling list to read
+ * @param[in] index The index of the object in the calling list to read
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements or less than @c 0.
* - The specified index is outside the bounds of the data structure. @n
* - The specified @c startIndex is either equal to or greater than the number of elements or less than @c 0. @n
* - The @c count is greater than the number of elements starting from @c startIndex
- * or less than @c 0.
+ * or less than @c 0.
* @remarks The IList stores just the pointers to the elements in the list, not the elements themselves.
* The specific error code can be accessed using the GetLastResult() method.
*/
* @param[out] index The index of the object
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
- * the specified @c startIndex is either equal to or greater than the number of elements or less than @c 0.
- * @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
+ * the specified @c startIndex is either equal to or greater than the number of elements or less than @c 0.
+ * @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
* @see LastIndexOf()
*/
virtual result IndexOf(const Object& obj, int startIndex, int& index) const;
* - The specified index is outside the bounds of the data structure. @n
* - The specified @c startIndex is either equal to or greater than the number of elements or less than @c 0. @n
* - The @c count is greater than the number of elements starting from @c startIndex
- * or less than @c 0.
- * @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
+ * or less than @c 0.
+ * @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
* @see LastIndexOf()
*/
virtual result IndexOf(const Object& obj, int startIndex, int count, int& index) const;
* @since 2.0
*
* @return An error code
- * @param[in] pObj The pointer to object to insert
+ * @param[in] pObj The pointer to object to insert
* @param[in] index The index at which the object must be inserted
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @since 2.0
*
* @return An error code
- * @param[in] obj An object to remove
+ * @param[in] obj An object to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
* @see Add()
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to remove from this list
+ * @param[in] collection The collection to remove from this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[in] pObj An pointer to object to set
- * @param[in] index The index at which the object must be set
+ * @param[in] pObj An pointer to object to set
+ * @param[in] index The index at which the object must be set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* @return An error code
* @param[in] newCapacity The new capacity of this list
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or
- * the @c newCapacity is negative.
+ * @exception E_INVALID_ARG The specified input parameter is invalid, or
+ * the @c newCapacity is negative.
* @remarks When the new capacity is less than the current capacity, the elements
* within the truncated memory are not destroyed.
* @see Construct()
* @since 2.0
*
* @return An error code
- * @param[in] comparer The IComparer implementation to use when comparing elements
+ * @param[in] comparer The IComparer implementation to use when comparing elements
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
* @since 2.0
*
* @return @c true if the list contains all the elements of the specified @c collection, @n
- * else @c false
+ * else @c false
* @param[in] collection The collection to check for in the list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @remarks If the given @c collection is empty, this method will return @c true.
- * @see Contains()
+ * @see Contains()
*/
virtual bool ContainsAll(const ICollection& collection) const;
* Sorts the specified sub-list.
*
* @return An error code
- * @param[in] startIndex The starting point of the sub-list to sort
- * @param[in] endIndex The end point of the sub-list to sort
+ * @param[in] startIndex The starting point of the sub-list to sort
+ * @param[in] endIndex The end point of the sub-list to sort
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the elements.
#include <FBaseColIListT.h>
#include <FBaseColIComparerT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* The default capacity is @c 10.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c capacity is negative.
+ * the specified @c capacity is negative.
* @remarks If the number of elements added to the list reaches its current capacity,
* the capacity is automatically increased by memory reallocation.
* Thus, if the size of the list can be estimated,
* @since 2.0
*
* @return An error code
- * @param[in] collection A collection of elements to add
+ * @param[in] collection A collection of elements to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[in] obj An object to add to the list
+ * @param[in] obj An object to add to the list
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @see Remove()
* @since 2.0
*
* @return An error code
- * @param[in] collection A collection of elements to add to the list
+ * @param[in] collection A collection of elements to add to the list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @return An instance of the IEnumeratorT derived class if successful, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see Tizen::Base::Collection::IEnumeratorT
*/
*
* @since 2.0
*
- * @return An instance of the IBidirectionalEnumeratorT derived class, @n
- * else @c null if an exception occurs
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
- * to iterate over a collection (an instance of the IListT derived class).
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see Tizen::Base::Collection::IBidirectionalEnumeratorT
+ * @return An instance of the IBidirectionalEnumeratorT derived class, @n
+ * else @c null if an exception occurs
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
+ * to iterate over a collection (an instance of the IListT derived class).
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @see Tizen::Base::Collection::IBidirectionalEnumeratorT
*/
virtual IBidirectionalEnumeratorT< Type >* GetBidirectionalEnumeratorN(void) const
{
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the object to read
- * @param[out] obj An object to get from this list
+ * @param[in] index The index of the object to read
+ * @param[out] obj An object to get from this list
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the object to read
- * @param[out] obj An object to get from this list
+ * @param[in] index The index of the object to read
+ * @param[out] obj An object to get from this list
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to remove
+ * @param[in] obj The object to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
* @see Add()
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to remove from this list
+ * @param[in] collection The collection to remove from this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the object that is to remove
+ * @param[in] index The index of the object that is to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is outside the bounds of the data structure, or
* the specified @c index is greater than or equal to the number of elements or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] newCapacity The new capacity to set for the list
+ * @param[in] newCapacity The new capacity to set for the list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the @c newCapacity is negative.
+ * the @c newCapacity is negative.
* @remarks If the new capacity is less than the current capacity, the memory
* is truncated and the elements within the truncated memory are destroyed.
* @see Construct()
* @since 2.0
*
* @return An error code
- * @param[in] comparer A pointer to IComparerT
+ * @param[in] comparer A pointer to IComparerT
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the @c comparer is not valid.
* @since 2.0
*
* @return The current capacity of the list
- * @see SetCapacity()
+ * @see SetCapacity()
*/
int GetCapacity(void) const
{
*
* @return The hash value of the current instance
* @remarks The two Tizen::Base::Object::Equals() instances must return the same hash value. For better performance, @n
- * the used hash function must generate a random distribution for all inputs.
+ * the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const
{
* Sorts a section of a list using a comparer.
*
* @return An error code
- * @param[in] startIndex The start index of the section of the list
- * @param[in] endIndex The end index of the section of the list
+ * @param[in] startIndex The start index of the section of the list
+ * @param[in] endIndex The end index of the section of the list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the elements.
{
TryReturn((__modCount == __list.__modCount), E_INVALID_OPERATION,
"[%s] The source collection is modified after the creation of this enumerator.", GetErrorMessage(E_INVALID_OPERATION));
- TryReturn((__position > -1) && (__position < static_cast <int>(__list.__count)), E_INVALID_OPERATION,
+ TryReturn((__position > -1) && (__position < static_cast< int >(__list.__count)), E_INVALID_OPERATION,
"[%s] Current position(%d) is before the first element or past the last element.", GetErrorMessage(E_INVALID_OPERATION), __position);
obj = __list.__pObjArray[__position];
#include <FBaseComparerT.h>
#include <FBaseFloat.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* @since 2.0
*
* @return An error code
- * @param[in] capacity The initial capacity
- * @param[in] loadFactor The maximum ratio of elements to buckets
+ * @param[in] capacity The initial capacity
+ * @param[in] loadFactor The maximum ratio of elements to buckets
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the @c capacity or the @c loadFactor is negative.
* @return An error code
* @param[in] map The map to copy
* @param[in] loadFactor The maximum ratio of elements to buckets @n
- * If it is @c 0, the default load factor (0.75) is used.
+ * If it is @c 0, the default load factor (0.75) is used.
* @param[in] provider An instance of the IHashCodeProviderT-derived class that supplies the hash codes
* for all keys in this map
* @param[in] comparer An instance of the IComparerT-derived class to use when comparing keys
*
* @return The value associated with the key, @n
* else @c null if an exception occurs
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @param[out] value The value associated with the key
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
*
* @return The value associated with the key, @n
* else @c null if an exception occurs
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @param[out] value The value associated with the key
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* @since 2.0
*
* @return An error code
- * @param[in] key The key to locate
- * @param[out] out Set to @c true if the map contains the specified @c key, @n
+ * @param[in] key The key to locate
+ * @param[out] out Set to @c true if the map contains the specified @c key, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* Copies all the pairs from a specified @c map to this map.
*
* @return An error code
- * @param[in] map The map to copy
+ * @param[in] map The map to copy
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The @c map is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[out] obj The current object
+ * @param[out] obj The current object
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* This enumerator is currently positioned before the first element or
* @since 2.0
*
* @return An error code
- * @param[out] key The current key
+ * @param[out] key The current key
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* This enumerator is currently positioned before the first element or
{
/**
- * @interface IBidirectionalEnumerator
- * @brief This interface supports a bidirectional iteration over a collection.
+ * @interface IBidirectionalEnumerator
+ * @brief This interface supports a bidirectional iteration over a collection.
*
* @since 2.0
*
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The enumerator has passed the front of the collection.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
- * the collection is modified after the enumerator is created.
+ * the collection is modified after the enumerator is created.
* @see Tizen::Base::Collection::IEnumerator::MoveNext()
* @see ResetLast()
*/
{
/**
- * @interface IBidirectionalEnumeratorT
- * @brief This interface supports a bidirectional iteration over a collection.
+ * @interface IBidirectionalEnumeratorT
+ * @brief This interface supports a bidirectional iteration over a collection.
*
* @since 2.0
*
#include <FBaseColIEnumerator.h>
#include <FBaseRtMutex.h>
-
#ifdef ICollection
#undef ICollection
#endif
{
/**
- * @interface ICollection
- * @brief This interface represents a collection of objects. @n
- * It defines the size, enumerators, and the synchronization mechanism of a collection.
+ * @interface ICollection
+ * @brief This interface represents a collection of objects. @n
+ * It defines the size, enumerators, and the synchronization mechanism of a collection.
*
* @since 2.0
*
{
/**
- * @interface ICollectionT
- * @brief This interface represents a template-based collection of objects.
- * It defines the size, and enumerators.
+ * @interface ICollectionT
+ * @brief This interface represents a template-based collection of objects.
+ * It defines the size, and enumerators.
*
* @since 2.0
*
* The %ICollectionT interface represents a template-based collection of objects.
- * It defines the size, and enumerators.
+ * It defines the size, and enumerators.
*/
template< class Type >
class ICollectionT
* @return A pointer to an enumerator interface of the %ICollectionT derived class, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks Use this method to obtain an enumerator (an instance of the IEnumeratorT derived class)
* to iterate over a collection (an instance of the %ICollectionT derived class).
* @remarks The specific error code can be accessed using the GetLastResult() method.
#include <FBaseTypes.h>
#include <FBaseObject.h>
-
namespace Tizen { namespace Base { namespace Collection
{
/**
- * @interface IComparer
- * @brief This interface allows a derived class to compare 2 objects of the same type.
+ * @interface IComparer
+ * @brief This interface allows a derived class to compare 2 objects of the same type.
*
* @since 2.0
*
#include <FBaseTypes.h>
-
namespace Tizen { namespace Base { namespace Collection
{
/**
/**
* @interface IHashCodeProvider
- * @brief This interface represents classes that can provide the hash code of a specific type of object.
+ * @brief This interface represents classes that can provide the hash code of a specific type of object.
*
* @since 2.0
*
//
virtual void IHashCodeProvider_Reserved1(void) { }
-
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
// and consistency-related issues in the application.
{
/**
- * @interface IList
- * @brief This interface represents a collection of objects that can be individually accessed by an index.
+ * @interface IList
+ * @brief This interface represents a collection of objects that can be individually accessed by an index.
*
* @since 2.0
*
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to add
+ * @param[in] obj The object to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks In a collection of contiguous elements, such as a list, the elements
* @since 2.0
*
* @return An error code
- * @param[in] pObj The pointer to object to add
- * @exception E_SUCCESS The method is successful.
+ * @param[in] pObj The pointer to object to add
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks In a collection of contiguous elements, such as a list, the elements
* that follow the insertion point move down to accommodate the new element.
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to add to the list
+ * @param[in] collection The collection to add to the list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
* the @c index is greater than the number of elements in the list or less than @c 0.
* @remarks If the @c index equals the number of elements in the list, the new element
* is added at the end of the list.
- * This method performs a shallow copy. It inserts the pointer only; not the element itself.
+ * This method performs a shallow copy. It inserts the pointer only; not the element itself.
* @see Add(Object*)
* @see RemoveAt()
* @endif
* @since 2.0
*
* @return An error code
- * @param[in] pObj The pointer to object to insert
+ * @param[in] pObj The pointer to object to insert
* @param[in] index The index at which the object must be inserted
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*
* @return The object at the specified location, @n
* else @c null if the @c index is not valid
- * @param[in] index The index of the object to get
+ * @param[in] index The index of the object to get
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
* - The @c count is greater than the number of elements in the list starting from @c startIndex
* or less than @c 0.
* @remarks The %IList stores just the pointers to the elements in the list, not the elements themselves.
- * The specific error code can be accessed using the GetLastResult() method.
+ * The specific error code can be accessed using the GetLastResult() method.
*/
virtual IList* GetItemsN(int startIndex, int count) const = 0;
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to remove
+ * @param[in] obj The object to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
* @see Add(Object*)
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @param[in] forceDeletion Set to @c true to deallocate the object, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
* - The specified @c startIndex is either equal to or greater than the number of elements in the list or less than @c 0. @n
* - The @c count is greater than the number of elements starting from @c startIndex
* or less than @c 0.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
*
* @return An error code
* @param[in] forceDeletion Set to @c true to deallocate all the objects, @n
- * else @c false
- * @remarks
+ * else @c false
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the set operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the set method. @n
* If both an element deleter and forceDeleteion are set, the set operation follows @c forceDeletion setting.
* @since 2.0
*
* @return An error code
- * @param[in] comparer The IComparer implementation to use when comparing elements
+ * @param[in] comparer The IComparer implementation to use when comparing elements
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
*
* @return @c true if the list contains all the elements of the specified collection, @n
* else @c false
- * @param[in] collection The collection to check for containment in this list
+ * @param[in] collection The collection to check for containment in this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
- * @remarks
+ * @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - If the given @c collection is empty, this method will return @c true.
* @see Contains()
*
* @since 2.0
*
- * @return A pointer to a bidirectional enumerator interface of the %IList derived class, @n
- * else @c null if an exception occurs
- * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
- * to iterate over a collection (an instance of the %IList derived class).
- * The specific error code can be accessed using GetLastResult() method.
- * @see Tizen::Base::Collection::IBidirectionalEnumerator
+ * @return A pointer to a bidirectional enumerator interface of the %IList derived class, @n
+ * else @c null if an exception occurs
+ * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
+ * to iterate over a collection (an instance of the %IList derived class).
+ * The specific error code can be accessed using GetLastResult() method.
+ * @see Tizen::Base::Collection::IBidirectionalEnumerator
*/
virtual IBidirectionalEnumerator* GetBidirectionalEnumeratorN(void) const = 0;
#include <FBaseColICollectionT.h>
#include <FBaseColIComparerT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
/**
- * @interface IListT
- * @brief This interface represents a template-based collection of objects that can be individually accessed by an index.
+ * @interface IListT
+ * @brief This interface represents a template-based collection of objects that can be individually accessed by an index.
*
* @since 2.0
*
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to add
+ * @param[in] obj The object to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks In a collection of contiguous elements, such as a list, the elements
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to add
+ * @param[in] collection The collection to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
*
* @return An error code
* @param[in] index The index of the object to get
- * @param[out] obj The object obtained from the list
+ * @param[out] obj The object obtained from the list
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
*
* @return An error code
* @param[in] index The index of the object to get
- * @param[out] obj The object obtained from the list
+ * @param[out] obj The object obtained from the list
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to remove
+ * @param[in] obj The object to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The object is not found.
*/
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is either equal to or greater than the number of elements in the list or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to remove from this list
+ * @param[in] collection The collection to remove from this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[in] obj The new object
+ * @param[in] obj The new object
* @param[in] index The index at which the new object must be set
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* @since 2.0
*
* @return An error code
- * @param[in] comparer The IComparerT implementation to use when comparing elements
- * @exception E_SUCCESS The method is successful.
+ * @param[in] comparer The IComparerT implementation to use when comparing elements
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
*/
virtual result Sort(const IComparerT< Type >& comparer) = 0;
*
* @since 2.0
*
- * @return A pointer to a bidirectional enumerator interface of the %IListT derived class, @n
- * else @c null if an exception occurs
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
- * to iterate over a collection (an instance of the %IListT derived class).
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see Tizen::Base::Collection::IBidirectionalEnumeratorT
+ * @return A pointer to a bidirectional enumerator interface of the %IListT derived class, @n
+ * else @c null if an exception occurs
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
+ * to iterate over a collection (an instance of the %IListT derived class).
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @see Tizen::Base::Collection::IBidirectionalEnumeratorT
*/
virtual IBidirectionalEnumeratorT< Type >* GetBidirectionalEnumeratorN(void) const = 0;
#include <FBaseColIMapEnumerator.h>
#include <FBaseObject.h>
-
namespace Tizen { namespace Base { namespace Collection
{
class MapEntry;
/**
- * @interface IMap
- * @brief This interface represents a collection of key-value pairs.
+ * @interface IMap
+ * @brief This interface represents a collection of key-value pairs.
*
* @since 2.0
*
*
* @return The value associated with the specified key, @n
* else @c null if an exception occurs
- * @param[in] key The key to find the associated value
+ * @param[in] key The key to find the associated value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid, or
* the comparer has failed to compare the keys.
*
* @return The value associated with the specified key, @n
* else @c null if an exception occurs
- * @param[in] key The key to find the associated value
+ * @param[in] key The key to find the associated value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid, or
* the comparer has failed to compare the keys.
*
* @return A pointer to a list of all the keys in the map, @n
* else @c null if an exception occurs
- * @remarks
+ * @remarks
* - The order of the keys is the same as the corresponding values in the IList interface returned by the GetValuesN() method.
* - The %IList interface stores just the pointers to the elements in the map, not the elements themselves.
* - The specific error code can be accessed using the GetLastResult() method.
*
* @return A pointer to a list of all the values in the map, @n
* else @c null if an exception occurs
- * @remarks
+ * @remarks
* - The IList stores just the pointers to the elements in the map, not the elements themselves.
* - The specific error code can be accessed using the GetLastResult() method.
* @see GetKeysN()
* @return An error code
* @param[in] key The key to remove
* @param[in] forceDeletion Set to @c true to deallocate the object, @n
- * else @c false
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @since 2.0
*
* @return An error code
- * @param[in] key The key for which the value is to remove
+ * @param[in] key The key for which the value is to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @since 2.0
*
* @param[in] forceDeletion Set to @c true to deallocate all the objects, @n
- * else @c false
- * @remarks
+ * else @c false
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @since 2.0
*
* @return An error code
- * @param[in] key The key for which the value is to replace
- * @param[in] value The new value
+ * @param[in] key The key for which the value is to replace
+ * @param[in] value The new value
* @param[in] forceDeletion Set to @c true to deallocate the object, @n
- * else @c false
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
- * @remarks
+ * @remarks
* - Use the Add(Object*, Object*) method to add a new key-value pair.
* - Based on the specified element deleter, the set operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the set method. @n
* @since 2.0
*
* @return An error code
- * @param[in] key The key for which the value is to replace
+ * @param[in] key The key for which the value is to replace
* @param[in] pValue The pointer to new value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
- * @remarks Use the Add(Object*, Object*) method to add a new key-value pair.
- * @see GetValue()
+ * @remarks Use the Add(Object*, Object*) method to add a new key-value pair.
+ * @see GetValue()
*/
virtual result SetValue(const Object& key, Object* pValue) = 0;
*
* @return @c true if the map contains the specified key, @n
* else @c false
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
*
* @since 2.0
*
- * @return IMapEnumerator object of this map, @n
+ * @return IMapEnumerator object of this map, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
* @remarks The specific error code can be accessed using the GetLastResult() method.
//
virtual void IMap_Reserved1(void) { }
-
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
// and consistency-related issues in the application.
#include <FBaseColIEnumerator.h>
#include <FBaseObject.h>
-
namespace Tizen { namespace Base { namespace Collection
{
class MapEntry;
/**
- * @interface IMapEnumerator
- * @brief This interface supports simple iteration over a map.
+ * @interface IMapEnumerator
+ * @brief This interface supports simple iteration over a map.
*
* @since 2.0
*
* @return A pointer to the current object in the collection, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
* - The current state of the instance prohibits the execution of the specified operation. @n
* - The enumerator is currently positioned before the first element or after the last element. @n
* - The collection is modified after the enumerator is created.
* @return A pointer to the current key in the map, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
* - The current state of the instance prohibits the execution of the specified operation. @n
* - The enumerator is currently positioned before the first element or after the last element. @n
* - The collection is modified after the enumerator is created.
* @return A pointer to the current value in the map, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
* - The current state of the instance prohibits the execution of the specified operation. @n
* - The enumerator is currently positioned before the first element or after the last element. @n
* - The collection is modified after the enumerator is created.
#include <FBaseColIEnumeratorT.h>
#include <FBaseColMapEntryT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
/**
- * @interface IMapEnumeratorT
- * @brief This interface supports simple iteration over a template-based map. @n
- * Using this method, you can only access the elements in the map. You cannot modify the elements.
+ * @interface IMapEnumeratorT
+ * @brief This interface supports simple iteration over a template-based map. @n
+ * Using this method, you can only access the elements in the map. You cannot modify the elements.
*
* @since 2.0
*
* deleting elements, the enumerator is irrecoverably invalidated. The next call to any method returns an @c E_INVALID_OPERATION message.
*
* The %IMapEnumeratorT interface supports simple iteration over a template-based map.
- * Using this method, you can only access the elements in the map. You cannot modify the elements.
+ * Using this method, you can only access the elements in the map. You cannot modify the elements.
*
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/base/hashmap_multihashmap.htm">HashMap and MultiHashMap</a>.
*
* @since 2.0
*
* @return An error code
- * @param[out] key The current key
+ * @param[out] key The current key
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The enumerator is currently positioned before the first element or after the last element or the collection is modified after the enumerator is created.
* @exception E_SUCCESS The method is successful.
* @since 2.0
*
* @return An error code
- * @param[out] value The current value
+ * @param[out] value The current value
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The enumerator is currently positioned before the first element or after the last element or the collection is modified after the enumerator is created.
* @exception E_SUCCESS The method is successful.
#include <FBaseColIMapEnumeratorT.h>
#include <FBaseColMapEntryT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
template< class Type > class IListT;
/**
- * @interface IMapT
- * @brief This interface abstracts a template-based collection of key-value pairs.
+ * @interface IMapT
+ * @brief This interface abstracts a template-based collection of key-value pairs.
*
* @since 2.0
*
* @param[in] value The corresponding value to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the comparer has failed to compare the keys.
+ * the comparer has failed to compare the keys.
* @exception E_OBJ_ALREADY_EXIST The specified @c key already exists.
* @see Remove()
*/
* @since 2.0
*
* @return An error code
- * @param[in] key The key for which the value is to remove
+ * @param[in] key The key for which the value is to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @param[in] key The key to locate
* @param[out] out Set to @c true if the map contains the specified @c key, @n
* else @c false
- * @exception E_SUCCESS The method is successful, or
+ * @exception E_SUCCESS The method is successful, or
* the map contains the specified @c key.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
#include <FBaseColIMapEnumerator.h>
#include <FBaseObject.h>
-
namespace Tizen { namespace Base { namespace Collection
{
*
* @return A pointer to a list of all unique keys in the map, @n
* else @c null if an exception occurs
- * @remarks
+ * @remarks
* - The %IList stores just the pointers to the elements in the map, not the elements themselves.
* - The specific error code can be accessed using the GetLastResult() method.
* @see GetValuesN()
*
* @return A pointer to a list of all the values in the map, @n
* else @c null if an exception occurs
- * @remarks
+ * @remarks
* - The IList stores just the pointers to the elements in the map, not the elements themselves.
* - The specific error code can be accessed using the GetLastResult() method.
* @see SetValue()
* @return An error code
* @param[in] key The key for which the associated values need to remove
* @param[in] forceDeletion Set to @c true to deallocate the object, @n
- * else @c false
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @since 2.0
*
* @return An error code
- * @param[in] key The key for which the associated values need to remove
+ * @param[in] key The key for which the associated values need to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @param[in] key The key for which the mapping is to remove from the map
* @param[in] value The value to remove
* @param[in] forceDeletion Set to @c true to deallocate the object, @n
- * else @c false
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The @c key and @c value pair is not found in the map.
- * @remarks
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @since 2.0
*
* @param[in] forceDeletion Set to @c true to deallocate all objects, @n
- * else @c false
- * @remarks
+ * else @c false
+ * @remarks
* - Based on the specified element deleter, the remove operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the remove method. @n
* If both an element deleter and forceDeleteion are set, the remove operation follows @c forceDeletion setting.
* @param[in] value The value associated with the key
* @param[in] newValue The new value
* @param[in] forceDeletion Set to @c true to deallocate the object, @n
- * else @c false
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The key-value pair is not found in the map.
- * @remarks
+ * @remarks
* - Use the Add(Object*, Object*) method to add a new key-value pair.
* - Based on the specified element deleter, the set operation not only gets rid of an element from a list, but also deletes its object instance. @n
* The element deleter style is recommended rather than using the @c forceDeletetion argument in the set method. @n
* @since 2.0
*
* @return An error code
- * @param[in] key The key for which the associated value needs to replace
- * @param[in] value The value associated with the key
+ * @param[in] key The key for which the associated value needs to replace
+ * @param[in] value The value associated with the key
* @param[in] pNewValue The pointer to new value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
*
* @return @c true if the map contains the specified key, @n
* else @c false
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @return An instance of the IMapEnumerator class for the map, @n
* else @c null if an exception occurs
* @exception E_SUCCESS The method is successful.
- * @remarks
+ * @remarks
* - If a key has multiple values, the enumeration proceeds as follows: @n
* {A: a}, {B: b}, {B: c}, {B, d}, {C: e}, ...
* - The specific error code can be accessed using the GetLastResult() method.
//
virtual void IMultiMap_Reserved1(void) { }
-
//
// This method is for internal use only. Using this method can cause behavioral, security-related,
// and consistency-related issues in the application.
#include <FBaseColIMapEnumeratorT.h>
#include <FBaseColMapEntryT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
template< class Type > class IListT;
/**
- * @interface IMultiMapT
- * @brief This interface represents a template-based collection of key-value pairs.
+ * @interface IMultiMapT
+ * @brief This interface represents a template-based collection of key-value pairs.
*
* @since 2.0
*
* @since 2.0
*
* @return The number of values whose key matches the specified key
- * @param[in] key The key to locate in the map
+ * @param[in] key The key to locate in the map
* @param[out] count The number of values whose key matches the specified key
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
*
* @return An instance of the IEnumeratorT derived class with the values associated with the specified key, @n
* else @c null if an exception occurs
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @since 2.0
*
* @return An error code
- * @param[in] key The key whose associated values need to remove
+ * @param[in] key The key whose associated values need to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @since 2.0
*
* @return An error code
- * @param[in] key The key whose mapping is to remove from the map
+ * @param[in] key The key whose mapping is to remove from the map
* @param[in] value The value to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
#ifndef _FBASE_COL_ITERATOR_T_H_
#define _FBASE_COL_ITERATOR_T_H_
-#include <algorithm> // std::swap (Before C++11)
+#include <algorithm> // std::swap (Before C++11)
#include <iterator>
#include <unique_ptr.h>
#include <FBaseLog.h>
* StlConverter provides static methods to get this iterator from IList.
*/
-template < typename T >
+template< typename T >
class IteratorT
: public std::iterator< std::input_iterator_tag, T >
{
* @return A reference to the %IteratorT instance
* @param[in] rhs A reference to the %IteratorT instance on the right-hand side of the operator
*/
- IteratorT< T >& operator=(const IteratorT< T >& rhs)
+ IteratorT< T >& operator =(const IteratorT< T >& rhs)
{
IteratorT< T > tmp(rhs);
tmp.swap(*this);
*
* @return A T type reference
*/
- T& operator*(void) const
+ T& operator *(void) const
{
AppAssertf(!__isPostEnd && __index >= 0, "It is out of range.");
return const_cast< T& >(__currentObj);
*
* @return A T type pointer that is equivalent to the pointer address
*/
- T* operator->(void) const
+ T* operator ->(void) const
{
- return &(operator*());
+ return &(operator *());
}
/**
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- IteratorT< T >& operator++(void)
+ IteratorT< T >& operator ++(void)
{
const int PRE_BEGIN_IDX = -1;
TryCatchResult(__index >= PRE_BEGIN_IDX, , E_OUT_OF_RANGE, "[%s] It is out of range.", GetErrorMessage(E_OUT_OF_RANGE));
if (__index != PRE_BEGIN_IDX)
{
result r = __pEnum->MoveNext();
- TryCatchResult(r == E_SUCCESS, __isPostEnd = true; __currentObj = null, r, "[%s] It already reached the end.", GetErrorMessage(r));
+ TryCatchResult(r == E_SUCCESS, __isPostEnd = true;
+ __currentObj = null, r, "[%s] It already reached the end.", GetErrorMessage(r));
}
__currentObj = static_cast< T >(__pEnum->GetCurrent());
- CATCH:
+CATCH:
++__index;
return *this;
}
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- IteratorT< T > operator++(int)
+ IteratorT< T > operator ++(int)
{
IteratorT< T > tempIter = *this;
- operator++();
+ operator ++();
return tempIter;
}
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- IteratorT< T >& operator--(void)
+ IteratorT< T >& operator --(void)
{
TryCatchResult(__index <= __pList->GetCount(), , E_OUT_OF_RANGE, "[%s] It is out of range.", GetErrorMessage(E_OUT_OF_RANGE));
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- IteratorT< T > operator--(int)
+ IteratorT< T > operator --(int)
{
IteratorT< T > tempIter = *this;
- operator--();
+ operator --();
return tempIter;
}
* else @c false
* @param[in] rhs A reference to the %IteratorT instance on the right-hand side of the operator
*/
- bool operator==(const IteratorT< T >& rhs) const
+ bool operator ==(const IteratorT< T >& rhs) const
{
if (__pList != rhs.__pList)
{
* else @c false
* @param[in] rhs A reference to the %IteratorT instance on the right-hand side of the operator
*/
- bool operator!=(const IteratorT< T >& rhs) const
+ bool operator !=(const IteratorT< T >& rhs) const
{
- return !operator==(rhs);
+ return !operator ==(rhs);
}
/**
#include <FBaseColIComparer.h>
#include <FBaseColIList.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* @since 2.0
*
* @return An error code
- * @param[in] pObj An pointer to object to add
+ * @param[in] pObj An pointer to object to add
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks This method performs a shallow copy. It adds just the pointer; not the element itself.
* @see Remove()
*/
* @since 2.0
*
* @return An error code
- * @param[in] collection A collection to add
+ * @param[in] collection A collection to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
*
* @since 2.0
*
- * @return An instance of the IBidirectionalEnumerator derived class, @n
- * else @c null if some exception occurs
- * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
- * to iterate over a collection (an instance of the IList derived class).
- * The specific error code can be accessed using GetLastResult() method.
- * @see Tizen::Base::Collection::IBidirectionalEnumerator
+ * @return An instance of the IBidirectionalEnumerator derived class, @n
+ * else @c null if some exception occurs
+ * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumerator derived class)
+ * to iterate over a collection (an instance of the IList derived class).
+ * The specific error code can be accessed using GetLastResult() method.
+ * @see Tizen::Base::Collection::IBidirectionalEnumerator
*/
virtual IBidirectionalEnumerator* GetBidirectionalEnumeratorN(void) const;
*
* @return A pointer to the object at the specified index of the list, @n
* else @c null if the index is not valid
- * @param[in] index The index of the object to read
+ * @param[in] index The index of the object to read
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is equal to or greater than the number of elements or less than @c 0.
*
* @return A pointer to the object at the specified index of the list, @n
* else @c null if the index is not valid
- * @param[in] index The index of the object to read
+ * @param[in] index The index of the object to read
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is equal to or greater than the number of elements or less than @c 0.
*
* @return An error code
* @param[in] pObj The pointer to object to insert
- * @param[in] index The index at which the object must be inserted
+ * @param[in] index The index at which the object must be inserted
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the @c collection is modified during the operation of this method.
* @remarks If the @c startIndex equals to the number of elements then the new elements
* are added at the end of this list.
- * This method performs a shallow copy. It inserts just the pointer; not the element itself.
+ * This method performs a shallow copy. It inserts just the pointer; not the element itself.
* @see RemoveItems()
* @see AddItems()
*/
* @since 2.0
*
* @return An error code
- * @param[in] obj An object to remove
+ * @param[in] obj An object to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
* @see Add()
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* The specified @c index is equal to or greater than the number of elements or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to remove from this list
+ * @param[in] collection The collection to remove from this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
*
* @return An error code
* @param[in] pObj The pointer to object to set
- * @param[in] index The index at which the object must be set
+ * @param[in] index The index at which the object must be set
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* @since 2.0
*
* @return An error code
- * @param[in] comparer The IComparer implementation to use when comparing elements
+ * @param[in] comparer The IComparer implementation to use when comparing elements
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid, or
* the @c comparer is not valid.
* @since 2.0
*
* @return @c true if this list contains all of the elements in the specified collection, @n
- * else @c false
- * @param[in] collection The collection to check for containment in this list
+ * else @c false
+ * @param[in] collection The collection to check for containment in this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* Allocates and adds a memory block.
*
* @return An error code
- * @param[in] blockSize The size of block to allocate
+ * @param[in] blockSize The size of block to allocate
* @exception E_SUCCESS The method is successful.
*/
result AddBlock(int blockSize = DEFAULT_CAPACITY);
* Inserts an object to the beginning of the %LinkedList.
*
* @return An error code
- * @param[in] pObj The pointer to object to insert
+ * @param[in] pObj The pointer to object to insert
* @exception E_SUCCESS The method is successful.
*/
result InsertFirst(Object* pObj);
* Inserts an object to the end of the %LinkedList.
*
* @return An error code
- * @param[in] pObj The pointer to object to insert
+ * @param[in] pObj The pointer to object to insert
* @exception E_SUCCESS The method is successful.
*/
result InsertLast(Object* pObj);
* Inserts an object after the specified node.
*
* @return An error code
- * @param[in] pObj The pointer to object to insert
- * @param[in] pPrevNode The node after which the object must inserted
+ * @param[in] pObj The pointer to object to insert
+ * @param[in] pPrevNode The node after which the object must inserted
* @exception E_SUCCESS The method is successful.
*/
result InsertNext(Object* pObj, _ListNode* pPrevNode);
#include <FBaseColIComparerT.h>
#include <FBaseColIListT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* @since 2.0
*
* @return An error code
- * @param[in] obj An object to add
+ * @param[in] obj An object to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @see Remove()
* @since 2.0
*
* @return An error code
- * @param[in] collection A collection to add
+ * @param[in] collection A collection to add
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
*
* @since 2.0
*
- * @return An instance of the IBidirectionalEnumeratorT derived class if successful, @n
- * else @c null if an exception occurs
- * @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
- * to iterate over a collection (an instance of the IListT derived class).
- * The specific error code can be accessed using the GetLastResult() method.
- * @see Tizen::Base::Collection::IBidirectionalEnumeratorT
+ * @return An instance of the IBidirectionalEnumeratorT derived class if successful, @n
+ * else @c null if an exception occurs
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @remarks Use this method to obtain a bidirectional enumerator (an instance of the IBidirectionalEnumeratorT derived class)
+ * to iterate over a collection (an instance of the IListT derived class).
+ * The specific error code can be accessed using the GetLastResult() method.
+ * @see Tizen::Base::Collection::IBidirectionalEnumeratorT
*/
virtual IBidirectionalEnumeratorT< Type >* GetBidirectionalEnumeratorN(void) const
{
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the object to read
- * @param[out] obj An object to get from this list
+ * @param[in] index The index of the object to read
+ * @param[out] obj An object to get from this list
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is equal to or greater than the number of elements or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] index The index of the object to read
- * @param[out] obj An object to get from this list
+ * @param[in] index The index of the object to read
+ * @param[out] obj An object to get from this list
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is equal to or greater than the number of elements or less than @c 0.
* @since 2.0
*
* @return An error code
- * @param[in] obj An object to insert
+ * @param[in] obj An object to insert
* @param[in] index The index at which the object must be inserted
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* @since 2.0
*
* @return An error code
- * @param[in] obj An object to remove
+ * @param[in] obj An object to remove
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The specified @c obj is not found.
* @see Add()
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to remove from this list
+ * @param[in] collection The collection to remove from this list
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[in] index The index at which the object must be removed
+ * @param[in] index The index at which the object must be removed
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* the specified @c index is equal to or greater than the number of elements or less than @c 0.
* @param[in] startIndex The starting index of the range
* @param[in] count The number of elements to read
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: @n
+ * @exception E_OUT_OF_RANGE Either of the following conditions has occurred: @n
* - The specified index is outside the bounds of the data structure. @n
* - The specified @c startIndex is either equal to or greater than the number of elements or less than @c 0. @n
* - The specified @c count is either greater than the number of elements starting from @c startIndex or less than @c 0.
virtual result RemoveItems(int startIndex, int count)
{
TryReturn(startIndex >= 0 && count >= 0, E_OUT_OF_RANGE,
- "[%s] Both of the startIndex(%d) and count(%d) MUST be greater than or equal to 0.",
- GetErrorMessage(E_OUT_OF_RANGE), startIndex, count);
+ "[%s] Both of the startIndex(%d) and count(%d) MUST be greater than or equal to 0.",
+ GetErrorMessage(E_OUT_OF_RANGE), startIndex, count);
TryReturn(startIndex < __count, E_OUT_OF_RANGE,
- "[%s] The startIndex(%d) MUST be less than the number of elements(%d).", GetErrorMessage(E_OUT_OF_RANGE), startIndex, __count);
+ "[%s] The startIndex(%d) MUST be less than the number of elements(%d).", GetErrorMessage(E_OUT_OF_RANGE), startIndex, __count);
TryReturn(count <= __count && (startIndex + count <= __count), E_OUT_OF_RANGE,
- "[%s] The startIndex(%d) + count(%d) MUST be less than or equal to the number of elements(%d).",
- GetErrorMessage(E_OUT_OF_RANGE), startIndex, count, __count);
+ "[%s] The startIndex(%d) + count(%d) MUST be less than or equal to the number of elements(%d).",
+ GetErrorMessage(E_OUT_OF_RANGE), startIndex, count, __count);
if (count > 0)
{
* @since 2.0
*
* @return An error code
- * @param[in] obj An object to set
+ * @param[in] obj An object to set
* @param[in] index The index at which the object must be set
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or
* @since 2.0
*
* @return An error code
- * @param[in] comparer The IComparerT implementation to use when comparing the elements
+ * @param[in] comparer The IComparerT implementation to use when comparing the elements
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the @c comparer is not valid.
* Inserts an object to the beginning of the %LinkedList.
*
* @return An error code
- * @param[in] obj The object to insert
+ * @param[in] obj The object to insert
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SUCCESS The method is successful.
*/
* Inserts an object to the end of the LinkedList.
*
* @return An error code
- * @param[in] obj The object to insert
+ * @param[in] obj The object to insert
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SUCCESS The method is successful.
*/
* Inserts an object after the specified node.
*
* @return An error code
- * @param[in] obj The object to insert
- * @param[in] pPrevNode The node after which the object must be inserted
+ * @param[in] obj The object to insert
+ * @param[in] pPrevNode The node after which the object must be inserted
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_SUCCESS The method is successful.
* @remarks The specific error code can be accessed using the GetLastResult() method.
#include <FBaseObject.h>
-
namespace Tizen { namespace Base { namespace Collection
{
#include <FBaseObject.h>
-
namespace Tizen { namespace Base { namespace Collection
{
/**
- * @class MapEntryT
+ * @class MapEntryT
* @brief This class represents a template-based key-value pair.
*
* @since 2.0
*
* @since 2.0
*
- * @param[in] key The key for this mapping
+ * @param[in] key The key for this mapping
* @param[in] value The value for this mapping
*/
MapEntryT(const KeyType& key, const ValueType& value)
* @since 2.0
*
* @return The key corresponding to this entry
- * @see GetValue()
+ * @see GetValue()
*/
virtual const KeyType& GetKey(void) const
{
#include <FBaseColIHashCodeProvider.h>
#include <FBaseColIMultiMap.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* @param[in] loadFactor The maximum ratio of elements to buckets
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the @c capacity or the @c loadFactor is negative.
+ * the @c capacity or the @c loadFactor is negative.
* @remarks The GetHashCode() method of the key object is used for hashing and the
* Equals() method of the key object is used for comparing the keys.
* @see MultiHashMap()
* @param[in] comparer An instance of the IComparer derived class to use when comparing keys
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the @c capacity or the @c loadFactor is negative.
+ * the @c capacity or the @c loadFactor is negative.
* @remarks The instances of hash code provider and comparer will not be deallocated later from this map.
* @see MultiHashMap()
*/
*
* @return An enumerator (an instance of the IEnumerator derived class) of the values associated with the specified key, @n
* else @c null if some exception occurs
- * @param[in] key A key to locate
+ * @param[in] key A key to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
*
* @return A list of all unique keys in this map
* @remarks The %IList stores just the pointers to the elements in the map, not the elements themselves.
- * The specific error code can be accessed using the GetLastResult() method.
+ * The specific error code can be accessed using the GetLastResult() method.
* @see GetValuesN()
*/
virtual IList* GetKeysN(void) const;
*
* @return A list of all the values in this map
* @remarks The IList stores just the pointers to the elements in the map, not the elements themselves.
- * The specific error code can be accessed using the GetLastResult() method.
+ * The specific error code can be accessed using the GetLastResult() method.
* @see GetKeysN()
*/
virtual IList* GetValuesN(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] key The key to remove
+ * @param[in] key The key to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare keys.
* @since 2.0
*
* @return An error code
- * @param[in] key The key whose mapping is to remove from the map
+ * @param[in] key The key whose mapping is to remove from the map
* @param[in] value The value to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* @since 2.0
*
* @return An error code
- * @param[in] key The key for which the associated value needs to replace
- * @param[in] value The value to replace
+ * @param[in] key The key for which the associated value needs to replace
+ * @param[in] value The value to replace
* @param[in] pNewValue The pointer to new value to replace the existing value
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
*
* @return @c true if the map contains the specified key and value pair, @n
* else @c false
- * @param[in] key The key to locate
- * @param[in] value The value to locate
+ * @param[in] key The key to locate
+ * @param[in] value The value to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
*
* @return @c true if the map contains the specified key, @n
* else @c false
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* Copies all the pairs from the specified map to this map.
*
* @return An error code
- * @param[in] map The map to copy
+ * @param[in] map The map to copy
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The @c map is modified during the operation of this method.
* @return An error code
* @param[in] newCapacity The new capacity @n
* It must be a power of two and be greater than current capacity.
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
*/
result Resize(int newCapacity);
#include <FBaseComparerT.h>
#include <FBaseFloat.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* @param[in] loadFactor The maximum ratio of elements to buckets
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c capacity or the @c loadFactor is negative.
+ * the specified @c capacity or the @c loadFactor is negative.
* @remarks The key type must be a primitive data type.
* @see MultiHashMapT()
*/
* If it is @c 0, the default load factor(0.75) is used.
* @param[in] provider An instance of the IHashCodeProvider derived class that supplies the hash codes
* for all keys in this map
- * @param[in] comparer An instance of the IComparer derived class to use when comparing keys
+ * @param[in] comparer An instance of the IComparer derived class to use when comparing keys
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
- * the specified @c capacity or the @c loadFactor is negative.
+ * the specified @c capacity or the @c loadFactor is negative.
* @remarks The instances of hash code provider and comparer will not be deallocated later from this map.
* @see MultiHashMapT()
*/
*
* @return An enumerator (an instance of the IEnumeratorT derived class) of the values associated with the specified key, @n
* else @c null if an exception occurs
- * @param[in] key A key to locate
+ * @param[in] key A key to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @since 2.0
*
* @return An error code
- * @param[in] key The key to remove
+ * @param[in] key The key to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @since 2.0
*
* @return An error code
- * @param[in] key The key whose mapping is to remove from the map
+ * @param[in] key The key whose mapping is to remove from the map
* @param[in] value The value to remove
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* @param[in] key A key
* @param[in] value A value to replace
* @param[in] newValue A new value to replace the existing value
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
- * @exception E_OBJ_NOT_FOUND The specified @c key and @c value pair is not found in the map.
+ * @exception E_OBJ_NOT_FOUND The specified @c key and @c value pair is not found in the map.
* @remarks To add a new key-value pair, use the Add() method.
* @see Add()
* @see GetValuesN()
* @since 2.0
*
* @return An error code
- * @param[in] key A key to locate
+ * @param[in] key A key to locate
* @param[out] count The number of values whose key is @c key
- * @exception E_SUCCESS The method is successful.
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG A specified input parameter is invalid, or
* the comparer has failed to compare the keys.
* @exception E_OBJ_NOT_FOUND The specified @c key is not found in the map.
* @since 2.0
*
* @return An error code
- * @param[in] key The key to locate
- * @param[in] value The value to locate
+ * @param[in] key The key to locate
+ * @param[in] value The value to locate
* @param[out] out Set to @c true if the map contains the specified key and value pair, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* @since 2.0
*
* @return An error code
- * @param[in] key The key to locate
+ * @param[in] key The key to locate
* @param[out] out Set to @c true if the map contains the specified key, @n
* else @c false
* @exception E_SUCCESS The method is successful.
* Copies all the pairs from the specified map to this map.
*
* @return An error code
- * @param[in] map The map to copy
+ * @param[in] map The map to copy
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
* The @c map is modified during the operation of this method.
* @since 2.0
*
* @param[in] keyType A key to include in this entry
- * @param[in] list A list of values whose key is specified @n
- * It cannot be @c null.
- * @param[in] next A pointer to the next entry
- * @param[in] h An hash value of the key
+ * @param[in] list A list of values whose key is specified @n
+ * It cannot be @c null.
+ * @param[in] next A pointer to the next entry
+ * @param[in] h An hash value of the key
*/
__MultiHashMapEntryT(const KeyType& keyType, __ValueNodeT< ValueType >* list, __MultiHashMapEntryT< KeyType, ValueType >* next, int h)
: key(keyType)
* @since 2.0
*
* @return An error code
- * @param[out] obj The current object
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - The current state of the instance prohibits the execution of the specified operation. @n
- * - This enumerator is currently positioned before the first element or
- * past the last element. @n
- * - The map is modified after this enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] obj The current object
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - The current state of the instance prohibits the execution of the specified operation. @n
+ * - This enumerator is currently positioned before the first element or
+ * past the last element. @n
+ * - The map is modified after this enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetCurrent(MapEntryT< KeyType, ValueType >& obj) const
{
* @since 2.0
*
* @return An error code
- * @param[out] key The current key
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - The current state of the instance prohibits the execution of the specified operation. @n
- * - This enumerator is currently positioned before the first element or
- * past the last element. @n
- * - The map is modified after this enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] key The current key
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - The current state of the instance prohibits the execution of the specified operation. @n
+ * - This enumerator is currently positioned before the first element or
+ * past the last element. @n
+ * - The map is modified after this enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetKey(KeyType& key) const
{
* @since 2.0
*
* @return An error code
- * @param[out] value The current value
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - The current state of the instance prohibits the execution of the specified operation. @n
- * - This enumerator is currently positioned before the first element or
- * past the last element. @n
- * - The map is modified after the enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] value The current value
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - The current state of the instance prohibits the execution of the specified operation. @n
+ * - This enumerator is currently positioned before the first element or
+ * past the last element. @n
+ * - The map is modified after the enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetValue(ValueType& value) const
{
* @since 2.0
*
* @return An error code
- * @param[out] obj The current value
+ * @param[out] obj The current value
* @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
* - The current state of the instance prohibits the execution of the specified operation. @n
* - This enumerator is currently positioned before the first element or
#ifndef _FBASE_COL_PAIR_ITERATOR_T_H_
#define _FBASE_COL_PAIR_ITERATOR_T_H_
-#include <algorithm> // std::swap (Before C++11)
+#include <algorithm> // std::swap (Before C++11)
#include <iterator>
#include <utility>
#include <unique_ptr.h>
* StlConverter provides static methods to get this iterator from IMap or IMultiMap.
*/
-template < typename K, typename V >
+template< typename K, typename V >
class PairIteratorT
: public std::iterator< std::input_iterator_tag, std::pair< K, V > >
{
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- PairIteratorT< K, V >& operator=(const PairIteratorT< K, V >& rhs)
+ PairIteratorT< K, V >& operator =(const PairIteratorT< K, V >& rhs)
{
PairIteratorT< K, V > tmp(rhs);
tmp.swap(*this);
*
* @return A std::pair type reference with K and V type
*/
- std::pair< K, V >& operator*(void) const
+ std::pair< K, V >& operator *(void) const
{
AppAssertf(!__isPostEnd, "It is out of range.");
return const_cast< std::pair< K, V >& >(__currentObj);
*
* @return A std::pair type pointer equivalent to the pointer address
*/
- std::pair< K, V >* operator->(void) const
+ std::pair< K, V >* operator ->(void) const
{
- return &(operator*());
+ return &(operator *());
}
/**
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- PairIteratorT< K, V >& operator++(void)
+ PairIteratorT< K, V >& operator ++(void)
{
TryReturnResult(!__isPostEnd, *this, E_OUT_OF_RANGE, "[%s] It already reached the end.", GetErrorMessage(E_OUT_OF_RANGE));
result r = __pEnum->MoveNext();
- TryCatchResult(r == E_SUCCESS, __isPostEnd = true; __currentObj.first = null; __currentObj.second = null,
+ TryCatchResult(r == E_SUCCESS, __isPostEnd = true;
+ __currentObj.first = null;
+ __currentObj.second = null,
r, "[%s] It already reached the end.", GetErrorMessage(r));
__currentObj.first = static_cast< K >(__pEnum->GetKey());
* the collection is modified after the enumerator is created.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- PairIteratorT< K, V > operator++(int)
+ PairIteratorT< K, V > operator ++(int)
{
PairIteratorT< K, V > tempIter = *this;
- operator++();
+ operator ++();
return tempIter;
}
* else @c false
* @param[in] rhs A reference to the %PairIteratorT instance on the right-hand side of the operator
*/
- bool operator==(const PairIteratorT< K, V >& rhs) const
+ bool operator ==(const PairIteratorT< K, V >& rhs) const
{
if (__pMap != rhs.__pMap)
{
* else @c false
* @param[in] rhs A reference to the %PairIteratorT instance on the right-hand side of the operator
*/
- bool operator!=(const PairIteratorT< K, V >& rhs) const
+ bool operator !=(const PairIteratorT< K, V >& rhs) const
{
- return !operator==(rhs);
+ return !operator ==(rhs);
}
/**
int __index;
std::unique_ptr< IMapEnumerator > __pEnum;
std::pair< K, V > __currentObj;
-}; // PairIteratorT
+}; // PairIteratorT
}}} // Tizen::Base::Collection
#include <FBaseTypes.h>
#include <FBaseColICollection.h>
-
namespace Tizen { namespace Base { namespace Collection
{
/**
* @param[in] capacity The number of elements in the queue @n
* The default capacity is @c 10.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or
- * the specified @c capacity is negative.
+ * @exception E_INVALID_ARG The specified input parameter is invalid, or
+ * the specified @c capacity is negative.
* @remarks If the number of elements added to the queue reaches the current capacity,
* the capacity is automatically increased by memory reallocation.
* Therefore, if the size of the queue can be estimated,
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to copy elements from
+ * @param[in] collection The collection to copy elements from
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* this queue is empty.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see Enqueue(Object*)
+ * @see Enqueue(Object*)
*/
virtual Object* Dequeue(void);
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to add to this queue
+ * @param[in] obj The object to add to this queue
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks This method performs a shallow copy. It inserts just the pointer; not the element itself.
- * @see Dequeue()
+ * @see Dequeue()
* @endif
*/
result Enqueue(const Object& obj)
* @since 2.0
*
* @return An error code
- * @param[in] pObj The pointer to object to add to this queue
- * @exception E_SUCCESS The method is successful.
+ * @param[in] pObj The pointer to object to add to this queue
+ * @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks This method performs a shallow copy. It inserts just the pointer; not the element itself.
- * @see Dequeue()
+ * @see Dequeue()
*/
virtual result Enqueue(Object* pObj);
* @return An enumerator (an instance of the IEnumerator derived class) of this queue, @n
* else @c null if an exception occurs
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see IEnumerator
+ * @see IEnumerator
*/
virtual IEnumerator* GetEnumeratorN(void) const;
/**
* Removes all objects and their pointers in collection, when the @c deallocate parameter is set to @c true.
- *
+ *
* @since 2.0
*
* @param[in] deallocate Set to @c true to deallocate all objects, @n
* @since 2.0
*
* @return @c true if this queue contains all the elements in the specified collection, @n
- * else @c false
- * @param[in] collection The collection to locate
+ * else @c false
+ * @param[in] collection The collection to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
#include <FBaseResult.h>
#include <FBaseColICollectionT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* The default capacity is @c 10.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or
- * the specified @c capacity is negative.
+ * @exception E_INVALID_ARG The specified input parameter is invalid, or
+ * the specified @c capacity is negative.
*/
result Construct(int capacity = DEFAULT_CAPACITY)
{
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to copy the elements from
+ * @param[in] collection The collection to copy the elements from
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* @since 2.0
*
* @return An error code
- * @param[out] obj The element at the beginning of this queue
+ * @param[out] obj The element at the beginning of this queue
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* this queue is empty.
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to add to this queue
+ * @param[in] obj The object to add to this queue
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @see Dequeue()
* @since 2.0
*
* @return An error code
- * @param[out] obj The element at the beginning of this queue
+ * @param[out] obj The element at the beginning of this queue
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* this queue is empty.
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to locate
- * @param[out] out Set to @c true if this queue contains all of the elements in the specified collection, @n
- * else @c false
+ * @param[in] collection The collection to locate
+ * @param[out] out Set to @c true if this queue contains all of the elements in the specified collection, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[out] obj The current object
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - The current state of the instance prohibits the execution of the specified operation. @n
- * - This enumerator is currently positioned before the first element or
- * past the last element. @n
- * - The queue is modified after this enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] obj The current object
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - The current state of the instance prohibits the execution of the specified operation. @n
+ * - This enumerator is currently positioned before the first element or
+ * past the last element. @n
+ * - The queue is modified after this enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetCurrent(Type& obj) const
{
#ifndef _FBASE_COL_RANDOM_ITERATOR_T_H_
#define _FBASE_COL_RANDOM_ITERATOR_T_H_
-#include <algorithm> // std::swap (Before C++11)
+#include <algorithm> // std::swap (Before C++11)
#include <iterator>
#include <FBaseColIList.h>
#include <FBaseLog.h>
* StlConverter provides static methods to get this random iterator from IList.
*/
-template < typename T >
+template< typename T >
class RandomIteratorT
: public std::iterator< std::input_iterator_tag, T >
{
*
* @since 2.1
*
- * @param[in] list A reference to the IList instance to convert
+ * @param[in] list A reference to the IList instance to convert
* @param[in] index A start index
- * @remarks %RandomIteratorT only supports random accessible collection for performance.
- * @see Tizen::Base::Collection::IList::IsRandomAccessible()
+ * @remarks %RandomIteratorT only supports random accessible collection for performance.
+ * @see Tizen::Base::Collection::IList::IsRandomAccessible()
*/
explicit RandomIteratorT(const IList& list, int index = 0)
: __pList(&list)
* @return A reference to the %RandomIteratorT instance
* @param[in] rhs A reference to the %RandomIteratorT instance on the right-hand side of the operator
*/
- RandomIteratorT< T >& operator=(const RandomIteratorT< T >& rhs)
+ RandomIteratorT< T >& operator =(const RandomIteratorT< T >& rhs)
{
RandomIteratorT< T > tmp(rhs);
tmp.swap(*this);
*
* @return A T type reference
*/
- T& operator*(void) const
+ T& operator *(void) const
{
AppAssertf(__index >= 0 && __index < __pList->GetCount(), "It is out of range.");
return const_cast< T& >(__currentObj);
*
* @return A T type pointer equivalent to the pointer address
*/
- T* operator->(void) const
+ T* operator ->(void) const
{
- return &(operator*());
+ return &(operator *());
}
/**
* or the specified index is either equal to or greater than the number of elements in the list or less than 0.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- RandomIteratorT< T >& operator++(void)
+ RandomIteratorT< T >& operator ++(void)
{
++__index;
* or the specified index is either equal to or greater than the number of elements in the list or less than 0.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- RandomIteratorT< T > operator++(int)
+ RandomIteratorT< T > operator ++(int)
{
RandomIteratorT< T > tempIter = *this;
- operator++();
+ operator ++();
return tempIter;
}
* or the specified index is either equal to or greater than the number of elements in the list or less than 0.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- RandomIteratorT< T >& operator--(void)
+ RandomIteratorT< T >& operator --(void)
{
--__index;
* or the specified index is either equal to or greater than the number of elements in the list or less than 0.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- RandomIteratorT< T > operator--(int)
+ RandomIteratorT< T > operator --(int)
{
RandomIteratorT< T > tempIter = *this;
- operator--();
+ operator --();
return tempIter;
}
* else @c false
* @param[in] rhs A reference to the %RandomIteratorT instance on the right-hand side of the operator
*/
- bool operator==(const RandomIteratorT< T >& rhs) const
+ bool operator ==(const RandomIteratorT< T >& rhs) const
{
return ((__pList == rhs.__pList) && (__index == rhs.__index) && (__currentObj == rhs.__currentObj));
}
* else @c false
* @param[in] rhs A reference to the %RandomIteratorT instance on the right-hand side of the operator
*/
- bool operator!=(const RandomIteratorT< T >& rhs) const
+ bool operator !=(const RandomIteratorT< T >& rhs) const
{
- return !operator==(rhs);
+ return !operator ==(rhs);
}
/**
- * Checks l-value is less than r-value.
+ * Checks l-value is less than r-value.
*
* @since 2.1
*
* else @c false
* @param[in] rhs A reference to the %RandomIteratorT instance on the right-hand side of the operator
*/
- bool operator<(const RandomIteratorT< T >& rhs) const
+ bool operator <(const RandomIteratorT< T >& rhs) const
{
return __index < rhs.__index;
}
* else @c false
* @param[in] rhs A reference to the %RandomIteratorT instance on the right-hand side of the operator
*/
- bool operator>(const RandomIteratorT< T >& rhs) const
+ bool operator >(const RandomIteratorT< T >& rhs) const
{
return __index > rhs.__index;
}
* @since 2.1
*
* @return A %RandomIteratorT instance
- * @param[in] diff The length to move forward
+ * @param[in] diff The length to move forward
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure,
* or the specified index is either equal to or greater than the number of elements in the list or less than 0.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- RandomIteratorT< T > operator+(int diff)
+ RandomIteratorT< T > operator +(int diff)
{
RandomIteratorT< T > tempIter = *this;
tempIter.__index += diff;
* @since 2.1
*
* @return A %RandomIteratorT instance
- * @param[in] diff The length to move backward
+ * @param[in] diff The length to move backward
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure,
* or the specified index is either equal to or greater than the number of elements in the list or less than 0.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- RandomIteratorT< T > operator-(int diff)
+ RandomIteratorT< T > operator -(int diff)
{
RandomIteratorT< T > tempIter = *this;
tempIter.__index -= diff;
return tempIter;
}
- int operator-(const RandomIteratorT< T >& rhs)
+ int operator -(const RandomIteratorT< T >& rhs)
{
return __index - rhs.__index;
}
* @since 2.1
*
* @return A reference to the T type instance
- * @param[in] index An index to reach
+ * @param[in] index An index to reach
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure,
* or the specified index is either equal to or greater than the number of elements in the list or less than 0.
* @remarks The specific error code can be accessed using GetLastResult() method.
*/
- T& operator[](int index) const
+ T& operator [](int index) const
{
// GetAt() will return null if __index is out of range.
const T& tempObj = static_cast< T >(const_cast< Object* >(__pList->GetAt(index)));
#include <FBaseTypes.h>
#include <FBaseColICollection.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* @since 2.0
*
* @return An error code
- * @param[in] capacity The number of elements @n
- * The default capacity is @c 10.
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The specified input parameter is invalid, or
- * the specified @c capacity is negative.
+ * @param[in] capacity The number of elements @n
+ * The default capacity is @c 10.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The specified input parameter is invalid, or
+ * the specified @c capacity is negative.
* @remarks If the number of elements added to the stack reaches the current capacity,
* the capacity is automatically increased by memory reallocation. @n
* Therefore, if the size of the stack can be estimated,
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to copy elements from
+ * @param[in] collection The collection to copy elements from
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @return An enumerator (an instance of the IEnumerator derived class) of this stack, @n
* else @c null if an exception occurs
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see IEnumerator
+ * @see IEnumerator
*/
virtual IEnumerator* GetEnumeratorN(void) const;
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* this stack is empty.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see Push(Object*)
+ * @see Push(Object*)
*/
virtual Object* Pop(void);
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to add to this stack
+ * @param[in] obj The object to add to this stack
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks This method performs a shallow copy. It inserts just the pointer; not the element itself.
- * @see Pop()
+ * @see Pop()
* @endif
*/
result Push(const Object& obj)
* @since 2.0
*
* @return An error code
- * @param[in] pObj The pointer to object to add to this stack
+ * @param[in] pObj The pointer to object to add to this stack
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks This method performs a shallow copy. It inserts just the pointer; not the element itself.
- * @see Pop()
+ * @see Pop()
*/
virtual result Push(Object* pObj);
*
* @return An error code
* @param[in] collection The collection to locate
- * @param[out] out Set to @c true if this stack contains all the elements in the specified collection, @n
- * else @c false
+ * @param[out] out Set to @c true if this stack contains all the elements in the specified collection, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
* @since 2.0
*
* @return @c true if this stack contains all the elements in the specified collection, @n
- * else @c false
- * @param[in] collection The collection to locate
+ * else @c false
+ * @param[in] collection The collection to locate
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the @c collection is modified during the operation of this method.
#include <FBaseResult.h>
#include <FBaseColICollectionT.h>
-
namespace Tizen { namespace Base { namespace Collection
{
* The default capacity is @c 10.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified input parameter is invalid, or
- * the specified @c capacity is negative.
+ * the specified @c capacity is negative.
*/
result Construct(int capacity = DEFAULT_CAPACITY)
{
* @since 2.0
*
* @return An error code
- * @param[in] collection The collection to copy elements from
+ * @param[in] collection The collection to copy elements from
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @see Tizen::Base::Collection::IEnumeratorT
+ * @see Tizen::Base::Collection::IEnumeratorT
*/
virtual IEnumeratorT< Type >* GetEnumeratorN(void) const
{
* @since 2.0
*
* @return An error code
- * @param[out] obj The element at the beginning of this stack
+ * @param[out] obj The element at the beginning of this stack
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* this stack is empty.
* @since 2.0
*
* @return An error code
- * @param[out] obj The element at the beginning of this stack
+ * @param[out] obj The element at the beginning of this stack
* @exception E_SUCCESS The method is successful.
* @exception E_UNDERFLOW The operation (arithmetic/casting/conversion) has caused an underflow, or
* this stack is empty.
* @since 2.0
*
* @return An error code
- * @param[in] obj The object to add to this stack
+ * @param[in] obj The object to add to this stack
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @see Pop()
+ * @see Pop()
*/
virtual result Push(const Type& obj)
{
*
* @return An error code
* @param[in] collection The collection to locate
- * @param[out] out Set to @c true if this stack contains all of the elements in the specified @c collection, @n
- * else @c false
+ * @param[out] out Set to @c true if this stack contains all of the elements in the specified @c collection, @n
+ * else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the specified @c collection is modified during the operation of this method.
* @since 2.0
*
* @return An error code
- * @param[out] obj The current object
- * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
- * - The current state of the instance prohibits the execution of the specified operation. @n
- * - This enumerator is currently positioned before the first element or
- * past the last element. @n
- * - The stack is modified after this enumerator is created.
- * @exception E_SUCCESS The method is successful.
+ * @param[out] obj The current object
+ * @exception E_INVALID_OPERATION Either of the following conditions has occurred: @n
+ * - The current state of the instance prohibits the execution of the specified operation. @n
+ * - This enumerator is currently positioned before the first element or
+ * past the last element. @n
+ * - The stack is modified after this enumerator is created.
+ * @exception E_SUCCESS The method is successful.
*/
result GetCurrent(Type& obj) const
{
* @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
* the stack is modified after this enumerator is created.
* @exception E_OUT_OF_RANGE The enumerator has passed the end of the stack.
- * @see Reset()
+ * @see Reset()
*/
result MoveNext(void)
{