[ACR][20/08/2013][Add]Enhance Double::ToString() andFloat::ToString() to set a specif...
[platform/framework/native/appfw.git] / inc / FBaseString.h
index 10178ba..185a3e3 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -92,7 +91,7 @@ public:
         *
         * @param[in]   ch                      A Unicode character
         */
-       String(const wchar_t ch);
+       String(wchar_t ch);
 
        /**
         * Initializes this instance of %String with the specified Unicode string.
@@ -1082,11 +1081,12 @@ private:
        result InitializeToDefault(int capacity);
 
        //
-       // Copies __pValue and subtract and initialize __pRefCount
+       // When the reference count is bigger than 1 and it is not UNSHAREABLE, copies__pValue and subtracts and initializes __pRefCount.
+       // If the isUnshareable is true, this method sets the reference count to UNSHAREABLE.
        //
-       // @since 2.0
+       // @since 2.2
        //
-       result CopyOnWrite(int capacity);
+       result AboutToModify(int capacity, bool isUnshareable = false);
 
        //
        // Swaps member-wisely
@@ -1098,10 +1098,11 @@ private:
        int __capacity;
        int __length;
        mutable int __hash;
-       mutable int* __pRefCount;
+       mutable volatile int* __pRefCount;
        mutable wchar_t* __pValue;
 
        static const float GROWTH_FACTOR;
+       static const int UNSHAREABLE;
 
        class _StringImpl * __pStringImpl;
        friend class _StringImpl;