Allocator.hpp
#if !defined(__ALLOCATOR_HPP)
#define __ALLOCATOR_HPP
/*
CoreLinux++
Copyright (C) 1999,2000 CoreLinux Consortium
The CoreLinux++ Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The CoreLinux++ Library Library is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#if !defined(__COMMON_HPP)
#include <Common.hpp>
#endif
#if !defined(__STRATEGY_HPP)
#include <Strategy.hpp>
#endif
namespace corelinux
{
DECLARE_CLASS( Allocator );
class Allocator : public Strategy
{
public:
//
// Constructors and destructor
//
Allocator( void );
Allocator( AllocatorCref );
virtual ~Allocator( void );
//
// Operator overloads
//
Allocator & operator=( AllocatorCref );
bool operator==( AllocatorCref ) const;
//
// Accessors
//
virtual CountCref getAllocateCount( void ) const;
virtual CountCref getDeallocateCount( void ) const;
//
// Mutators
//
virtual void incrementAllocates( void );
virtual void decrementAllocates( void );
virtual void incrementDeallocates( void );
virtual void decrementDeallocates( void );
protected:
private:
Count theAllocates;
Count theDeallocates;
};
}
#endif // if !defined(__ALLOCATOR_HPP)
/*
Common rcs information do not modify
$Author: frankc $
$Revision: 1.2 $
$Date: 2000/05/13 12:32:21 $
$Locker: $
*/
corelinux::Allocator::operator=
Allocator & operator=(AllocatorCref)
Assingment operator overload.
Definition: Allocator.cpp:72
corelinux::Allocator::~Allocator
virtual ~Allocator(void)
Virtual destructor.
Definition: Allocator.cpp:63
corelinux::Allocator::incrementDeallocates
virtual void incrementDeallocates(void)
Increment the deallocates.
Definition: Allocator.cpp:122
corelinux::Allocator::incrementAllocates
virtual void incrementAllocates(void)
Increment the allocates.
Definition: Allocator.cpp:117
corelinux::Allocator::decrementAllocates
virtual void decrementAllocates(void)
Decrement the allocates.
Definition: Allocator.cpp:127
corelinux
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
corelinux::Allocator
Allocator is a Strategy class used by AbstractAllocator and AbstractFactory.Each Allocator instance t...
Definition: Allocator.hpp:43
corelinux::Allocator::getAllocateCount
virtual CountCref getAllocateCount(void) const
Retrieves the number of allocations by this Allocator.
Definition: Allocator.cpp:99
corelinux::Strategy
Strategy is a base class for describing families of alogrithms.
Definition: Strategy.hpp:39
corelinux::Allocator::decrementDeallocates
virtual void decrementDeallocates(void)
Decrement the deallocates.
Definition: Allocator.cpp:132
corelinux::Allocator::operator==
bool operator==(AllocatorCref) const
Equality operator overload.
Definition: Allocator.cpp:90
corelinux::Allocator::getDeallocateCount
virtual CountCref getDeallocateCount(void) const
Retrieves the number of deallocations by this Allocator.
Definition: Allocator.cpp:108
corelinux::Allocator::Allocator
Allocator(void)
Default constructor.
Definition: Allocator.cpp:37

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium