[詳解]
73 return ReadBytes(&out_data,
sizeof(T), cRead);
93 template<
class CHAR_T>
95 CHAR_T * out_pszString,
99 if (!Read<AkInt32>(cChars))
108 if (cChars < in_nMax)
110 ReadBytes(out_pszString, cChars *
sizeof(CHAR_T), cRead);
111 out_pszString[cChars] = 0;
113 bRet = cRead == (
AkInt32)(cChars *
sizeof(CHAR_T));
117 ReadBytes(out_pszString, in_nMax *
sizeof(CHAR_T), cRead);
118 out_pszString[in_nMax - 1] = 0;
120 bRet = cRead == (
AkInt32)(in_nMax *
sizeof(CHAR_T));
125 AkInt32 cRemaining = cChars - in_nMax;
127 CHAR_T * pTemp =
new CHAR_T[cRemaining];
129 ReadBytes(pTemp, cRemaining *
sizeof(CHAR_T), cRead);
131 bRet = cRead == (
AkInt32)(cRemaining *
sizeof(CHAR_T));
139 out_pszString[0] = 0;
161 const void * in_pData,
180 return WriteBytes(&in_data,
sizeof(T), cWritten);
186 const wchar_t * in_pszString)
188 if (in_pszString !=
NULL)
190 size_t cChars = wcslen(in_pszString);
191 if (!Write<AkUInt32>((
AkUInt32)cChars))
202 return cWritten == cToWrite;
204 return Write<AkUInt32>(0);
210 const char * in_pszString)
212 if (in_pszString !=
NULL)
214 size_t cChars = strlen(in_pszString);
215 if (!Write<AkUInt32>((
AkUInt32)cChars))
225 return cWritten == (
AkInt32)cChars;
227 return Write<AkUInt32>(0);
268 #endif // _AK_IBYTES_H
virtual AkUInt8 * Detach()=0
Return pointer to buffer and clear internal pointer.
bool ReadString(CHAR_T *out_pszString, AkInt32 in_nMax)
bool WriteString(const char *in_pszString)
uint8_t AkUInt8
Unsigned 8-bit integer
virtual bool Reserve(AkInt32 in_cBytes)=0
virtual void SetCount(AkInt32 in_cBytes)=0
Set number of bytes written.
int32_t AkInt32
Signed 32-bit integer
virtual bool WriteBytes(const void *in_pData, AkInt32 in_cBytes, AkInt32 &out_cWritten)=0
bool Write(const T &in_data)
virtual bool ReadBytes(void *in_pData, AkInt32 in_cBytes, AkInt32 &out_cRead)=0
bool WriteString(const wchar_t *in_pszString)
virtual AkInt32 Count() const =0
uint32_t AkUInt32
Unsigned 32-bit integer
virtual AkUInt8 * Bytes() const =0
virtual void Clear()=0
Clear the buffer contents.
あなたのプロジェクトについて教えてください。ご不明な点はありませんか。
プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。
Wwiseからはじめよう