/*
*******************************************************************************
-* Copyright (C) 2010-2012, International Business Machines
+* Copyright (C) 2010-2012,2014, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: stringtriebuilder.h
#include "unicode/utypes.h"
#include "unicode/uobject.h"
+/**
+ * \file
+ * \brief C++ API: Builder API for trie builders
+ */
+
// Forward declaration.
struct UHashtable;
typedef struct UHashtable UHashtable;
* @internal
*/
Node *registerFinalValue(int32_t value, UErrorCode &errorCode);
+#endif /* U_HIDE_INTERNAL_API */
/*
* C++ note:
/** @internal */
UHashtable *nodes;
+#ifndef U_HIDE_INTERNAL_API
/** @internal */
class Node : public UObject {
public:
protected:
int32_t hash;
int32_t offset;
- private:
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
};
// This class should not be overridden because
int32_t value;
};
- /** @internal */
+ /**
+ * @internal
+ */
class ValueNode : public Node {
public:
ValueNode(int32_t initialHash) : Node(initialHash), hasValue(FALSE), value(0) {}
int32_t value;
};
- /** @internal */
+ /**
+ * @internal
+ */
class IntermediateValueNode : public ValueNode {
public:
IntermediateValueNode(int32_t v, Node *nextNode)
Node *next;
};
- /** @internal */
+ /**
+ * @internal
+ */
class LinearMatchNode : public ValueNode {
public:
LinearMatchNode(int32_t len, Node *nextNode)
Node *next;
};
- /** @internal */
+ /**
+ * @internal
+ */
class BranchNode : public Node {
public:
BranchNode(int32_t initialHash) : Node(initialHash) {}
int32_t firstEdgeNumber;
};
- /** @internal */
+ /**
+ * @internal
+ */
class ListBranchNode : public BranchNode {
public:
ListBranchNode() : BranchNode(0x444444), length(0) {}
UChar units[kMaxBranchLinearSubNodeLength];
};
- /** @internal */
+ /**
+ * @internal
+ */
class SplitBranchNode : public BranchNode {
public:
SplitBranchNode(UChar middleUnit, Node *lessThanNode, Node *greaterOrEqualNode)
virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node) = 0;
/** @internal */
virtual int32_t writeDeltaTo(int32_t jumpTarget) = 0;
-
-private:
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
};
U_NAMESPACE_END