SNAP Library , Developer Reference  2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
anonymous_namespace{unicode.cpp} Namespace Reference

Classes

class  TVectorBuilder2
class  TVectorBuilder

Functions

TStr CombinePath (const TStr &s, const TStr &t)
void AssertEq (const TIntV &v1, const TIntV &v2, const TStr &explanation, FILE *f)

Variables

TVectorBuilder VB

Function Documentation

void anonymous_namespace{unicode.cpp}::AssertEq ( const TIntV v1,
const TIntV v2,
const TStr explanation,
FILE *  f 
)

Definition at line 39 of file unicode.cpp.

References TStr::CStr(), Fail, and TVec< TVal >::Len().

{
        const int n = v1.Len();
        bool ok = (n == v2.Len());
        if (ok) for (int i = 0; i < n && ok; i++) ok = ok && (v1[i] == v2[i]);
        if (! ok)
        {
                if (! f) f = stderr;
                fprintf(f, "%s: [", explanation.CStr());
                for (int i = 0; i < v1.Len(); i++) fprintf(f, "%s%04x", (i == 0 ? "" : " "), int(v1[i]));
                fprintf(f, "] != [");
                for (int i = 0; i < v2.Len(); i++) fprintf(f, "%s%04x", (i == 0 ? "" : " "), int(v2[i]));
                fprintf(f, "]\n");
                Fail;
        }
}

Here is the call graph for this function:

TStr anonymous_namespace{unicode.cpp}::CombinePath ( const TStr s,
const TStr t 
)

Definition at line 32 of file unicode.cpp.

References TStr::Len().

Referenced by TUniChDb::InitDerivedCoreProperties(), TUniChDb::InitLineBreaks(), TUniChDb::InitPropList(), TUniChDb::InitScripts(), TUniChDb::InitSpecialCasing(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TUniChDb::LoadTxt(), TUniChDb::Test(), TUniChDb::TestComposition(), and TUniChDb::TestFindNextWordOrSentenceBoundary().

{
        int n = s.Len(); if (n <= 0) return t;
        if (s[n - 1] == '\\' || s[n - 1] == '/' || s[n - 1] == ':') return s + t;
        return s + "\\" + t;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

TVectorBuilder anonymous_namespace{unicode.cpp}::VB