comma::IdentifierPool Class Reference

Collections of IdentifierInfo objects. More...

#include <IdentifierPool.h>

List of all members.

Public Types

typedef PoolType::const_iterator iterator

Public Member Functions

IdentifierInfogetIdentifierInfo (const char *name, size_t len)
 Returns an IdentifierInfo object associated with the given string.
IdentifierInfogetIdentifierInfo (const char *name)
 Returns the IdentifierInfo associated with the given null terminated string.
IdentifierInfogetIdentifierInfo (const std::string &name)
 Returns the IdentifierInfo associated with the given std::string.
iterator begin () const
 Provides an iterator over the elements of of this pool.
iterator end () const
 Sentinel marking the end of iteration.
unsigned size () const
 Returns the number of IdentifierInfo's managed by this pool.

Detailed Description

Collections of IdentifierInfo objects.

This class is much like a hash table mapping strings to unique IdentifierInfo objects. The interface to this class is quite sparse, as its primary roll is to serve as an allocator which persists throughout the life of the program.

See also:
IdentifierInfo

Definition at line 26 of file IdentifierPool.h.


Member Typedef Documentation

typedef PoolType::const_iterator comma::IdentifierPool::iterator

Definition at line 72 of file IdentifierPool.h.


Member Function Documentation

iterator comma::IdentifierPool::begin (  )  const [inline]

Provides an iterator over the elements of of this pool.

The objects returned are of type llvm::StringMapEntry -- essentially key value pairs of string and IdentifierInfo objects.

Definition at line 78 of file IdentifierPool.h.

iterator comma::IdentifierPool::end (  )  const [inline]

Sentinel marking the end of iteration.

Definition at line 81 of file IdentifierPool.h.

IdentifierInfo& comma::IdentifierPool::getIdentifierInfo ( const std::string &  name  )  [inline]

Returns the IdentifierInfo associated with the given std::string.

Parameters:
name The string to associate with an IdentifierInfo object.
Returns:
An interned (unique) IdentifierInfo object associated with name.

Definition at line 65 of file IdentifierPool.h.

IdentifierInfo& comma::IdentifierPool::getIdentifierInfo ( const char *  name  )  [inline]

Returns the IdentifierInfo associated with the given null terminated string.

Parameters:
name The string to associate with an IdentifierInfo object.
Returns:
An interned (unique) IdentifierInfo object associated with name.

Definition at line 55 of file IdentifierPool.h.

IdentifierInfo& comma::IdentifierPool::getIdentifierInfo ( const char *  name,
size_t  len 
) [inline]

Returns an IdentifierInfo object associated with the given string.

If no IdentifierInfo object is associated with the supplied string, the data is copied and a new IdentifierInfo node created. The string need not be null terminated (the copy will be terminated).

Parameters:
name The string to associate with an IdentifierInfo object.
len The length of the supplied string.
Returns:
An interned (unique) IdentifierInfo object associated with name.

Definition at line 44 of file IdentifierPool.h.

unsigned comma::IdentifierPool::size (  )  const [inline]

Returns the number of IdentifierInfo's managed by this pool.

Definition at line 84 of file IdentifierPool.h.


The documentation for this class was generated from the following file:

Generated on 1 Feb 2010 for Comma by  doxygen 1.6.1

Rabisu Mirror Service We provide mirrors to support Open source communities. Our mirror server is located in Istanbul/Turkey region.

Please do not hesitate to contact mirror@rabisu.com for new open source mirror submissions.