Changeset 15 in libcf++
- Timestamp:
- 06/14/15 03:03:32 (9 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/cf/bin.h
r11 r15 63 63 */ 64 64 cf::size_t size() const; 65 66 /**67 * is empty68 * @return is empty ?69 */70 cf::bool_t empty() const;71 65 72 66 /** -
trunk/include/cf/network.h
r14 r15 50 50 */ 51 51 cf::uint16_t port() const; 52 53 /**54 * is empty ?55 * @return true; false56 */57 cf::bool_t empty() const;58 52 }; 59 53 -
trunk/include/cf/task.h
r11 r15 9 9 #include "cf/exception.h" 10 10 11 #define SYNCHRONIZED(_s) for (cf::task::scopedLock _sl(&_s) ; _sl. locked() ; _sl.unlock())11 #define SYNCHRONIZED(_s) for (cf::task::scopedLock _sl(&_s) ; _sl.isLocked() ; _sl.unlock()) 12 12 13 13 namespace cf … … 40 40 * @return true; false 41 41 */ 42 virtual cf::bool_t locked() const = 0;42 virtual cf::bool_t isLocked() const = 0; 43 43 }; 44 44 … … 90 90 * @return true; false 91 91 */ 92 cf::bool_t locked() const;92 cf::bool_t isLocked() const; 93 93 }; 94 94 … … 119 119 * @return true; false 120 120 */ 121 cf::bool_t locked() const;121 cf::bool_t isLocked() const; 122 122 123 123 /** -
trunk/src/bin.cpp
r11 r15 38 38 { 39 39 return mBin.size(); 40 }41 42 cf::bool_t cf::bin::empty() const43 {44 return mBin.empty();45 40 } 46 41 -
trunk/src/codec.cpp
r7 r15 19 19 throw (cf::exception) 20 20 { 21 if (in. empty())21 if (in.size() == 0) 22 22 THROW_EXCEPTION("input is empty"); 23 23 … … 182 182 throw (cf::exception) 183 183 { 184 if (in. empty())184 if (in.size() == 0) 185 185 THROW_EXCEPTION("input is empty"); 186 186 -
trunk/src/logger.cpp
r7 r15 169 169 if (!mOpenMutex.trylock()) 170 170 { 171 while (mOpenMutex. locked())171 while (mOpenMutex.isLocked()) 172 172 /* waiting */; 173 173 … … 211 211 if (!mRenameMutex.trylock()) 212 212 { 213 while (mRenameMutex. locked())213 while (mRenameMutex.isLocked()) 214 214 /* waiting */; 215 215 -
trunk/src/network.cpp
r14 r15 153 153 } 154 154 155 cf::bool_t cf::network::host::empty() const156 {157 return (address().empty() || port() == 0) ? true : false;158 }159 160 155 cf::network::tcp::tcp(const cf::socket_t attachedSocket) 161 156 throw (cf::exception) … … 351 346 throw (cf::exception) 352 347 { 353 if (in. empty())354 THROW_EXCEPTION("send data is null orzero-bytes");348 if (in.size() == 0) 349 THROW_EXCEPTION("send data is zero-bytes"); 355 350 356 351 cf::char_t * buf = reinterpret_cast<cf::char_t *>(in.buffer()); -
trunk/src/task.cpp
r11 r15 136 136 } 137 137 138 cf::bool_t cf::task::mutex:: locked() const138 cf::bool_t cf::task::mutex::isLocked() const 139 139 { 140 140 return mIsLocked; … … 162 162 } 163 163 164 cf::bool_t cf::task::scopedLock:: locked() const165 { 166 return mSynchronizer-> locked();164 cf::bool_t cf::task::scopedLock::isLocked() const 165 { 166 return mSynchronizer->isLocked(); 167 167 } 168 168 -
trunk/test/makefile
r13 r15 22 22 LIB_NAME = cf++ 23 23 24 INCLUDES = -I../include -I../src24 INCLUDES = -I../include 25 25 LIBRARIES = -L$(BUILD_PATH) -l$(LIB_NAME) $(LIBS) 26 26 LIBRARY_PATH = .
Note:
See TracChangeset
for help on using the changeset viewer.