Logo Search packages:      
Sourcecode: icu version File versions  Download package

void UVector::assign ( const UVector other,
UTokenAssigner *  assign,
UErrorCode ec 
)

Assign this object to another (make this a copy of 'other'). Use the 'assign' function to assign each element.

Definition at line 95 of file uvector.cpp.

References count, elements, UHashTok::pointer, setSize(), and U_SUCCESS.

Referenced by UnicodeSet::operator=().

                                                                                 {
    if (ensureCapacity(other.count, ec)) {
        setSize(other.count, ec);
        if (U_SUCCESS(ec)) {
            for (int32_t i=0; i<other.count; ++i) {
                if (elements[i].pointer != 0 && deleter != 0) {
                    (*deleter)(elements[i].pointer);
                }
                (*assign)(&elements[i], &other.elements[i]);
            }
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index