class U_TOOLUTIL_API Package { public: /* * Constructor. * Prepare this object for a new, empty package.
*/
Package();
/* Destructor. */
~Package();
/** * Uses the prefix of the first entry of the package in readPackage(), * rather than the package basename.
*/ void setAutoPrefix() { doAutoPrefix=true; } /** * Same as setAutoPrefix(), plus the prefix must end with the platform type letter.
*/ void setAutoPrefixWithType() {
doAutoPrefix=true;
prefixEndsWithType=true;
} void setPrefix(constchar *p);
/* * Read an existing .dat package file. * The header and item name strings are swapped into this object, * but the items are left unswapped.
*/ void readPackage(constchar *filename); /* * Write a .dat package file with the items in this object. * Swap all pieces to the desired output platform properties. * The package becomes unusable: * The item names are swapped and sorted in the outCharset rather than the local one. * Also, the items themselves are swapped in-place
*/ void writePackage(constchar *filename, char outType, constchar *comment);
/* * Return the input data type letter (l, b, or e).
*/ char getInType();
// find the item in items[], return the non-negative index if found, else the binary-not of the insertion point
int32_t findItem(constchar *name, int32_t length=-1) const;
/* * Set internal state for following calls to findNextItem() which will return * indexes for items whose names match the pattern.
*/ void findItems(constchar *pattern);
int32_t findNextItem(); /* * Set the match mode for findItems() & findNextItem(). * @param mode 0=default * MATCH_NOSLASH * does not match a '/'
*/ void setMatchMode(uint32_t mode);
/* The extractItem() functions accept outputType=0 to mean "don't swap the item". */ void extractItem(constchar *filesPath, int32_t itemIndex, char outType); void extractItems(constchar *filesPath, constchar *pattern, char outType); void extractItems(constchar *filesPath, const Package &listPkg, char outType);
/* This variant extracts an item to a specific filename. */ void extractItem(constchar *filesPath, constchar *outName, int32_t itemIndex, char outType);
/* * Check dependencies and return true if all dependencies are fulfilled.
*/
UBool checkDependencies();
/* * Enumerate all the dependencies and give the results to context and call CheckDependency callback * @param context user context (will be passed to check function) * @param check will be called with context and any missing items
*/ void enumDependencies(void *context, CheckDependency check);
// match mode for findItems(pattern) and findNextItem()
uint32_t matchMode;
// state for findItems(pattern) and findNextItem() constchar *findPrefix, *findSuffix;
int32_t findPrefixLength, findSuffixLength;
int32_t findNextIndex;
// state for checkDependencies()
UBool isMissingItems;
/** * Grow itemMax to new value
*/ void setItemCapacity(int32_t max);
/** * Grow itemMax to at least itemCount+1
*/ void ensureItemCapacity();
};
U_NAMESPACE_END
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.25 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.