InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
JISFileWriter Class Reference
Inheritance diagram for JISFileWriter:
CPMUnknown< ITxtExpFileWriter >ITxtExpFileWriterIPMUnknown

Public Types

enum  JIS_States {
  kInASCII, kInEscSeqByte1, kInEscSeqByte2D, kInEscSeqByte2P,
  kInJIS_Old, kInJIS_New, kInJIS_Roman
}
 

Public Member Functions

 JISFileWriter (IPMUnknown *boss)
 
virtual ~JISFileWriter (void)
 
virtual int32 WriteTextCharBuffer (IPMStream *stream, const textchar *tcbuf, const int32 bufSize)
 
- Public Member Functions inherited from CPMUnknown< ITxtExpFileWriter >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from CPMUnknown< ITxtExpFileWriter >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< ITxtExpFileWriter >
HelperInterface fHelperInterface
 

Detailed Description

JISFileWriter Implements ITxtExpFileWriter for JIS encoded files. For details on the supported JIS encodings, refer to JISFileWriter::JIS_States.

Member Enumeration Documentation

States for the JIS state machine.  In the TextExportFilter sample,

we are only using this to keep track of the current state of the JISFileWriter.

For more detailed use of this enum, refer to another sample where it is used: TextImportFilter\Source\JISFileReader.cpp.

For this sample plug-in, we are using the ISO-2022-JP standard.

For more details on the ISO-2022-JP standard and related JIS encodings, refer to the following IETF RFCs: RFC 1468: Japanese Character Encoding for Internet Messages, which covers ISO-2022-JP, which includes ASCII, JIS-Roman, JIS C 6226-1978 and JIS X 0208-1983. (http://www.ietf.org/rfc/rfc1468.txt) RFC 1554: ISO-2022-JP2: Multilingual Extension of ISO-2022-JP, which extends ISO-2022-JP by adding GB2312-80 and KS X 1001:1992, and by includubg ISO-2022-JP1, as documented in RFC 2237. (http://www.ietf.org/rfc/rfc1554.txt) RFC 2237: Japanese Character Encoding for Internet Messages, which covers ISO-2022-JP1, an extension to ISO-2022-JP which adds JIS X 0212-1990. (http://www.ietf.org/rfc/rfc2237.txt)

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * JISFileWriter::JISFileWriter (IPMUnknownboss)

Constructor

JISFileWriter::~JISFileWriter (void )
virtual

Destructor

Member Function Documentation

int32 JISFileWriter::WriteTextCharBuffer (IPMStreamstream,
const textchar * tcbuf,
const int32 bufSize 
)
virtual

Writes the textchar data to the given file stream.

Parameters
streamStream to write to.
tcbufPointer to a buffer of textchars to write.
bufSizeNumber of textchars to write.
Returns
Number of textchars (not bytes) written to stream.

Implements ITxtExpFileWriter.