Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Class «util::Align<Type,SIZEOF,Alloc>»

Alignment of simple types to byte boundary of memory.

Parameters:
Type — type of aligning data.
SIZEOF = sizeof(Type) — size of aligning data.
Alloc = Allocator — heap memory allocator class.

  • util::Align<Type,SIZEOF,Alloc>

public: Align();

Constructor.

public: Align(const Align& obj);

Copy constructor.

Parameters:
obj — reference to source object.

public: Align(Type val);

Constructor.

Parameters:
val — data value.

public: ~Align();

Destructor.

public: inline bool operator !=(const Align<Type>& obj1, const Align<Type>& obj2);

Comparison operator to unequal.

Parameters:
obj1 — reference to object.
obj2 — reference to object.

Returns:
true if objects are not equal.

public: void operator =(const Align& obj);

Assignment operator.

Parameters:
obj — reference to source object.

public: void operator =(Type val);

Assignment operator.

Parameters:
val — source data value.

public: inline bool operator ==(const Align<Type>& obj1, const Align<Type>& obj2);

Comparison operator to equal.

Parameters:
obj1 — reference to object.
obj2 — reference to object.

Returns:
true if objects are equal.

public: void operator delete(void* ptr);

Operator delete.

Parameters:
ptr — address of allocated memory block or a null pointer.

public: void* operator new(size_t size);

Operator new.

Parameters:
size — number of bytes to allocate.

Returns:
allocated memory address or a null pointer.

public: void* operator new(size_t size, void* ptr);

Operator new.

Parameters:
size — unused.
ptr — pointer to reserved memory area

Returns:
given pointer.

public: operator Type() const;

Conversion operator to type of aligning data.

Back to class list