/**
*******************************************************************************
- * Copyright (C) 2006-2008, International Business Machines Corporation *
+ * Copyright (C) 2006-2011, International Business Machines Corporation *
* and others. All Rights Reserved. *
*******************************************************************************
*/
fBranchStack.push(kLessThan, status);
unistr.remove();
}
-
- virtual ~MutableTrieEnumeration() {
- }
-
+
+ virtual ~MutableTrieEnumeration();
+
virtual StringEnumeration *clone() const {
UErrorCode status = U_ZERO_ERROR;
return new MutableTrieEnumeration(fRoot, status);
where = (StackBranch) fBranchStack.push(kLessThan, status);
break;
}
- case kEqual:
+ case kEqual: /*fall through*/
emit = (node->flags & kEndsWord) != 0;
equal = (node->equal != NULL);
// If this node should be part of the next emitted string, append
if (equal) {
break;
}
- case kGreaterThan:
+ case kGreaterThan: /*fall through*/
// If this node's character is in the string, remove it.
if (node->equal != NULL || (node->flags & kEndsWord)) {
unistr.truncate(unistr.length()-1);
where = (StackBranch) fBranchStack.push(kLessThan, status);
break;
}
- case kDone:
+ case kDone: /*fall through*/
fNodeStack.pop();
fBranchStack.popi();
node = (TernaryNode *) fNodeStack.peek();
}
};
+MutableTrieEnumeration::~MutableTrieEnumeration() {}
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(MutableTrieEnumeration)
StringEnumeration *
fIndexStack.push(0, status);
unistr.remove();
}
-
- virtual ~CompactTrieEnumeration() {
- }
-
+
+ virtual ~CompactTrieEnumeration();
+
virtual StringEnumeration *clone() const {
UErrorCode status = U_ZERO_ERROR;
return new CompactTrieEnumeration(fHeader, status);
}
};
+CompactTrieEnumeration::~CompactTrieEnumeration() {}
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CompactTrieEnumeration)
const UnicodeString *
fNodeID = nodes.size();
nodes.push(this, status);
}
-
- virtual ~BuildCompactTrieNode() {
- }
-
+
+ virtual ~BuildCompactTrieNode();
+
virtual uint32_t size() {
return sizeof(uint16_t);
}
}
};
+BuildCompactTrieNode::~BuildCompactTrieNode() {}
+
class BuildCompactTrieHorizontalNode: public BuildCompactTrieNode {
public:
UStack fLinks;
BuildCompactTrieHorizontalNode(UBool parentEndsWord, UStack &nodes, UErrorCode &status)
: BuildCompactTrieNode(parentEndsWord, FALSE, nodes, status), fLinks(status) {
}
-
- virtual ~BuildCompactTrieHorizontalNode() {
- }
-
+
+ virtual ~BuildCompactTrieHorizontalNode();
+
virtual uint32_t size() {
return offsetof(CompactTrieHorizontalNode,entries) +
(fChars.length()*sizeof(CompactTrieHorizontalEntry));
}
};
+BuildCompactTrieHorizontalNode::~BuildCompactTrieHorizontalNode() {}
+
class BuildCompactTrieVerticalNode: public BuildCompactTrieNode {
public:
BuildCompactTrieNode *fEqual;
: BuildCompactTrieNode(parentEndsWord, TRUE, nodes, status) {
fEqual = NULL;
}
-
- virtual ~BuildCompactTrieVerticalNode() {
- }
-
+
+ virtual ~BuildCompactTrieVerticalNode();
+
virtual uint32_t size() {
return offsetof(CompactTrieVerticalNode,chars) + (fChars.length()*sizeof(uint16_t));
}
}
};
+BuildCompactTrieVerticalNode::~BuildCompactTrieVerticalNode() {}
+
// Forward declaration
static void walkHorizontal(const TernaryNode *node,
BuildCompactTrieHorizontalNode *building,