![]() ![]() ![]()
|
BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1 |

What is the SFXBuffer class?
The SFXBuffer class adds functionalities such as buffer concatenation, data search and replacement and so on to the SFXClusterHeap class.
To get the size of allocated memory, use the SFXBuffer::GetSize function.
Though the destructor automatically releases the allocated memory, it can be released explicitly by the SFXBuffer::Free function.
Also the size of allocated buffer can be updated by the SFXBuffer::SetSize function. At this time the data is saved.
To access directly the buffer that the SFXBuffer class manages inside, use the SFXBuffer::GetBuffer function.
Attach Function and Detach Function
The SFXBuffer::Attach function delegates the control privilege of the Void data to the instance of SFXBuffer class. Therefore, it is unnecessary to release the memory of the Void data. The SFXWideString::Detach function provides the reverse functionality.
The SFXBuffer::Attach function delegates the control privilege of Void data to the SFXBufferg object. Therefore, it is unnecessary to release the memory of Void data. The SFXBuffer::Detach function has the reverse functionality.
Though the data is copied by using the SFXBuffer::Set function and the substitution operator(=), while using the SFXBuffer::Attach function and the SFXBuffer::Detach function, data will not be copied.
When there is not enough heap for copying a several hunderds KB data, or to avoid the performance deterioration, use these functions.
What is delegation?: In object oriented programming, delegation means that an object have another deputy object behave like itself.
Example 458. How to use the Attach function
SFXBuffer buffer; ACharPtr ptr; // allocate the memory and cast to the AChar string(ptr) ptr = static_cast<ACharPtr>(MemoryAllocate(10240)); ... // delegate the control privilege of AChar string(ptr) to the SFXBuffer object(buffer) buffer.Attach(ptr, 10240); // hereafter, the AChar string(ptr) will be handled as the SFXBuffer object(buffer) ・・・ // after used, the allocated memory will be released automatically
Example 459. How to use the Detach function
SFXBuffer buffer; VoidPtr ptr; UInt32 length; ... // delegate the control privilege of SFXBuffer object(buffer) to the Void data(ptr) ptr = buffer.Detach(&length); // hereafter, the SFXBuffer object(buffer) will be operated as the Void data(ptr) ... // after used, it is necessary to release the memory of Void data(ptr) MemoryFree(ptr);
AttachSFXAnsiString Function and DetachSFXAnsiString Function
These functions are used when delegeting the control privilege between SFXBuffer and SFXAnsiString objects.
Related information : Attach Function and Detach Function
AttachSFXWideString Function and DetachSFXWideString Function
These functions are used when delegeting the control privilege between SFXBuffer and SFXWideString objects.
Related information : Attach Function and Detach Function
| Constructor/Destructor |
|---|
|
SFXBuffer( Void ) Constructor of SFXBuffer class.
|
|
SFXBuffer(
SFXBufferConstRef buffer
) Constructor of SFXBuffer class.
|
|
SFXBuffer(
VoidConstPtr buffer
, UInt32 size
) Constructor of SFXBuffer class.
|
|
SFXBuffer(
Byte byte
) Constructor of SFXBuffer class.
|
|
SFXBuffer(
SFXAnsiStringConstRef string
) Constructor of SFXBuffer class.
|
|
SFXBuffer(
SFXWideStringConstRef string
) Constructor of SFXBuffer class.
|
|
SFXBuffer(
UInt16 threshold
, UInt16 cluster
) Constructor of SFXBuffer class.
|
|
~SFXBuffer( Void ) Destructor of the SFXBuffer class.
|
| Public Functions | |
|---|---|
| SFCError |
Add(
SFXBufferConstRef buffer
) Add( Byte byte ) Add( VoidConstPtr buffer , UInt32 size ) Add the specified data onto the end of buffer.
|
| SFCError |
Allocate(
UInt32 size
) Allocate buffer memory.
|
| SFCError |
Attach(
VoidPtr buffer
, UInt32 size
) Delegate the control privilege of the specified Void data to the SFXBuffer object.
|
| SFCError |
AttachSFXAnsiString(
SFXAnsiStringPtr string
) Delegate the control privilege of the specified SFXAnsiString object to the SFXBuffer object.
|
| SFCError |
AttachSFXWideString(
SFXWideStringPtr string
) Delegate the control privilege of the specified SFXWideString object to the SFXBuffer object.
|
| SInt32 |
Compare(
SFXBufferConstRef buffer
) Compare( VoidConstPtr buffer , UInt32 size ) Compare the buffer.
|
| SFCError |
Copy(
UInt32 index
, SFXBufferConstRef buffer
) Copy( UInt32 index , VoidConstPtr buffer , UInt32 size ) Overwrite the buffer with the specified data.
|
| VoidPtr |
Detach(
UInt32Ptr size = null
) Delegate the control privilege of SFXBuffer object to the specified Void data.
|
| SFCError |
DetachSFXAnsiString(
SFXAnsiStringPtr string
) Delegate the control privilege of the specified SFXBuffer object to the SFXAnsiString object.
|
| SFCError |
DetachSFXWideString(
SFXWideStringPtr string
) Delegate the control privilege of the specified SFXBuffer object to the SFXWideString object.
|
| static SFXBufferConstRef |
EmptyInstance( Void ) Get an empty buffer.
|
| Bool |
EndsWith(
SFXBufferConstRef buffer
) EndsWith( Byte byte ) EndsWith( VoidConstPtr buffer , UInt32 size ) Check whether the buffer ends with the specified data or not.
|
| Bool |
Equals(
SFXBufferConstRef buffer
) Equals( VoidConstPtr buffer , UInt32 size ) Check whether the buffer equals the specified data or not.
|
| Void |
Fill(
Byte data
) Fill the buffer with the specified data.
|
| SInt32 |
FirstIndexOf(
SFXBufferConstRef buffer
, SInt32 index = SINT32_MINIMUM
) FirstIndexOf( Byte byte , SInt32 index = SINT32_MINIMUM ) FirstIndexOf( VoidConstPtr buffer , UInt32 size , SInt32 index = SINT32_MINIMUM ) Get the first index of SFXBuffer object to match with the specified data, searching from the beginning.
|
| Void |
Free( Void ) Release the buffer memory that the SFXBuffer object manages.
|
| VoidPtr |
GetBuffer( Void ) Get a pointer to the buffer memory.
|
| VoidConstPtr |
GetBuffer( Void ) Get a pointer to the buffer memory.
|
| Byte |
GetByte(
UInt32 index
) Get the Byte data at the specified index.
|
| UInt16 |
GetCluster( Void ) Get the cluster size to increase or decrease the internal buffer memory.
|
| UInt32 |
GetSize( Void ) Get the size of buffer memory.
|
| UInt16 |
GetThreshold( Void ) Get the minimum size of internal buffer.
|
| SFCError |
Insert(
UInt32 index
, SFXBufferConstRef buffer
) Insert( Byte byte ) Insert( UInt32 index , VoidConstPtr buffer , UInt32 size ) Insert data at the specified index of SFXBuffer object.
|
| Bool |
IsEmpty( Void ) Check whether the buffer is empty or not.
|
| SInt32 |
LastIndexOf(
SFXBufferConstRef buffer
, SInt32 index = SINT32_MAXIMUM
) LastIndexOf( Byte byte , SInt32 index = SINT32_MAXIMUM ) LastIndexOf( VoidConstPtr buffer , UInt32 size , SInt32 index = SINT32_MAXIMUM ) Get the last index of SFXBuffer object to match with the specified data, searching from the end.
|
| SFCError |
Mul(
SInt32 repeat
) Repeat the data of buffer with the specified frequency.
|
| Void |
Remove(
UInt32 begin
, UInt32 end
) Remove data in the specified range.
|
| SFCError |
Set(
SFXBufferConstRef buffer
) Set( SFXWideStringConstRef string ) Set( SFXAnsiStringConstRef string ) Set( Byte byte ) Set( VoidConstPtr buffer , UInt32 size ) Set buffer by copying data.
|
| SFCError |
SetByte(
UInt32 index
, Byte data
) Set the Byte data at the specified index.
|
| Void |
SetCluster(
UInt16 size
) Set the cluster size to increase or decrease the internal buffer memory.
|
| SFCError |
SetSize(
UInt32 size
) Set the size of buffer memory.
|
| Void |
SetThreshold(
UInt16 size
) Set the minimum size of internal buffer.
|
| SFXBuffer |
Slice(
UInt32 begin
, UInt32 end
) Preserve data in the specified range and remove the other.
|
| Bool |
StartsWith(
SFXBufferConstRef buffer
) StartsWith( Byte byte ) StartsWith( VoidConstPtr buffer , UInt32 size ) Check whether the buffer starts with the specified data or not.
|
| SFXBufferRef |
operator*=(
SInt32 repeat
) Repeat the data of buffer with the specified frequency.
|
| SFXBufferRef |
operator+=(
SFXBufferConstRef buffer
) operator+=( Byte byte ) Add the specified data onto the end of buffer.
|
| SFXBufferRef |
operator<<(
SFXBufferRef left
, SFXBufferConstRef right
) Add the right buffer onto the end of left buffer.
|
| SFXBufferRef |
operator=(
SFXBufferConstRef buffer
) Assign buffer.
|
| ByteRef |
operator[](
UInt32 index
) Get the buffer data at the specified index.
|
| ByteConstRef |
operator[](
UInt32 index
) Get the buffer data at the specified index.
|
| Bool |
operator==(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "==".
|
| Bool |
operator>=(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of ">=".
|
| Bool |
operator>(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of ">".
|
| Bool |
operator<=(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "<=".
|
| Bool |
operator<(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "<".
|
| SFXBuffer |
operator*(
SFXBufferConstRef left
, SInt32 right
) Repeat the data of buffer with the specified frequency.
|
| Bool |
operator!=(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "!=".
|
| SFXBuffer |
operator+(
SFXBufferConstRef left
, SFXBufferConstRef right
) operator+( SFXBufferConstRef left , Byte right ) Add the specified data onto the end of buffer.
|
| Types |
|---|
|
DefaultEnum
Default values of minimun heap size and cluster size used inside the buffer.
|
| Global Functions | |
|---|---|
| Bool |
operator==(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "==".
|
| Bool |
operator>=(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of ">=".
|
| Bool |
operator>(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of ">".
|
| Bool |
operator<=(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "<=".
|
| Bool |
operator<(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "<".
|
| SFXBuffer |
operator*(
SFXBufferConstRef left
, SInt32 right
) Repeat the data of buffer with the specified frequency.
|
| Bool |
operator!=(
SFXBufferConstRef left
, SFXBufferConstRef right
) Check the relation of "!=".
|
| SFXBuffer |
operator+(
SFXBufferConstRef left
, SFXBufferConstRef right
) operator+( SFXBufferConstRef left , Byte right ) Add the specified data onto the end of buffer.
|
[ public, explicit ] SFXBuffer(Void);
[ public ]
SFXBuffer(
SFXBufferConstRef buffer // buffer to copy
);
[ public, explicit ]
SFXBuffer(
VoidConstPtr buffer // memory block for buffer
UInt32 size // size of memory block
);
[ public, explicit ]
SFXBuffer(
Byte byte // byte used as buffer
);
[ public, explicit ]
SFXBuffer(
SFXAnsiStringConstRef string // string used as buffer
);
[ public, explicit ]
SFXBuffer(
SFXWideStringConstRef string // string used as buffer
);
[ public, explicit ]
SFXBuffer(
UInt16 threshold // minimum buffer size
UInt16 cluster // cluster size
);
Construct the SFXBuffer object by copying the specified data. To get data without copying, use the Attach function.
When no arugument is specified or arguments are "threshold" and "cluster", internal buffer is not allocated. And it is necessary to call the Allocate function.
When an argument is specified as the SFXAnsiString object, the buffer length equals "the string length + 1( '\0' ) ". In case of SFXWideString, the buffer length equals "the string length * 2 + 1".
[ public ] ~SFXBuffer(Void);
When buffer memory is allocated, it will be released automatically by calling the SFXBuffer::Free function.
[ public ] SFCError Add( SFXBufferConstRef buffer // buffer to add );
[ public ] SFCError Add( VoidConstPtr buffer // buffer data to add UInt32 size // size of buffer data to add );
[ public ] SFCError Add( Byte byte // byte to add );
The SFXBuffer::Add function will influence upon the SFXBuffer object. To preserve the former buffer data, it is necessary to copy it somewhere.
The SFXBuffer::Add function enlarges the internal buffer.
SFXBuffer::Mul | SFXBuffer::operator<< | operator+ | SFXBuffer::operator+=
If buffer memory is not allocated in the constructor, it is necessary to allocate buffer memory by using the SFXBuffer::Allocate function. The behaviour is not defined when calling other functions without allocation.
![]() |
Note |
|---|---|
The SFXBuffer::Allocate function destroys data in the area to allocate memory. Even if errors occur inside the SFXBuffer::Allocate function, the former data cannot be restored. | |
[ public ] SFCError Attach( VoidPtr buffer // memory block to use UInt32 size // size of memory block );
The SFXBuffer::Attach function is more efficient than the SFXBuffer::Set function, since the Void data(buffer) is not copied and the problem on insufficient memory or performance deterioration can be avoided.
The memory the allocated to Void data(buffer) will be released automatically when the SFXBuffer is released. To release the memory allocated to the Void data(buffer) explicitly, it is necessary to call the SFXBuffer::Detach function.
Delegate the control privilege of AChar string to the SFXBuffer object.
SFXBuffer buffer; ACharPtr ptr; // allocate the memory and cast to the AChar string(ptr) ptr = static_cast<ACharPtr>(MemoryAllocate(10240)); ... // delegate the control privilege of AChar string(ptr) to the SFXBuffer object(buffer) buffer.Attach(ptr, 10240); // hereafter, the AChar string(ptr) will be handled as the SFXBuffer object(buffer) ・・・ // after used, the allocated memory will be released automatically
[ public ] SFCError AttachSFXAnsiString( SFXAnsiStringPtr string // string to use );
The SFXBuffer::AttachSFXAnsiString function is more efficient than the SFXBuffer::Set function, since the SFXAnsiString object(string) is not copied and the problem on insufficient memory or performance deterioration can be avoided.
The memory the allocated to SFXAnsiString object(string) will be released automatically when the SFXBuffer is released. To release the memory allocated to the SFXAnsiString object(string) explicitly, it is necessary to call the SFXBuffer::DetachSFXAnsiString function.
SFXAnsiString str; SFXBuffer buffer; ... // delegate the control privilege of SFXAnsiString object(str) to the SFXBuffer object(buffer) buffer.AttachSFXAnsiString(&str); // hereafter, the SFXAnsiString object(str) will be handled as the SFXBuffer object(buffer) ... // after used, the allocated memory will be released automatically
SFXBuffer::Attach | SFXBuffer::AttachSFXWideString | SFXAnsiString::AttachSFXBuffer | SFXBuffer::Detach | SFXBuffer::DetachSFXAnsiString | SFXAnsiString::DetachSFXBuffer
[ public ] SFCError AttachSFXWideString( SFXWideStringPtr string // string to use );
The SFXBuffer::AttachSFXWideString function is more efficient than the SFXBuffer::Set function, since the SFXWideString object(string) is not copied and the problem on insufficient memory or performance deterioration can be avoided.
The memory the allocated to SFXWideString object(string) will be released automatically when the SFXBuffer is released. To release the memory allocated to the SFXWideString object(string) explicitly, it is necessary to call the SFXBuffer::DetachSFXWideString function.
SFXWideString str; SFXBuffer buffer; ... // delegate the control privilege of SFXWideString object(str) to the SFXBuffer object(buffer) buffer.AttachSFXWideString(&str); // hereafter, the SFXWideString object(str) will be handled as the SFXBuffer object(buffer) ... // after used, the allocated memory will be released automatically
SFXBuffer::Attach | SFXBuffer::AttachSFXAnsiString | SFXWideString::AttachSFXBuffer | SFXBuffer::Detach | SFXBuffer::DetachSFXWideString SFXWideString::DetachSFXBuffer
[ public, const ] SInt32 Compare( SFXBufferConstRef buffer // buffer object to compare with );
[ public, const ] SInt32 Compare( VoidConstPtr buffer // buffer data data to compare with UInt32 size // size of buffer data to compare with );
SFXBuffer::Equals | operator> | operator>= | operator< | operator<=
[ public ] SFCError Copy( UInt32 index // beginning index to overwrite SFXBufferConstRef buffer // buffer to copy );
[ public ] SFCError Copy( UInt32 index // beginning index to overwrite VoidConstPtr buffer // memory block to copy UInt32 size // size of memory block to copy );
If data to overwrite goes over the end of buffer, SFERR_INVALID_PARAM is returned and data is not copied.
Return the Void data which the SFXBuffer object has.
The SFXBuffer::Detach function is more efficient than the SFXBuffer::GetBuffer function, since the SFXBuffer object is not copied and the problem on insufficient memory or performance deterioration can be avoided.
SFXBuffer buffer; VoidPtr ptr; UInt32 length; ... // delegate the control privilege of SFXBuffer object(buffer) to the Void data(ptr) ptr = buffer.Detach(&length); // hereafter, the SFXBuffer object(buffer) will be operated as the Void data(ptr) ... // after used, it is necessary to release the memory of Void data(ptr) MemoryFree(ptr);
[ public ] SFCError DetachSFXAnsiString( SFXAnsiStringPtr string // pointer to the SFXAnsiString object );
The SFXBuffer::DetachSFXAnsiString function is efficient , since the SFXBuffer object is not copied and the problem on insufficient memory or performance deterioration can be avoided.
SFXAnsiString str; SFXBuffer buffer; ... // delegate the control privilege of SFXBuffer object(buffer) to the SFXAnsiString object(str) ptr = buffer.Detach(&length); // hereafter, the SFXBuffer object(buffer) will be handled as the SFXAnsiString object(str) ... // after used, the allocated memory will be released automatically MemoryFree(ptr);
SFXBuffer::Attach | SFXBuffer::AttachSFXAnsiString | SFXBuffer::Detach | SFXBuffer::DetachSFXWideString
[ public ] SFCError DetachSFXWideString( SFXWideStringPtr string // pointer to the SFXWideString object );
The SFXBuffer::DetachSFXWideString function is efficient , since the SFXBuffer object is not copied and the problem on insufficient memory or performance deterioration can be avoided.
SFXWideString str; SFXBuffer buffer; ... // delegate the control privilege of SFXBuffer object(buffer) to the SFXWideString object(str) ptr = buffer.Detach(&length); // hereafter, the SFXBuffer object(buffer) will be handled as the SFXWideString object(str) ... // after used, the allocated memory will be released automatically MemoryFree(ptr);
SFXBuffer::Attach | SFXBuffer::AttachSFXWideString | SFXBuffer::Detach | SFXBuffer::DetachSFXAnsiString
[ public, static ] SFXBufferConstRef EmptyInstance(Void);
Get an instance that represents an empty buffer.
[ public, const ] Bool EndsWith( SFXBufferConstRef buffer // buffer object to check with );
[ public, const ] Bool EndsWith( VoidConstPtr buffer // buffer data to check with UInt32 size // size of buffer data to check with );
[ public, const ] Bool EndsWith( Byte byte // byte data to check with );
[ public, const ] Bool Equals( SFXBufferConstRef buffer // buffer object to compare with );
[ public, const ] Bool Equals( VoidConstPtr buffer // buffer data to compare with UInt32 size // size of buffer data to compare with );
[ public, const ] SInt32 FirstIndexOf( SFXBufferConstRef buffer // buffer object to match with SInt32 index = SINT32_MINIMUM // starting index to search from );
[ public, const ] SInt32 FirstIndexOf( VoidConstPtr buffer // buffer data to match with UInt32 size // size of buffer data to match with SInt32 index = SINT32_MINIMUM // starting index to search from );
[ public, const ] SInt32 FirstIndexOf( Byte byte // byte data to match with SInt32 index = SINT32_MINIMUM // starting index to search from );
To search from other than the beginning, specify the starting index to match with. (The origin index is 0.)
[ public ] Void Free(Void);
If the SFXBuffer object has no buffer memory, nothing happens.
[ public ] VoidPtr GetBuffer(Void);
[ public, const ] VoidConstPtr GetBuffer(Void);
By using the SFXBuffer::GetBuffer function, the buffer memory can be operated directly.
SFXBuffer buffer;
buffer.Set(SFXAnsiString("test")); // set a buffer
TRACE("%s", buffer.GetBuffer()); // test
SFXBuffer::GetByte | SFXBuffer::GetSize | SFXBuffer::SetByte | SFXBuffer::SetSize
SFXBuffer::GetBuffer | SFXBuffer::GetSize | SFXBuffer::SetByte | SFXBuffer::SetSize | SFXBuffer::operator[]
[ public, const ] UInt16 GetCluster(Void);
[ public, const ] UInt32 GetSize(Void);
SFXBuffer buffer;
buffer.Set(SFXAnsiString("test")); // set buffer
TRACE("%s", buffer.GetSize()); // 5( test + \0 )
SFXBuffer::GetBuffer | SFXBuffer::GetByte | SFXBuffer::SetByte | SFXBuffer::SetSize
[ public, const ] UInt16 GetThreshold(Void);
[ public ] SFCError Insert( UInt32 index // index to insert SFXBufferConstRef buffer // buffer object to insert );
[ public ] SFCError Insert( UInt32 index // index to insert VoidConstPtr buffer // buffer data to insert UInt32 size // size of buffer data to insert );
[ public ] SFCError Insert( Byte byte // Byte data to insert );
The SFXBuffer::Insert function enlarges the internal buffer with the buffer size specified as an argument.
[ public, const ] Bool IsEmpty(Void);
[ public, const ] SInt32 LastIndexOf( SFXBufferConstRef buffer // buffer object to match with SInt32 index = SINT32_MAXIMUM // starting index to search from );
[ public, const ] SInt32 LastIndexOf( VoidConstPtr buffer // buffer data to match with UInt32 size // size of buffer data to match with SInt32 index = SINT32_MAXIMUM // starting index to search from );
[ public, const ] SInt32 LastIndexOf( Byte byte // byte data to match with SInt32 index = SINT32_MAXIMUM // starting index to search from );
To search from other than the end, specify the starting index to match with. (The origin index is 0.)
The SFXBuffer::Mul function will influence upon the SFXBuffer object. To preserve the current data, it is necessary to copy it somewhere or use the operator* operator.
The SFXBuffer::Remove function shrinks the internal buffer.
[ public ] SFCError Set( SFXBufferConstRef buffer // buffer object to copy );
[ public ] SFCError Set( VoidConstPtr buffer // buffer data to copy UInt32 size // size of buffer data to copy );
[ public ] SFCError Set( Byte byte // Byte data to copy );
[ public ] SFCError Set( SFXAnsiStringConstRef string // string to copy );
[ public ] SFCError Set( SFXWideStringConstRef string // string to copy );
Construct buffer by copying data specified as an argument. The former buffer will be destroyed. To set buffer by not copying data, use the SFXBuffer::Attachfunction.
When the SFXAnsiString object is specified, the length of buffer is "the length of string + 1(='\0')". In case of SFXWideString, it is "( the length of string ) * 2 + 1".
SFXBuffer::GetBuffer | SFXBuffer::GetByte | SFXBuffer::GetSize | SFXBuffer::SetSize | SFXBuffer::operator[]
Set the minimum size when allocating memory.
SFXBuffer::GetBuffer | SFXBuffer::GetByte | SFXBuffer::GetSize | SFXBuffer::SetByte
[ public, const ] SFXBuffer Slice( UInt32 begin // beginning index of buffer to preserve UInt32 end // end index of buffer to preserve );
Preserve data between "begin" and "end" parameter specified, and remove the other.
The "begin" parameter is set to the first index of preserved data, and the "end" parameter is set to next to the last index of preserved data.
SFXAnsiString s("abracadabra");
SFXBuffer buf1(s); // buf1 is copied with null
buf1.Slice(2, 9); // buf1 = "racadab"
[ public, const ] Bool StartsWith( SFXBufferConstRef buffer // buffer object to check with );
[ public, const ] Bool StartsWith( VoidConstPtr buffer // buffer data to check with UInt32 size // size of buffer data to check with );
[ public, const ] Bool StartsWith( Byte byte // byte data to check with );
[ public ] SFXBufferRef operator=( SFXBufferConstRef buffer // buffer object to copy );
[ public, friend ] Bool operator==( SFXBufferConstRef left // SFXBuffer object to compare with SFXBufferConstRef right // SFXBuffer object to compare with );
[ public, friend ] Bool operator>=( SFXBufferConstRef left // SFXBuffer object to compare with SFXBufferConstRef right // SFXBuffer object to compare with );
[ public, friend ] Bool operator>( SFXBufferConstRef left // SFXBuffer object to compare with SFXBufferConstRef right // SFXBuffer object to compare with );
[ public ] ByteRef operator[]( UInt32 index // index of buffer data to get );
[ public, const ] ByteConstRef operator[]( UInt32 index // index of buffer data to get );
[ public, friend ] SFXBufferRef operator<<( SFXBufferRef left // SFXBuffer object to be added SFXBufferConstRef right // SFXBuffer object to add );
The Soperator<< will influence upon the SFXBuffer object. To preserve the former buffer data, it is necessary to copy it somewhere.
[ public, friend ] Bool operator<=( SFXBufferConstRef left // SFXBuffer object to compare with SFXBufferConstRef right // SFXBuffer object to compare with );
[ public, friend ] Bool operator<( SFXBufferConstRef left // SFXBuffer object to compare with SFXBufferConstRef right // SFXBuffer object to compare with );
[ public ] SFXBufferRef operator*=( SInt32 repeat // frequency to repeat );
[ public, friend ] SFXBuffer operator*( SFXBufferConstRef left // SFXBuffer object to repeat SInt32 right // frequency to repeat );
[ public, friend ] Bool operator!=( SFXBufferConstRef left // SFXBuffer object to compare with SFXBufferConstRef right // SFXBuffer object to compare with );
[ public ] SFXBufferRef operator+=( SFXBufferConstRef buffer // SFXBuffer object to add );
[ public ] SFXBufferRef operator+=( Byte byte // Byte data to add );
[ public, friend ] SFXBuffer operator+( SFXBufferConstRef left // SFXBuffer object to be added SFXBufferConstRef right // SFXBuffer object to add );
[ public, friend ] SFXBuffer operator+( SFXBufferConstRef left // SFXBuffer object to be added Byte right // Byte data to add );
enum DefaultEnum {
DEFAULT_THRESHOLD = 16, // default value of minimum heap size
DEFAULT_CLUSTER = 8 // default value of cluster size
};
|
Copyright (C) 2002 - 2009 Sophia Cradle, Inc. All Rights Reserved. |
![]() ![]() ![]()
|