InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TxtExpUtils Class Reference

#include <TxtExpUtils.h>

Public Types

enum  Modifier { None, Dakuten, Handakuten }
 

Static Public Member Functions

static ITxtExpFileWriterQueryTxtExpFileWriter (ITxtExpFileWriter::Encoding encoding)
 
static IIntDataGetEncodingIntData (bool16 bRelease=kFalse)
 
static textchar HankakuToZenkaku (const textchar tc, const TxtExpUtils::Modifier modifier=TxtExpUtils::None)
 
static textchar ZenkakuToHankaku (const textchar tc, TxtExpUtils::Modifier &modifier)
 

Static Public Attributes

static const int32 kHankakuColumn = 0
 
static const int32 kZenkakuColumn = 1
 
static const int32 kNumKatakana = 94
 
static const int32 kKatakanaNotFound = -1
 

Detailed Description

TxtExpUtils Implements various utility functions that help in the process of importing text files, as featured in the TextImportFilter.

Member Enumeration Documentation

Specifies a type of katakana modifier. The following sounds contain a dakuten: ga, gi, gu, ge, go, za, zi, zu, ze, zo, da, di, zu, de, do, ba, bi, bu, be, bo vu (not very common) The following sounds contain a han-dakuten: pa, pi, pu, pe, po

Member Function Documentation

IIntData * TxtExpUtils::GetEncodingIntData (bool16 bRelease = kFalse)
static

Gets the IntData pointer for the encoding option so that the dialog and the filter could both set and get the same IntData interface. The code that first calls GetEncodingIntData should release it when all done. (See TxtExpFilter::TxtExpFilter() and TxtExpFilter::~TxtExpFilter().)

Parameters
bReleaseSet to kTrue if you want to release the IIntData pointer. Defaults to kFalse.
Returns
Pointer to IIntData interface.
textchar TxtExpUtils::HankakuToZenkaku (const textchar tc,
const TxtExpUtils::Modifier modifier = TxtExpUtils::None 
)
static

Converts a Hankaku (single-byte) katakana char to its Zenkaku (dual-byte) counterpart.

Parameters
tcTextchar containing the single-byte code for the Hankaku katakana.
modifierSpecifies whether the hankaku character has a modifier or not. See typedef Modifier. If modifier is other than None, then tc's HIBYTE is ignored.
Returns
Textchar containing the dual-byte code for the Zenkaku katakana. The tc is not found in the lookup table, this returns kTextChar_Null.
ITxtExpFileWriter * TxtExpUtils::QueryTxtExpFileWriter (ITxtExpFileWriter::Encoding encoding)
static

Obtains the actual ITxtExpFileWriter interface for the corresponding encoding.

Parameters
encodingThe encoding for which you want the ITxtExpFileWriter implementation. See ITxtExpFileWriter::Encoding.
textchar TxtExpUtils::ZenkakuToHankaku (const textchar tc,
TxtExpUtils::Modifiermodifier 
)
static

Converts a Zenkaku (dual-byte) katakana char to its Hankaku (single-byte) counterpart.

Parameters
tcTextchar containing the dual-byte code for the Zenkaku katakana. If the textchar has a modifier, then the high-order byte contains the actual modifier character. (dakuten or handakuten)
modifier(return by reference) Indicates whether the returned textchar has a modifier.
Returns
Textchar containing the single-byte code for the Hankaku katakana. The tc is not found in the lookup table, this returns kTextChar_Null.

Member Data Documentation

const int32 TxtExpUtils::kHankakuColumn = 0
static

Constant for the hankaku column in the lookup table.

const int32 TxtExpUtils::kKatakanaNotFound = -1
static

Constant that signifies that the character was not found in the lookup table.

const int32 TxtExpUtils::kNumKatakana = 94
static

Constant for the number of katakana entries in the lookup table.

const int32 TxtExpUtils::kZenkakuColumn = 1
static

Constant for the zenkaku column in the lookup table.