*
* @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)
{
#ifndef _FBASE_DATA_TYPE_H_
#define _FBASE_DATA_TYPE_H_
-
/**
* @c byte is an @c unsigned @c char datatype.
* @since 2.0
*/
typedef unsigned long result;
-
namespace Tizen { namespace Base
{
class String;
typedef Tizen::Base::String UserId;
typedef Tizen::Base::String LoginId;
-
/**
* The invocation ID is returned when a request is sent.
* @since 2.0
typedef long RequestId;
#define INVALID_REQUEST_ID -1
-
// Macro to get the value in byte
#define GET_MASK(val, pos, msk) (((val) & ((msk) << (pos))) >> (pos))
// Macro to put the value in byte
#define PUT_MASK(var, val, pos) ((var) | ((val) << (pos)))
-
#ifndef Handle
typedef int Handle;
#define INVALID_HANDLE -1
#define INFINITE 0xFFFFFFFF
#endif // INFINITE
-
#ifndef UUID
#ifndef UUID__DEFINED
typedef struct UUID_
#define UUID UUID_
#endif // UUID
-#endif // _FBASE_DATA_TYPE_H_
+#endif // _FBASE_DATA_TYPE_H_
\ No newline at end of file
#include <FBaseString.h>
#include <FBaseDouble.h>
-
namespace Tizen { namespace Base
{
/**
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] year The year to set
* @param[in] month The month to set
* @param[in] day The day to set
* @param[in] second The second to set
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
- * Either the arguments are greater than the value returned by GetMaxValue() or
+ * Either the arguments are greater than the value returned by GetMaxValue() or
* are less than the value returned by GetMinValue(), or
- * the arguments contain invalid values.
+ * the arguments contain invalid values.
* For example, day is 31 when month is 2.
*/
result SetValue(int year, int month, int day, int hour = 0, int minute = 0, int second = 0);
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] year The year to set
* @param[in] month The month to set
* @param[in] day The day to set
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] ticks The number of ticks
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method.
*
* @since 2.0
*
- * @return A reference to the current object
- * @param[in] rhs An instance of %DateTime
+ * @return A reference to the current object
+ * @param[in] rhs An instance of %DateTime
*/
DateTime& operator =(const DateTime& rhs);
*
* @since 2.0
*
- * @return @c true if the current instance is equivalent to the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %DateTime
+ * @return @c true if the current instance is equivalent to the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %DateTime
*/
bool operator ==(const DateTime& rhs) const;
*
* @since 2.0
*
- * @return @c true if the current instance is not equivalent to the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %DateTime
+ * @return @c true if the current instance is not equivalent to the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %DateTime
*/
bool operator !=(const DateTime& rhs) const;
*
* @since 2.0
*
- * @return @c true if the value of the current instance is less than the value of the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %DateTime
+ * @return @c true if the value of the current instance is less than the value of the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %DateTime
*/
bool operator <(const DateTime& rhs) const;
*
* @since 2.0
*
- * @return @c true if the value of the current instance is greater than the value of the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %DateTime
+ * @return @c true if the value of the current instance is greater than the value of the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %DateTime
*/
bool operator >(const DateTime& rhs) const;
*
* @since 2.0
*
- * @return @c true if the value of the current instance is less than or equal to the value of the specified instance, @n
- * else @c false
- * @param[in] rhs An instance of %DateTime
+ * @return @c true if the value of the current instance is less than or equal to the value of the specified instance, @n
+ * else @c false
+ * @param[in] rhs An instance of %DateTime
*/
bool operator <=(const DateTime& rhs) const;
*
* @since 2.0
*
- * @return @c true if the value of the current instance is greater than or equal to the value of the specified instance, @n
- * else @c false
+ * @return @c true if the value of the current instance is greater than or equal to the value of the specified instance, @n
+ * else @c false
* @param[in] rhs An instance of %DateTime
*/
bool operator >=(const DateTime& rhs) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] t The time span to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] days The number of days to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] hours The number of hours to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] minutes The number of minutes to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] months The number of months to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] seconds The number of seconds to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] milliseconds The number of milliseconds to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.1
*
- * @return An error code
+ * @return An error code
* @param[in] ticks The number of ticks to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] years The number of years to add
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
*
* @since 2.0
*
- * @return A 32-bit @c signed integer value
+ * @return A 32-bit @c signed integer value
* @code
* < 0 if the value of @c dt1 is less than the value of @c dt2
* == 0 if the value of @c dt1 is equal to the value of @c dt2
*
* @since 2.0
*
- * @return A 32-bit @c signed integer value
+ * @return A 32-bit @c signed integer value
* @code
* < 0 if the value of the current instance is less than value of the specified instance
* == 0 if the value of the current instance is equal to value of the specified instance
* > 0 if the value of the current instance is greater than value of the specified instance
* @endcode
- * @param[in] value An instance of %DateTime
+ * @param[in] value An instance of %DateTime
*/
int CompareTo(const DateTime& value) const;
* @since 2.0
*
* @return @c true if the specified instance of Object is equivalent to the current instance of %DateTime, @n
- * else @c false
+ * else @c false
* @param[in] obj The object to compare with the current instance of %DateTime
- * @see Tizen::Base::Object::GetHashCode()
+ * @see Tizen::Base::Object::GetHashCode()
*/
virtual bool Equals(const Object& obj) const;
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] year The year
* @param[in] month The month
* @param[out] days The number of days
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
- * @c year must be a value between @c 1 and @c 9999 and @c month must be a value between @c 1 and @c 12.
+ * @c year must be a value between @c 1 and @c 9999 and @c month must be a value between @c 1 and @c 12.
*/
static result GetDaysInMonth(int year, int month, int& days);
*
* @since 2.0
*
- * @return An error code
+ * @return An error code
* @param[in] t The time span to deduct
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The value of the argument is outside the valid range defined by the method. @n
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_FORMAT The specified string is in an invalid format.
* @exception E_OUT_OF_RANGE The specified string contains an invalid value. @n
- * 1) The resulting value of %DateTime is greater than the value returned by GetMaxValue()
- * or is less than the value returned by GetMinValue(). @n
- * 2) The specified string contains an invalid value.
- * For example, day is 31 when the month is 2.
+ * 1) The resulting value of %DateTime is greater than the value returned by GetMaxValue()
+ * or is less than the value returned by GetMinValue(). @n
+ * 2) The specified string contains an invalid value.
+ * For example, day is 31 when the month is 2.
* @remarks
* - The format of the string is "mm/dd/yyyy hh:mm:ss".
* - This method guarantees that the original value of out-parameter is not changed when the method returns error.
*
* @since 2.0
*
- * @return An integer value indicating the year of the current instance of %DateTime
+ * @return An integer value indicating the year of the current instance of %DateTime
*/
int GetYear(void) const;
* @since 2.0
*
* @return @c true if the year represented by the current instance of %DateTime is a leap year, @n
- * else @c false
+ * else @c false
*/
bool IsLeapYear(void) const;
* @since 2.0
*
* @return @c true if the specified year is a leap year, @n
- * else @c false
+ * else @c false
* @param[in] year The year
*/
static bool IsLeapYear(int year);
int CountLeapYear(int year) const
{
return static_cast< int >((year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400);
-
}
int CountDays(int year) const
TmDateTime __dateTime;
friend class _DateTimeImpl;
- class _DateTimeImpl * __pDateTimeImpl;
+ class _DateTimeImpl* __pDateTimeImpl;
}; // DateTime
-
}} // Tizen::Base
-
-#endif // _FBASE_DATE_TIME_H_
-
+#endif // _FBASE_DATE_TIME_H_
\ No newline at end of file
//
/**
- * @file FBaseDouble.h
- * @brief This is the header file for the %Double class.
+ * @file FBaseDouble.h
+ * @brief This is the header file for the %Double class.
*
- * @see Tizen::Base::Number
+ * @see Tizen::Base::Number
*
* This header file contains the declarations of the %Double class.
*/
#include <FBaseNumber.h>
-
namespace Tizen { namespace Base
{
/**
*
* @since 2.0
*
- * @param[in] value A @c double value
+ * @param[in] value A @c double value
*/
Double(double value = 0.0L);
-
/**
* Copying of objects using this copy constructor is allowed.
*
* @since 2.0
*
* @return An integer value indicating the hash value of the current instance of %Double
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @remarks Two equal instances must return the same hash value. For better performance,
* the used hash function must generate a random distribution for all inputs. @n
* The default implementation of this method returns the value of the current instance.
*/
*
* @since 2.0
*
- * @return An integer value indicating the hash value of the specified @c double value
- * @param[in] val A @c double value to get the hash value
+ * @return An integer value indicating the hash value of the specified @c double value
+ * @param[in] val A @c double value to get the hash value
*/
static int GetHashCode(double val);
*
* @return An error code
* @param[in] s A unicode representation of @c signed @c double value
- * @param[out] ret The converted numeric value
+ * @param[out] ret The converted numeric value
* @exception E_SUCCESS The method is successful.
* @exception E_NUM_FORMAT The specified string does not contain a number that can be parsed.
- * @remarks
- * - This method guarantees that the original value of out-parameter is not changed when the method returns error.
- * - The behavior of this method is dependent on the system default locale setting.
+ * @remarks
+ * - This method guarantees that the original value of out-parameter is not changed when the method returns error.
+ * - The behavior of this method is dependent on the system default locale setting.
*/
static result Parse(const String& s, double& ret);
*
* @since 2.0
*
- * @return A @c signed @c char equivalent of the current instance
+ * @return A @c signed @c char equivalent of the current instance
*/
virtual char ToChar(void) const;
*
* @since 2.0
*
- * @return A @c signed @c short equivalent of the current instance
+ * @return A @c signed @c short equivalent of the current instance
*/
virtual short ToShort(void) const;
*
* @since 2.0
*
- * @return A @c signed @c int equivalent of the current instance
+ * @return A @c signed @c int equivalent of the current instance
*/
virtual int ToInt(void) const;
*
* @since 2.0
*
- * @return A @c signed @c long equivalent of the current instance
+ * @return A @c signed @c long equivalent of the current instance
*/
virtual long ToLong(void) const;
*
* @since 2.0
*
- * @return A @c signed @c long @c long equivalent of the current instance
+ * @return A @c signed @c long @c long equivalent of the current instance
*/
virtual long long ToLongLong(void) const;
*
* @since 2.0
*
- * @return A @c signed @c float equivalent of the current instance
+ * @return A @c signed @c float equivalent of the current instance
*/
virtual float ToFloat(void) const;
*
* @since 2.0
*
- * @return A @c signed @c double equivalent of the current instance
+ * @return A @c signed @c double equivalent of the current instance
*/
virtual double ToDouble(void) const;
* @since 2.0
*
* @return A string containing a Unicode representation of the value of the current instance
- * @remarks
+ * @remarks
* - If the value of the current instance is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
* produces the result "Infinity". @n
* 6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
- * - The behavior of this method is dependent on the system default locale setting.
+ * - The behavior of this method is dependent on the system default locale setting.
*/
virtual String ToString(void) const;
*
* @return A string containing a Unicode representation of the specified @c double value
* @param[in] value A @c double value to convert
- * @remarks
- * - If the input value is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
+ * @remarks
+ * - If the input value is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
* produces the result "Infinity". @n
* 6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
- * - The behavior of this method is dependent on the system default locale setting.
+ * - The behavior of this method is dependent on the system default locale setting.
*/
static String ToString(double value);
* @since 2.0
*
* @return The bits that represent the floating-point number in the IEEE 754 floating-point "double format" bit layout
- * @param[in] value A @c double value to convert
+ * @param[in] value A @c double value to convert
*/
static long long ToBits(double value);
* @since 2.0
*
* @return The @c double floating-point value with the same bit pattern
- * @param[in] value The floating-point value to convert
+ * @param[in] value The floating-point value to convert
*/
static double ToDoubleFromBits(long long value);
*
* @return @c true if the specified value equals negative or positive infinity, @n
* else @c false
- * @param[in] value A @c double value to check
+ * @param[in] value A @c double value to check
*/
-
static bool IsInfinity(double value);
/**
*
* @return @c true if the specified value is Not-a-Number, @n
* else @c false
- * @param[in] value A @c double value to check
+ * @param[in] value A @c double value to check
*/
static bool IsNaN(double value);
*/
double value;
-
private:
/**
* Checks if the specified @c double value is finite.
static const int __DBL_MAX_10_EXP = 308;
friend class _DoubleImpl;
- class _DoubleImpl * __pDoubleImpl;
+ class _DoubleImpl* __pDoubleImpl;
}; // Double
-
}} // Tizen::Base
-
-#endif //_FBASE_DOUBLE_H_
+#endif //_FBASE_DOUBLE_H_
\ No newline at end of file
#include <FBaseObject.h>
#include <FBaseColIComparer.h>
-
namespace Tizen { namespace Base
{
/**
* @since 2.0
*
* @return An error code
- * @param[in] obj1 The first instance of type Double
- * @param[in] obj2 The second instance of type Double
+ * @param[in] obj1 The first instance of type Double
+ * @param[in] obj2 The second instance of type Double
* @param[out] cmp The result of comparison
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The specified object instances are not of the expected type.
* @remarks The value of @c cmp can be:
*
- * @code
+ * @code
* < 0 if the value of @c obj1 is less than the value of @c obj2
* == 0 if the value of @c obj1 is equal to the value of @c obj2
* > 0 if the value of @c obj1 is greater than the value of @c obj2
*/
virtual result Compare(const Tizen::Base::Object& obj1, const Tizen::Base::Object& obj2, int& cmp) const;
-
private:
/**
* The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
DoubleComparer& operator =(const DoubleComparer& rhs);
friend class _DoubleComparerImpl;
- class _DoubleComparerImpl * __pDoubleComparerImpl;
+ class _DoubleComparerImpl* __pDoubleComparerImpl;
}; // DoubleComparer
-
}} // Tizen::Base
-
-#endif // _FBASE_DOUBLE_COMPARER_H_
+#endif // _FBASE_DOUBLE_COMPARER_H_
\ No newline at end of file
* This header file contains the declarations of the %DoubleMatrix class.
*
*/
-
#ifndef _FBASE_DOUBLE_MATRIX_H_
#define _FBASE_DOUBLE_MATRIX_H_
*
* @param[in] rowCount The number of rows in the current instance
* @param[in] columnCount The number of columns in the current instance
- * @param[in] pArray A one-dimensional array @n The array must be at least row * column in length.
+ * @param[in] pArray A one-dimensional array @n The array must be at least row * column in length.
* @param[in] rowMajor Set to @c true to copy the array in row-major order, @n
- * else @c copy in column-major order
+ * else @c copy in column-major order
*/
DoubleMatrix(int rowCount, int columnCount, const double* pArray, bool rowMajor = true);
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
- * else @c false
+ * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
* @param[in] rhs An instance of %DoubleMatrix
*/
bool operator ==(const DoubleMatrix& rhs) const;
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
- * else @c false
+ * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
* @param[in] rhs An instance of %DoubleMatrix
*/
bool operator !=(const DoubleMatrix& rhs) const;
*
* @since 2.0
*
- * @return The reference to this instance
+ * @return The reference to this instance
* @param[in] rhs An instance of %DoubleMatrix
* @exception E_INVALID_ARG Either row or column count of the current instance is not same with that of the specified instance.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If either row or column count of the current instance is not same with that of the specified instance,
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks If either row or column count of the current instance is not same with that of the specified instance,
* return the reference to this instance without assigning.
*/
DoubleMatrix& operator =(const DoubleMatrix& rhs);
*
* @since 2.0
*
- * @return @c true if the values of the current instance are equal to the value of the specified instance, @n
- * else @c false
+ * @return @c true if the values of the current instance are equal to the value of the specified instance, @n
+ * else @c false
* @param[in] obj An instance of %DoubleMatrix
- * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances.
+ * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @return The hash value of the current instance
+ * @remarks Two equal instances must return the same hash value. For better performance,
* the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
*
* @since 2.0
*
- * @return The number of column in the current instance
+ * @return The number of column in the current instance
*/
int GetColumnCount(void) const;
*
* @since 2.0
*
- * @return A pointer to @c double array
+ * @return A pointer to @c double array
* @param[in] columnIndex The target column number in the current instance
* @exception E_INVALID_ARG The @c columnIndex is larger than the column count of the current instance.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
double* GetColumnN(int columnIndex) const;
*
* @since 2.0
*
- * @return The determinant value of the current instance
+ * @return The determinant value of the current instance
* @exception E_INVALID_OPERATION The current instance is not a square matrix.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks If the current instance is not a square matrix, return zero.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks If the current instance is not a square matrix, return zero.
*/
double GetDeterminant(void) const;
*
* @since 2.0
*
- * @return The value at the specified row and column of the current instance
+ * @return The value at the specified row and column of the current instance
* @param[in] rowIndex The target row number in the current instance
* @param[in] columnIndex The target column number in the current instance
* @exception E_INVALID_ARG The @c columnIndex or @c rowIndex is larger than that of the current instance.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
double GetElement(int rowIndex, int columnIndex) const;
*
* @since 2.0
*
- * @return A pointer to the instance of %DoubleMatrix containing the resulting value of the operation
+ * @return A pointer to the instance of %DoubleMatrix containing the resulting value of the operation
* @exception E_INVALID_OPERATION The current instance is not a square matrix.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
DoubleMatrix* GetInverseN(void) const;
*
* @since 2.0
*
- * @return A pointer to @c double array
+ * @return A pointer to @c double array
* @param[in] rowIndex The target row number in the current instance
* @exception E_INVALID_ARG The @c rowIndex is larger than the row count of the current instance.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
double* GetRowN(int rowIndex) const;
*
* @since 2.0
*
- * @return A pointer to the instance of %DoubleMatrix containing the resulting value of the operation
+ * @return A pointer to the instance of %DoubleMatrix containing the resulting value of the operation
* @exception E_INVALID_OPERATION The current instance is not a square matrix.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
+ * @remarks The specific error code can be accessed using the GetLastResult() method.
*/
DoubleMatrix* GetTransposeN(void) const;
*
* @since 2.0
*
- * @return @c true if the matrix is an identity matrix, @n
- * else @c false
+ * @return @c true if the matrix is an identity matrix, @n
+ * else @c false
*/
bool IsIdentity(void) const;
*
* @since 2.0
*
- * @return @c true if the matrix is invertible, @n
- * else @c false
+ * @return @c true if the matrix is invertible, @n
+ * else @c false
*/
bool IsInvertible(void) const;
* @since 2.0
*
* @return An error code
- * @param[in] columnIndex The target column number in the current instance
+ * @param[in] columnIndex The target column number in the current instance
* @param[in] pArray An array which includes the values @n The array must be at least row in length.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The @c pArray is @c null, or the @c columnIndex is larger than the column count of the current instance.
* @since 2.0
*
* @return An error code
- * @param[in] rowIndex The target row number in the current instance
+ * @param[in] rowIndex The target row number in the current instance
* @param[in] pArray An array which includes the values @n The array must be at least column in length.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The @c pArray is @c null, or the @c rowIndex is larger than the row count of the current instance.
* @return An error code
* @param[in] pArray A one-dimensional array @n The array must be at least row * column in length.
* @param[in] rowMajor Set to @c true to copy the array in row-major order, @n
- * else @c copy in column-major order
+ * else @c copy in column-major order
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The @c pArray is @c null.
*/
int __column;
}; // DoubleMatrix
-
}} // Tizen::Base
-
-#endif //_FBASE_DOUBLE_MATRIX_H_
+#endif //_FBASE_DOUBLE_MATRIX_H_
\ No newline at end of file
* This header file contains the declarations of the %DoubleMatrix3 class.
*
*/
-
#ifndef _FBASE_DOUBLE_MATRIX3_H_
#define _FBASE_DOUBLE_MATRIX3_H_
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
- * else @c false
+ * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
* @param[in] rhs An instance of %DoubleMatrix3
*/
bool operator ==(const DoubleMatrix3& rhs) const;
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
- * else @c false
+ * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
* @param[in] rhs An instance of %DoubleMatrix3
*/
bool operator !=(const DoubleMatrix3& rhs) const;
*
* @since 2.0
*
- * @return The reference to this instance
+ * @return The reference to this instance
* @param[in] rhs An instance of %DoubleMatrix3
*/
DoubleMatrix3& operator =(const DoubleMatrix3& rhs);
*
* @since 2.0
*
- * @return The reference to this instance
+ * @return The reference to this instance
* @param[in] value A @c double value to assign
*/
DoubleMatrix3& operator =(double value);
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix3
*/
DoubleMatrix3 operator *(const DoubleMatrix3& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to multiply
*/
DoubleMatrix3 operator *(double value) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix3
*/
DoubleMatrix3 operator +(const DoubleMatrix3& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to add
*/
DoubleMatrix3 operator +(double value) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix3
*/
DoubleMatrix3 operator -(const DoubleMatrix3& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to subtract
*/
DoubleMatrix3 operator -(double value) const;
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix3
*/
DoubleMatrix3& operator *=(const DoubleMatrix3& rhs);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to multiply
*/
DoubleMatrix3& operator *=(double value);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix3
*/
DoubleMatrix3& operator +=(const DoubleMatrix3& rhs);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to add
*/
DoubleMatrix3& operator +=(double value);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix3
*/
DoubleMatrix3& operator -=(const DoubleMatrix3& rhs);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to subtract
*/
DoubleMatrix3& operator -=(double value);
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to add
* @param[in] rhs An instance of %DoubleMatrix3
*/
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to multiply
* @param[in] rhs An instance of %DoubleMatrix3
*/
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
* @param[in] value A @c double value to subtract
* @param[in] rhs An instance of %DoubleMatrix3
*/
*
* @since 2.0
*
- * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
- * else @c false
+ * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
+ * else @c false
* @param[in] obj An instance of %DoubleMatrix3
- * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances.
+ * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @return The hash value of the current instance
+ * @remarks Two equal instances must return the same hash value. For better performance,
* the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
*
* @since 2.0
*
- * @return The determinant value of the current instance
+ * @return The determinant value of the current instance
*/
double GetDeterminant(void) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
- * @remarks This function must be called after checking whether the matrix is invertible or not.
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @remarks This function must be called after checking whether the matrix is invertible or not.
*/
DoubleMatrix3 GetInverse(void) const;
*
* @since 2.0
*
- * @return The trace of the current instance
+ * @return The trace of the current instance
*/
double GetTrace(void) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix3 containing the resulting value of the operation
*/
DoubleMatrix3 GetTranspose(void) const;
*
* @since 2.0
*
- * @return @c true if the matrix is an identity matrix, @n
- * else @c false
+ * @return @c true if the matrix is an identity matrix, @n
+ * else @c false
*/
bool IsIdentity(void) const;
*
* @since 2.0
*
- * @return @c true if the matrix is invertible, @n
- * else @c false
+ * @return @c true if the matrix is invertible, @n
+ * else @c false
*/
bool IsInvertible(void) const;
*
* @since 2.0
*
- * @remarks The column-major order matrix.
+ * @remarks The column-major order matrix.
*/
double matrix[3][3];
class _DoubleMatrix3Impl* __pImpl;
}; // DoubleMatrix3
-
-}}// Tizen::Base
-
-#endif //_FBASE_DOUBLE_MATRIX3_H_
+}} // Tizen::Base
+#endif //_FBASE_DOUBLE_MATRIX3_H_
\ No newline at end of file
* This header file contains the declarations of the %DoubleMatrix4 class.
*
*/
-
#ifndef _FBASE_DOUBLE_MATRIX4_H_
#define _FBASE_DOUBLE_MATRIX4_H_
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
- * else @c false
+ * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
* @param[in] rhs An instance of %DoubleMatrix4
*/
bool operator ==(const DoubleMatrix4& rhs) const;
*
* @since 2.0
*
- * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
- * else @c false
+ * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n
+ * else @c false
* @param[in] rhs An instance of %DoubleMatrix4
*/
bool operator !=(const DoubleMatrix4& rhs) const;
*
* @since 2.0
*
- * @return The reference to this instance
+ * @return The reference to this instance
* @param[in] rhs An instance of %DoubleMatrix4
*/
DoubleMatrix4& operator =(const DoubleMatrix4& rhs);
*
* @since 2.0
*
- * @return The reference to this instance
+ * @return The reference to this instance
* @param[in] value A @c double value to assign
*/
DoubleMatrix4& operator =(double value);
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix4
*/
DoubleMatrix4 operator *(const DoubleMatrix4& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to multiply
*/
DoubleMatrix4 operator *(double value) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix4
*/
DoubleMatrix4 operator +(const DoubleMatrix4& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to add
*/
DoubleMatrix4 operator +(double value) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix4
*/
DoubleMatrix4 operator -(const DoubleMatrix4& rhs) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to subtract
*/
DoubleMatrix4 operator -(double value) const;
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix4
*/
DoubleMatrix4& operator *=(const DoubleMatrix4& rhs);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to multiply
*/
DoubleMatrix4& operator *=(double value);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix4
*/
DoubleMatrix4& operator +=(const DoubleMatrix4& rhs);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to add
*/
DoubleMatrix4& operator +=(double value);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
* @param[in] rhs An instance of %DoubleMatrix4
*/
DoubleMatrix4& operator -=(const DoubleMatrix4& rhs);
*
* @since 2.0
*
- * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
+ * @return The reference to %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to subtract
*/
DoubleMatrix4& operator -=(double value);
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to add
* @param[in] rhs An instance of %DoubleMatrix4
*/
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to multiply
* @param[in] rhs An instance of %DoubleMatrix4
*/
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
* @param[in] value A @c double value to subtract
* @param[in] rhs An instance of %DoubleMatrix4
*/
*
* @since 2.0
*
- * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
- * else @c false
+ * @return @c true if the values of the current instance is equal to the value of the specified instance, @n
+ * else @c false
* @param[in] obj An instance of %DoubleMatrix4
- * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances.
+ * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances.
*/
virtual bool Equals(const Tizen::Base::Object& obj) const;
*
* @since 2.0
*
- * @return The hash value of the current instance
- * @remarks Two equal instances must return the same hash value. For better performance,
+ * @return The hash value of the current instance
+ * @remarks Two equal instances must return the same hash value. For better performance,
* the used hash function must generate a random distribution for all inputs.
*/
virtual int GetHashCode(void) const;
*
* @since 2.0
*
- * @return The determinant value of the current instance
+ * @return The determinant value of the current instance
*/
double GetDeterminant(void) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
- * @remarks This function must be called after checking whether the matrix is invertible or not.
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @remarks This function must be called after checking whether the matrix is invertible or not.
*/
DoubleMatrix4 GetInverse(void) const;
*
* @since 2.0
*
- * @return The trace of the current instance
+ * @return The trace of the current instance
*/
double GetTrace(void) const;
*
* @since 2.0
*
- * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
+ * @return A new instance of %DoubleMatrix4 containing the resulting value of the operation
*/
DoubleMatrix4 GetTranspose(void) const;
*
* @since 2.0
*
- * @return @c true if the matrix is an identity matrix, @n
- * else @c false
+ * @return @c true if the matrix is an identity matrix, @n
+ * else @c false
*/
bool IsIdentity(void) const;
*
* @since 2.0
*
- * @return @c true if the matrix is invertible, @n
- * else @c false
+ * @return @c true if the matrix is invertible, @n
+ * else @c false
*/
bool IsInvertible(void) const;
*
* @since 2.0
*
- * @remarks The column-major order matrix.
+ * @remarks The column-major order matrix.
*/
double matrix[4][4];
class _DoubleMatrix4Impl* __pImpl;
}; // DoubleMatrix4
-
}} // Tizen::Base
-
-#endif //_FBASE_DOUBLE_MATRIX4_H_
+#endif //_FBASE_DOUBLE_MATRIX4_H_
\ No newline at end of file
*
* This header file contains the definitions of error codes.
*/
-
#ifndef _FBASE_ERROR_DEFINE_H_
#define _FBASE_ERROR_DEFINE_H_
#include <FBaseTypes.h>
-
#define E_SEVERITY_POS 31
#define E_TYPE_POS 29
-#define SET_E_SEVERITY(X) (static_cast<unsigned long>(PUT_MASK(0, (X), E_SEVERITY_POS)))
-#define SET_E_TYPE(X) (static_cast<unsigned long>(PUT_MASK(0, (X), E_TYPE_POS)))
-#define SET_E_CAUSE(X) (static_cast<unsigned long>(X))
-
+#define SET_E_SEVERITY(X) (static_cast< unsigned long >(PUT_MASK(0, (X), E_SEVERITY_POS)))
+#define SET_E_TYPE(X) (static_cast< unsigned long >(PUT_MASK(0, (X), E_TYPE_POS)))
+#define SET_E_CAUSE(X) (static_cast< unsigned long >(X))
// Error severities
#define E_SUCCESS (SET_E_SEVERITY(0))
#define E_FAILURE (SET_E_SEVERITY(1))
-
// Error types
#define ERR_SRC_FRAMEWORK (E_FAILURE + SET_E_TYPE(1))
#define ERR_SRC_USER (E_FAILURE + SET_E_TYPE(2))
-
// Macros for error codes
-#define IsFailed(X) (static_cast<long>(X) != E_SUCCESS)
-
+#define IsFailed(X) (static_cast< long >(X) != E_SUCCESS)
-#endif //_FBASE_ERROR_DEFINE_H_
+#endif //_FBASE_ERROR_DEFINE_H_
\ No newline at end of file
#include <FBaseErrorDefine.h>
-
//----------------------------------------------------------------------------A
/** (specialized) Thrown when network address is changed externally. */
#define E_ADDRESS_CHANGED (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1100))
/** Thrown when a required account does not exist. */
#define E_ACCOUNT_NOT_FOUND (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1108))
-
//----------------------------------------------------------------------------B
//----------------------------------------------------------------------------C
* during an input operation. */
#define E_END_OF_FILE (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1503))
-
//----------------------------------------------------------------------------F
-// Thrown when the requested operation fails by undefined reason.
-//#define E_FAILURE (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1600))
/** (specialized) Thrown when application tries to call with a number which is
* not allowed in FDN mode, while the FDN mode is enabled. */
* fails. */
#define E_FILE_NOT_FOUND (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1602))
-
//----------------------------------------------------------------------------G
/** Thrown when a required group does not exist. */
#define E_GROUP_NOT_FOUND (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1700))
-
//----------------------------------------------------------------------------H
/** Thrown the destination host is not found. */
#define E_HOST_NOT_FOUND (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1800))
/** Thrown the Http transaction is canceled by user. */
#define E_HTTP_USER (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1802))
-
//----------------------------------------------------------------------------I
/** Thrown when the user does not have proper permissions. */
#define E_ILLEGAL_ACCESS (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1900))
/** Thrown when the specified password has invalid format. */
#define E_INVALID_PASSWORD (ERR_SRC_FRAMEWORK + SET_E_CAUSE(1933))
-
//----------------------------------------------------------------------------J
//----------------------------------------------------------------------------K
/** Thrown when a specified member already exists. */
#define E_MEMBER_ALREADY_EXIST (ERR_SRC_FRAMEWORK + SET_E_CAUSE(2304))
-
//----------------------------------------------------------------------------N
/** General network exception. */
#define E_NETWORK_FAILED (ERR_SRC_FRAMEWORK + SET_E_CAUSE(2400))
* registered log scope is not matched with query condition (log type or log provider) specified in Query() API. */
#define E_OBJ_NOT_REGISTERED (ERR_SRC_FRAMEWORK + SET_E_CAUSE(2510))
-
//----------------------------------------------------------------------------P
/** (specialized) Thrown when the requested Bluetooth pairing fails. */
#define E_PAIRING_FAILED (ERR_SRC_FRAMEWORK + SET_E_CAUSE(2600))
/** Thrown when the right to get served has expired. */
#define E_RIGHT_EXPIRED (ERR_SRC_FRAMEWORK + SET_E_CAUSE(2805))
-/** Thrown when there is no right. */
+/** Thrown when there is no right. */
#define E_RIGHT_NO_LICENSE (ERR_SRC_FRAMEWORK + SET_E_CAUSE(2806))
/** Thrown when the right is for future use. */
/** Thrown when a service is deactivated. */
#define E_SERVICE_DEACTIVATED (ERR_SRC_FRAMEWORK + SET_E_CAUSE(2915))
-
//----------------------------------------------------------------------------T
/** (specialized) Thrown then the specified table does not exist. */
#define E_TABLE_NOT_FOUND (ERR_SRC_FRAMEWORK + SET_E_CAUSE(3000))
/** Thrown when the specified type does not match. */
#define E_TYPE_MISMATCH (ERR_SRC_FRAMEWORK + SET_E_CAUSE(3002))
-
//----------------------------------------------------------------------------U
/** Thrown when the operation causes an underflow. */
#define E_UNDERFLOW (ERR_SRC_FRAMEWORK + SET_E_CAUSE(3100))
/** Thrown when the specified object would cause a deadlock. */
#define E_WOULD_DEADLOCK (ERR_SRC_FRAMEWORK + SET_E_CAUSE(3301))
-
//----------------------------------------------------------------------------X
//----------------------------------------------------------------------------Y
//----------------------------------------------------------------------------Z
-
//-----------------------------------------------------------------------------
-#endif // _FBASE_ERRORS_H_
+#endif // _FBASE_ERRORS_H_
\ No newline at end of file
/**
* Adds a certificate to the certificate chain.
- * The order of certificaett addition should be
- * 1. Add user certificate.
- * 2. Add intermediate certificate.
- * 3. Add root CA certificate.
+ * The order of certificates should be as follows: @n
+ * 1. User certificate.
+ * 2. Intermediate certificate.
+ * 3. Root CA certificate.
*
* @since 2.0
*
virtual Tizen::Base::String GetFormat(void) const;
/**
- * Adds a certificate to the certificate chain.
- * The order of certificaett addition should be
- * 1. Add user certificate.
- * 2. Add intermediate certificate.
- * 3. Add root CA certificate.
+ * Adds a certificate to the certificate chain.
+ * The order of certificates should be as follows: @n
+ * 1. User certificate.
+ * 2. Intermediate certificate.
+ * 3. Root CA certificate.
*
* @since 2.0
*
#include "FBase_NativeError.h"
#define ANY_PATTERN L"\\s*[^\\s]*"
-#define DEFAULT_DELIMITER_PATTERN L"\\s*"
+#define DEFAULT_DELIMITER_PATTERN L"\\s+"
+#define DEFAULT_DELIMITER_PATTERN_ZERO_OR_MORE L"\\s*"
#define COMPLETE_LINE_PATTERN L".*(\r\n|[\u000A\n\r\u2028\u2029\u0085])|.+$"
#define DEFAULT_LINE_SEPARATOR_PATTERN L"[\u000A\n\r\u2028\u2029\u0085]*"
bool _ScannerImpl::HasNextToken(void)
{
- String pattern(ANY_PATTERN);
- return HasNextToken(pattern);
+ String token;
+ int length = 0;
+
+ result r = GetNextTokenWithoutPattern(token, length);
+ SysTryLogReturn(NID_BASE_UTIL, r == E_SUCCESS, false, "Can not get the next token");
+
+ return true;
}
bool _ScannerImpl::HasNextToken(const RegularExpression& pattern)
bool _ScannerImpl::HasNextToken(const String& pattern)
{
- result r = E_SUCCESS;
- String token;
+ RegularExpression regex;
+ ArrayList matchedStrList;
int length = 0;
+ String out;
- r = GetNextToken(pattern, token, length);
- SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_DATA_NOT_FOUND, "[%s] Can not get the next token", GetErrorMessage(E_DATA_NOT_FOUND));
+ result r = GetNextTokenWithoutPattern(out, length);
+ SysTryLogReturn(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, false, "Input has no remaining tokens");
+
+ SysTryLogReturn(NID_BASE_UTIL, r == E_SUCCESS, false, "The next token does not match to the pattern");
+
+ r = regex.Construct(pattern, REGEX_UNICODE);
+ SysTryLogReturn(NID_BASE_UTIL, r == E_SUCCESS, false, "Regular expression construction failed");
+
+ r = matchedStrList.Construct();
+ SysTryLogReturn(NID_BASE_UTIL, r == E_SUCCESS, false, "Arraylist construction failed");
+
+ bool res = regex.Match(out, true, &matchedStrList);
+ SysTryLogReturn(NID_BASE_UTIL, res, res, "Match Failed");
return true;
}
result _ScannerImpl::GetNextToken(String& nextStr)
{
- result r = E_SUCCESS;
- String pattern(ANY_PATTERN);
int length = 0;
- r = GetNextToken(pattern, nextStr, length);
+ result r = GetNextTokenWithoutPattern(nextStr, length);
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_ENOUGH, "Can not get the next token");
__position = __position + length;
result _ScannerImpl::GetNextToken(const String& pattern, String& nextStr)
{
- result r = E_SUCCESS;
- int length1 = 0;
- int length2 = 0;
+ RegularExpression regex;
+ ArrayList matchedStrList;
+ int length = 0;
+ String out;
- String str1;
- String str2;
- String anyPattern(ANY_PATTERN);
+ result r = GetNextTokenWithoutPattern(out, length);
+ SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
- while (true)
- {
- r = GetNextToken(anyPattern, str1, length1);
- SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
- SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "The next token does not match to the pattern");
+ SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "The next token does not match to the pattern");
- r = GetNextToken(pattern, str2, length2);
- SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
- SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "The next token does not match to the pattern");
+ r = regex.Construct(pattern, REGEX_UNICODE);
+ SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "Regular expression construction failed");
- if(str1 == str2)
- {
- nextStr = str1;
- __position = __position + length2;
- break;
- }
- else
- {
- nextStr = L"";
- __position = __position + length1;
- }
- }
+ r = matchedStrList.Construct();
+ SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "Arraylist construction failed");
- return r;
+ bool res = regex.Match(out, true, &matchedStrList);
+ SysTryReturnResult(NID_BASE_UTIL, res, E_DATA_NOT_FOUND, "Match Failed");
+
+ nextStr = out;
+ __position = __position + length;
+ return E_SUCCESS;
}
result _ScannerImpl::GetNextSignedChar(signed char& nextSignedChar)
result _ScannerImpl::GetNextSignedChar(signed char& nextSignedChar, int radix)
{
- result r = E_SUCCESS;
String out;
int length = 0;
char ch = 0x00;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_NUM_FORMAT, "Can not parse the token to signed char");
bool _ScannerImpl::IsNextTokenConvertibleToSignedChar(int radix)
{
- result r = E_SUCCESS;
String out;
int length = 0;
- String pattern(ANY_PATTERN);
char ch = 0;
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_NUM_FORMAT, "[%s] Can not get the next token as signed char", GetErrorMessage(E_NUM_FORMAT));
r = Int8::Parse(out, radix, ch);
result _ScannerImpl::GetNextInt(int& nextInt, int radix)
{
- result r = E_SUCCESS;
String out;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_NUM_FORMAT, "Can not parse the token to integer");
bool _ScannerImpl::IsNextTokenConvertibleToInt(int radix)
{
- result r = E_SUCCESS;
String out;
int val = 0;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_NUM_FORMAT, "[%s] Can not get the next token as integer", GetErrorMessage(E_NUM_FORMAT));
out.Replace(DEFAULT_GROUP_SEPARATOR, L"");
result _ScannerImpl::GetNextShort(short& nextShort, int radix)
{
- result r = E_SUCCESS;
String out;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_NUM_FORMAT, "Can not parse the token to short");
bool _ScannerImpl::IsNextTokenConvertibleToShort(int radix)
{
- result r = E_SUCCESS;
String out;
short val = 0;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_NUM_FORMAT, "[%s] Can not get next token as short", GetErrorMessage(E_NUM_FORMAT));
out.Replace(DEFAULT_GROUP_SEPARATOR, L"");
result _ScannerImpl::GetNextLongLong(long long& nextLongLong, int radix)
{
- result r = E_SUCCESS;
String out;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_NUM_FORMAT, "Can not parse the token to long long");
bool _ScannerImpl::IsNextTokenConvertibleToLongLong(void)
{
- result r = E_SUCCESS;
String out;
long long val = 0;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_NUM_FORMAT, "[E_NUM_FORMAT] Can not get next token as long long");
r = LongLong::Parse(out, val);
result _ScannerImpl::GetNextFloat(float& nextFloat)
{
- result r = E_SUCCESS;
String out;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_NUM_FORMAT, "Can not parse the token to float");
bool _ScannerImpl::IsNextTokenConvertibleToFloat(void)
{
- result r = E_SUCCESS;
String out;
RegularExpression re;
float val = 0.0f;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_NUM_FORMAT, "[%s] Can not get next token as float", GetErrorMessage(E_NUM_FORMAT));
out.Replace(DEFAULT_GROUP_SEPARATOR, L"");
result _ScannerImpl::GetNextDouble(double& nextDouble)
{
- result r = E_SUCCESS;
String out;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_NUM_FORMAT, "Can not parse the token to double");
bool _ScannerImpl::IsNextTokenConvertibleToDouble(void)
{
- result r = E_SUCCESS;
String out;
double val = 0.0f;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_NUM_FORMAT, "[%s] Can not get next token as double", GetErrorMessage(E_NUM_FORMAT));
out.Replace(DEFAULT_GROUP_SEPARATOR, L"");
result _ScannerImpl::GetNextBool(bool& nextBool)
{
- result r = E_SUCCESS;
String out;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturnResult(NID_BASE_UTIL, r != E_DATA_NOT_ENOUGH, E_DATA_NOT_ENOUGH, "Input has no remaining tokens");
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_NUM_FORMAT, "Can not parse the token to bool");
bool _ScannerImpl::IsNextTokenConvertibleToBool(void)
{
- result r = E_SUCCESS;
String out;
- bool ret = false;
int length = 0;
- String pattern(ANY_PATTERN);
- r = GetNextToken(pattern, out, length);
+ result r = GetNextTokenWithoutPattern(out, length);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_NUM_FORMAT, "[%s] Can not get next token as bool", GetErrorMessage(E_NUM_FORMAT));
String temp;
out.ToUpper(temp);
- if((!temp.CompareTo(L"TRUE")) || (!temp.CompareTo(L"FALSE")))
- {
- ret = true;
- }
- else
- {
- ret = false;
- }
-
- return ret;
+ return ((!temp.CompareTo(L"TRUE")) || (!temp.CompareTo(L"FALSE")));
}
bool _ScannerImpl::HasNextLine(void)
{
- result r = E_SUCCESS;
String pattern(DEFAULT_LINE_SEPARATOR_PATTERN);
RegularExpression regex;
ArrayList matchedStrList;
- bool res = false;
- r = regex.Construct(pattern, REGEX_UNICODE);
+ result r = regex.Construct(pattern, REGEX_UNICODE);
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_DATA_NOT_ENOUGH, "[%s] Regular expression construction failed", GetErrorMessage(E_DATA_NOT_ENOUGH));
r = matchedStrList.Construct();
SysTryReturn(NID_BASE_UTIL, r == E_SUCCESS, false, E_DATA_NOT_ENOUGH, "[%s] Arraylist construction failed", GetErrorMessage(E_DATA_NOT_ENOUGH));
- res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
+ bool res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
SysTryReturn(NID_BASE_UTIL, res == true, false, E_DATA_NOT_ENOUGH, "[%s] Match Failed", GetErrorMessage(E_DATA_NOT_ENOUGH));
return res;
result _ScannerImpl::GetNextLine(String& nextLine)
{
- result r = E_SUCCESS;
String pattern(COMPLETE_LINE_PATTERN);
RegularExpression regex;
ArrayList matchedStrList;
- bool res = false;
- int matches = 0;
- r = regex.Construct(pattern, REGEX_UNICODE);
+ result r = regex.Construct(pattern, REGEX_UNICODE);
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_ENOUGH, "Regular expression construction failed");
r = matchedStrList.Construct();
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_ENOUGH, "Arraylist construction failed");
- res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
+ bool res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
SysTryReturnResult(NID_BASE_UTIL, res == true, E_DATA_NOT_ENOUGH, "Match Failed");
- matches = matchedStrList.GetCount();
- if(matches > 0)
- {
- String temp = *(String *)matchedStrList.GetAt(0);
- __position = __position + temp.GetLength();
-
- RegularExpression re;
- r = re.Construct(DEFAULT_LINE_SEPARATOR_PATTERN, REGEX_UNICODE);
- re.Replace(temp, L"", true);
- nextLine = temp;
+ int matches = matchedStrList.GetCount();
+ SysTryReturnResult(NID_BASE_UTIL,matches > 0, E_DATA_NOT_FOUND, "Match Failed");
+
+ String temp = *(String *)matchedStrList.GetAt(0);
+ __position = __position + temp.GetLength();
- matchedStrList.RemoveAll();
- }
-
- return r;
+ RegularExpression re;
+ r = re.Construct(DEFAULT_LINE_SEPARATOR_PATTERN, REGEX_UNICODE);
+ re.Replace(temp, L"", true);
+ nextLine = temp;
+ matchedStrList.RemoveAll();
+ return E_SUCCESS;
}
result _ScannerImpl::FindInLine(const String& str, String& MatchedStr)
{
- result r = E_SUCCESS;
_RegularExpressionImpl regex;
ArrayList matchedStrList;
- bool res = false;
- int matches = 0;
- r = regex.Construct(str, REGEX_UNICODE);
+ result r = regex.Construct(str, REGEX_UNICODE);
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "Regular expression construction failed");
r = matchedStrList.Construct();
SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "Arraylist construction failed");
- res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
+ bool res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
SysTryReturnResult(NID_BASE_UTIL, res == true, E_DATA_NOT_FOUND, "Match Failed");
- matches = matchedStrList.GetCount();
- if(matches > 0)
- {
- MatchedStr = *(String *)matchedStrList.GetAt(0);
- int matchEnd = regex.GetLastMatchEnd();
- __position = __position + matchEnd;
- matchedStrList.RemoveAll();
- }
- return r;
+ int matches = matchedStrList.GetCount();
+ SysTryReturnResult(NID_BASE_UTIL,matches > 0, E_DATA_NOT_FOUND, "Match Failed");
+
+ MatchedStr = *(String *)matchedStrList.GetAt(0);
+ int matchEnd = regex.GetLastMatchEnd();
+ __position = __position + matchEnd;
+ matchedStrList.RemoveAll();
+ return E_SUCCESS;
}
result _ScannerImpl::FindInLine(const RegularExpression& pattern, String& MatchedStr)
void _ScannerImpl::Skip(const String& str)
{
- result r = E_SUCCESS;
RegularExpression regex;
ArrayList matchedStrList;
- bool res = false;
- int matches = 0;
+ String inputStr(__pParseStr + __position);
- r = regex.Construct(str, REGEX_UNICODE);
- SysTryCatch(NID_BASE_UTIL, r == E_SUCCESS, , r, "[%s] Regular expression construction failed", GetErrorMessage(r));
+ result r = regex.Construct(str, REGEX_UNICODE);
+ SysTryReturnVoidResult(NID_BASE_UTIL, r == E_SUCCESS, r,"Regular expression construction failed");
r = matchedStrList.Construct();
- SysTryCatch(NID_BASE_UTIL, r == E_SUCCESS, , r, "[%s] ArrayList construction failed", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_BASE_UTIL, r == E_SUCCESS, r, "ArrayList construction failed");
- res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
- SysTryCatch(NID_BASE_UTIL, res == true, , E_SYSTEM, "[%s] Regular expression match failed", GetErrorMessage(E_SYSTEM));
+ bool res = regex.Match(inputStr, false, &matchedStrList);
+ SysTryReturnVoidResult(NID_BASE_UTIL, res == true, E_SYSTEM, "Regular expression match failed");
- matches = matchedStrList.GetCount();
- if(matches > 0)
- {
- String temp = *(String *)matchedStrList.GetAt(0);
- int length = temp.GetLength();
- const wchar_t* wstr1 = temp.GetPointer();
- const wchar_t* wstr2 = __pParseStr + __position;
- bool isSame = true;
-
- while(*wstr1 != 0x0000)
- {
- if(*wstr1++ != *wstr2++)
- {
- isSame = false;
- break;
- }
- }
- if(isSame == true)
- {
- __position = __position + length;
- }
- matchedStrList.RemoveAll();
+ int matches = matchedStrList.GetCount();
+ SysTryReturnVoidResult(NID_BASE_UTIL, matches > 0, E_SYSTEM,"Regular expression construction failed");
- //Skip if there is any delimiters before the next token
- RegularExpression re;
- r = re.Construct(DEFAULT_DELIMITER_PATTERN, REGEX_UNICODE);
- res = re.Match(String(__pParseStr + __position), false, &matchedStrList);
- matches = matchedStrList.GetCount();
- if(matches > 0)
- {
- String temp = *(String *)matchedStrList.GetAt(0);
- int length = temp.GetLength();
- __position = __position + length;
- matchedStrList.RemoveAll();
- }
-
- }
+ String skipToken = *(dynamic_cast< String* >(matchedStrList.GetAt(0)));
+ int length = skipToken.GetLength();
+ const wchar_t* wstr1 = skipToken.GetPointer();
+ const wchar_t* wstr2 = __pParseStr + __position;
+ bool isSame = true;
+
+ while (*wstr1 != 0x0000)
+ {
+ if (*wstr1++ != *wstr2++)
+ {
+ isSame = false;
+ break;
+ }
+ }
+ if (isSame)
+ {
+ __position = __position + length;
+ }
+ matchedStrList.RemoveAll();
+
+ //Skip if there is any delimiters before the next token
+ RegularExpression re;
+ if (__delimiter == DEFAULT_DELIMITER_PATTERN)
+ {
+ r = re.Construct(DEFAULT_DELIMITER_PATTERN_ZERO_OR_MORE, REGEX_UNICODE);
+ }
+ else
+ {
+ r = re.Construct(__delimiter, REGEX_UNICODE);
+ }
+
+ res = re.Match(String(__pParseStr + __position), false, &matchedStrList);
+ matches = matchedStrList.GetCount();
+ if (matches > 0)
+ {
+ String temp = *(dynamic_cast< String* >(matchedStrList.GetAt(0)));
+ int length = temp.GetLength();
+ __position = __position + length;
+ matchedStrList.RemoveAll();
+ }
-CATCH:
- return;
}
void _ScannerImpl::Skip(const RegularExpression& pattern)
}
}
-result _ScannerImpl::GetNextToken(const String& pattern, String& ret, int& length)
+
+result _ScannerImpl::GetNextTokenWithoutPattern(String& ret, int& length)
{
- result r = E_SUCCESS;
- SysTryReturnResult(NID_BASE_UTIL, __pParseStr + __position != null, E_DATA_NOT_ENOUGH, "Input has no remaining tokens.");
- SysTryReturnResult(NID_BASE_UTIL, *(__pParseStr + __position) != 0x0000, E_DATA_NOT_ENOUGH, "Input has no remaining tokens.");
+ SysTryReturnResult(NID_BASE_UTIL, ((__pParseStr + __position) != null) && ((*(__pParseStr + __position) != 0x0000)),
+ E_DATA_NOT_ENOUGH, "Input has no remaining tokens.");
+
+ RegularExpression regDelim;
+ result r = regDelim.Construct(__delimiter, REGEX_UNICODE);
+ SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "Regular expression construction failed");
- RegularExpression regex;
ArrayList matchedStrList;
- bool res = false;
- int matches = 0;
- String regPattern(pattern);
+ r = matchedStrList.Construct();
+ SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_DATA_NOT_FOUND, "Arraylist construction failed");
- regPattern.Append(__delimiter);
+ String inputStr(__pParseStr + __position);
+ bool res = regDelim.Match(inputStr, false, &matchedStrList);
- r = regex.Construct(regPattern, REGEX_UNICODE);
- SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_OPERATION_FAILED, "Regular expression construction failed");
+ int matches = matchedStrList.GetCount();
+ if (matches > 0)
+ {
+ String delimiter1 = *(dynamic_cast< String* >(matchedStrList.GetAt(0)));
- r = matchedStrList.Construct();
- SysTryReturnResult(NID_BASE_UTIL, r == E_SUCCESS, E_OPERATION_FAILED, "Arraylist construction failed");
+ if (!delimiter1.IsEmpty()) // 1st delimiter is not empty
+ {
+ int delimLength1 = delimiter1.GetLength();
+ int index1 = 0;
+ inputStr.IndexOf(delimiter1, 0, index1);
- res = regex.Match(String(__pParseStr + __position), false, &matchedStrList);
- SysTryReturnResult(NID_BASE_UTIL, res == true, E_OPERATION_FAILED, "Match Failed");
+ // When the delimiter exists in first position, find the 2nd delimiter
+ if ((index1 == 0) && (__position == 0))
+ {
+ length += delimLength1;
+ String tmpStr(__pParseStr + length);
- matches = matchedStrList.GetCount();
- if(matches > 0)
+ matchedStrList.RemoveAll();
+ res = regDelim.Match(tmpStr, false, &matchedStrList);
+ matches = matchedStrList.GetCount();
+ if (matches > 0)
+ {
+ String delimiter2 = *(dynamic_cast< String* >(matchedStrList.GetAt(0)));
+
+ // If the 2nd delimiter is empty, the token will be one character followed by 1st delimiter.
+ if (delimiter2.IsEmpty())
+ {
+ ret.Clear();
+ ret.Append(*(__pParseStr + length));
+ length += 1;
+ // Though 2nd delimiter is empty, if 3rd non-empty delimiter exists right after the token, length to be moved should be added by 3rd delimiter.
+ matchedStrList.RemoveAll();
+ String tmpStr1(__pParseStr + length);
+ res = regDelim.Match(tmpStr1, false, &matchedStrList);
+ matches = matchedStrList.GetCount();
+ SysTryReturnResult(NID_BASE_UTIL, matches > 0, E_SUCCESS, "It's a last token.");
+
+ String delimiter3 = *(dynamic_cast< String* >(matchedStrList.GetAt(0)));
+ int index3 = 0;
+ tmpStr1.IndexOf(delimiter3, 0, index3);
+ if (!delimiter3.IsEmpty() && index3 == 0)
+ {
+ length += delimiter3.GetLength();
+ }
+ }
+ else
+ {
+ int delimLength2 = delimiter2.GetLength();
+ int index2 = 0;
+ tmpStr.IndexOf(delimiter2, 0, index2);
+ tmpStr.SubString(0, index2, ret); // Extract the string in between first and second delimiter
+ length += index2 + delimLength2;
+ }
+ }
+ }
+ else
+ {
+ inputStr.SubString(0, index1, ret);
+ length = index1 + delimLength1;
+ }
+ }
+ else // 1st delimiter is empty
+ {
+ // Find 2nd delimiter from "__pParseStr + __position + 1"
+ String tmpStr(__pParseStr + __position + 1);
+ if (tmpStr == null) // When InputStr is last token, extract the token.
+ {
+ ret.Clear();
+ ret.Append(__pParseStr + __position);
+ length = ret.GetLength();
+ }
+ else
+ {
+ matchedStrList.RemoveAll();
+ res = regDelim.Match(tmpStr, false, &matchedStrList);
+ matches = matchedStrList.GetCount();
+ if (matches > 0)
+ {
+ String delimiter2 = *(dynamic_cast< String* >(matchedStrList.GetAt(0)));
+ if (delimiter2.IsEmpty()) // If the 2nd delimiter is also empty, the token will be one character followed by 1st delimiter.
+ {
+ ret.Clear();
+ ret.Append(*(__pParseStr + __position));
+ length = 1;
+ }
+ else
+ {
+ int delimLength2 = delimiter2.GetLength();
+ int index2 = 0;
+ inputStr.IndexOf(delimiter2, 0, index2);
+ inputStr.SubString(0, index2, ret);
+ length = index2 + delimLength2;
+ }
+ }
+ }
+ }
+ }
+ else //There are no delimiters
{
- String temp = *(String *)matchedStrList.GetAt(0);
- length = temp.GetLength();
- RegularExpression re;
- r = re.Construct(__delimiter, REGEX_UNICODE);
- re.Replace(temp, L"", true);
- ret = temp;
- matchedStrList.RemoveAll();
+ ret.Clear();
+ ret.Append(__pParseStr + __position);
+ length = ret.GetLength();
+ if (length <= 0)
+ {
+ return E_DATA_NOT_FOUND;
+ }
}
return r;
result GetNextToken(const String& pattern, String& ret, int& matTokenLen);
result GetNextMatchingString(const String& pattern, String& ret, int& length);
+private :
+ result GetNextTokenWithoutPattern(String& ret, int& length);
+
public:
int __radix;
String __delimiter;
{
int index = -1;
- languageCodeString.IndexOf(L"-", 0, index);
+ result r = languageCodeString.IndexOf(L"-", 0, index);
- if (languageCodeString.GetLength() == 2 || index == 2)
+ if ((r == E_SUCCESS) && (languageCodeString.GetLength() == 2 || index == 2))
{
std::unique_ptr<char[]> pLangStr (_StringConverter::CopyToCharArrayN(languageCodeString));
return StringToLanguageCode(_LocaleImpl::Get3LetterLanguageCodeString(pLangStr.get()));
privacyInfo.privacy_id = pPrivacyId.get();
ret = privacy_info_client_get_privacy_display_name(&privacyInfo, &pPrivacyDisplayName);
SysTryReturn(NID_SEC, ret == PRIV_MGR_ERROR_SUCCESS, displayName, E_SYSTEM, "[E_SYSTEM] An unexpected system error occurred.");
-
displayName.Append(pPrivacyDisplayName);
+
+ if (pPrivacyDisplayName != null)
+ {
+ free(pPrivacyDisplayName);
+ }
+
return displayName;
}
ByteBuffer input;
std::unique_ptr<IHash> pHash(null);
std::unique_ptr<ByteBuffer> pChecksumByteBuffer(null);
- std::unique_ptr<char> pAppId(null);
+ std::unique_ptr<char[]> pAppId(null);
SysTryReturnResult(NID_SEC, length <= MAX_BITWISE_PRIV_SIZE, E_INVALID_ARG, "The privilege information of %ls is invalid.", appId.GetPointer());
pPrivilegeList = new ArrayList;
r = pPrivilegeList->Construct();
- IEnumerator* pEnum = tempPrivilegeList.GetEnumeratorN();
+ std::unique_ptr<IEnumerator> pEnum(null);
+ pEnum.reset(tempPrivilegeList.GetEnumeratorN());
+ SysTryReturnResult(NID_SEC, pEnum != null, E_SYSTEM, "An unexpected system error occurred.");
+
while (pEnum->MoveNext() == E_SUCCESS)
{
String* tempString = static_cast< String* >(pEnum->GetCurrent());
pPrivilegeList = new ArrayList;
r = pPrivilegeList->Construct();
- IEnumerator* pEnum = tempPrivilegeList.GetEnumeratorN();
+ std::unique_ptr<IEnumerator> pEnum(null);
+ pEnum.reset(tempPrivilegeList.GetEnumeratorN());
+ SysTryReturnResult(NID_SEC, pEnum != null, E_SYSTEM, "An unexpected system error occurred.");
+
while (pEnum->MoveNext() == E_SUCCESS)
{
String* tempString = static_cast< String* >(pEnum->GetCurrent());