chromium/third_party/icu/source/i18n/collationweights.cpp

// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*  
*******************************************************************************
*
*   Copyright (C) 1999-2015, International Business Machines
*   Corporation and others.  All Rights Reserved.
*
*******************************************************************************
*   file name:  collationweights.cpp
*   encoding:   UTF-8
*   tab size:   8 (not used)
*   indentation:4
*
*   created on: 2001mar08 as ucol_wgt.cpp
*   created by: Markus W. Scherer
*
*   This file contains code for allocating n collation element weights
*   between two exclusive limits.
*   It is used only internally by the collation tailoring builder.
*/

#include "unicode/utypes.h"

#if !UCONFIG_NO_COLLATION

#include "cmemory.h"
#include "collation.h"
#include "collationweights.h"
#include "uarrsort.h"
#include "uassert.h"

#ifdef UCOL_DEBUG
#   include <stdio.h>
#endif

U_NAMESPACE_BEGIN

/* collation element weight allocation -------------------------------------- */

/* helper functions for CE weights */

static inline uint32_t
getWeightTrail(uint32_t weight, int32_t length) {}

static inline uint32_t
setWeightTrail(uint32_t weight, int32_t length, uint32_t trail) {}

static inline uint32_t
getWeightByte(uint32_t weight, int32_t idx) {}

static inline uint32_t
setWeightByte(uint32_t weight, int32_t idx, uint32_t byte) {}

static inline uint32_t
truncateWeight(uint32_t weight, int32_t length) {}

static inline uint32_t
incWeightTrail(uint32_t weight, int32_t length) {}

static inline uint32_t
decWeightTrail(uint32_t weight, int32_t length) {}

CollationWeights::CollationWeights()
        :{}

void
CollationWeights::initForPrimary(UBool compressible) {}

void
CollationWeights::initForSecondary() {}

void
CollationWeights::initForTertiary() {}

uint32_t
CollationWeights::incWeight(uint32_t weight, int32_t length) const {}

uint32_t
CollationWeights::incWeightByOffset(uint32_t weight, int32_t length, int32_t offset) const {}

void
CollationWeights::lengthenRange(WeightRange &range) const {}

/* for uprv_sortArray: sort ranges in weight order */
static int32_t U_CALLCONV
compareRanges(const void * /*context*/, const void *left, const void *right) {}

UBool
CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) {}

UBool
CollationWeights::allocWeightsInShortRanges(int32_t n, int32_t minLength) {}

UBool
CollationWeights::allocWeightsInMinLengthRanges(int32_t n, int32_t minLength) {}

/*
 * call getWeightRanges and then determine heuristically
 * which ranges to use for a given number of weights between (excluding)
 * two limits
 */
UBool
CollationWeights::allocWeights(uint32_t lowerLimit, uint32_t upperLimit, int32_t n) {}

uint32_t
CollationWeights::nextWeight() {}

U_NAMESPACE_END

#endif /* #if !UCONFIG_NO_COLLATION */