torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::architecture::TileInfo Class Reference

Encapsulation of a tile within a device tile map. More...

#include <TileInfo.hpp>

+ Collaboration diagram for torc::architecture::TileInfo:

Public Member Functions

 TileInfo (void)
 Null constructor. More...
 
 ~TileInfo (void)
 Non-virtual destructor. More...
 
const TileTypeIndexgetTypeIndex (void) const
 Returns the tile type index for this tile. More...
 
const TileRowgetRow (void) const
 Returns the row for this tile. More...
 
const TileColgetCol (void) const
 Returns the column for this tile. More...
 
const char * getName (void) const
 Returns the name for this tile. More...
 

Protected Types

typedef boost::uint32_t uint32_t
 Imported type name. More...
 
typedef boost::int32_t int32_t
 Imported type name. More...
 
typedef xilinx::TileTypeIndex TileTypeIndex
 Imported type name. More...
 
typedef xilinx::TileRow TileRow
 Imported type name. More...
 
typedef xilinx::TileCol TileCol
 Imported type name. More...
 

Protected Member Functions

void set (const TileTypeIndex &inTypeIndex, const TileRow &inRow, const TileCol &inCol, const char *inName)
 Protected initializer intended for use by the Tiles class. More...
 
 TileInfo (const TileInfo &)
 Disabled copy constructor. More...
 

Protected Attributes

TileTypeIndex mTypeIndex
 The tile type index for this tile. More...
 
TileRow mRow
 The row for this tile. More...
 
TileCol mCol
 The column for this tile. More...
 
const char * mName
 The name for this tile. More...
 

Friends

class Tiles
 The Tiles class has access to our protected members. More...
 
class torc::architecture::architecture::TileInfoUnitTest
 Our unit test has direct access to our internals. More...
 
uint32_t manhattanDistance (const TileInfo &inA, const TileInfo &inB)
 Returns the Manhattan distance between two tiles. More...
 

Detailed Description

Encapsulation of a tile within a device tile map.

Definition at line 33 of file TileInfo.hpp.

Member Typedef Documentation

typedef boost::int32_t torc::architecture::TileInfo::int32_t
protected

Imported type name.

Definition at line 42 of file TileInfo.hpp.

Imported type name.

Definition at line 45 of file TileInfo.hpp.

Imported type name.

Definition at line 44 of file TileInfo.hpp.

Imported type name.

Definition at line 43 of file TileInfo.hpp.

typedef boost::uint32_t torc::architecture::TileInfo::uint32_t
protected

Imported type name.

Definition at line 41 of file TileInfo.hpp.

Constructor & Destructor Documentation

torc::architecture::TileInfo::TileInfo ( const TileInfo )
inlineprotected

Disabled copy constructor.

Definition at line 74 of file TileInfo.hpp.

74 : mTypeIndex(), mRow(), mCol(), mName(0) {}
TileCol mCol
The column for this tile.
Definition: TileInfo.hpp:52
TileTypeIndex mTypeIndex
The tile type index for this tile.
Definition: TileInfo.hpp:48
const char * mName
The name for this tile.
Definition: TileInfo.hpp:54
TileRow mRow
The row for this tile.
Definition: TileInfo.hpp:50
torc::architecture::TileInfo::TileInfo ( void  )
inline

Null constructor.

Definition at line 78 of file TileInfo.hpp.

78 : mTypeIndex(), mRow(), mCol(), mName(0) {}
TileCol mCol
The column for this tile.
Definition: TileInfo.hpp:52
TileTypeIndex mTypeIndex
The tile type index for this tile.
Definition: TileInfo.hpp:48
const char * mName
The name for this tile.
Definition: TileInfo.hpp:54
TileRow mRow
The row for this tile.
Definition: TileInfo.hpp:50
torc::architecture::TileInfo::~TileInfo ( void  )
inline

Non-virtual destructor.

Definition at line 80 of file TileInfo.hpp.

80  {
81  // release the tile name if allocated
82  if(mName != 0) { free(const_cast<char*>(mName)); mName = 0; }
83  }
const char * mName
The name for this tile.
Definition: TileInfo.hpp:54

Member Function Documentation

const TileCol& torc::architecture::TileInfo::getCol ( void  ) const
inline

Returns the column for this tile.

Definition at line 96 of file TileInfo.hpp.

96 { return mCol; }
TileCol mCol
The column for this tile.
Definition: TileInfo.hpp:52

+ Here is the caller graph for this function:

const char* torc::architecture::TileInfo::getName ( void  ) const
inline

Returns the name for this tile.

Definition at line 98 of file TileInfo.hpp.

98 { return mName; }
const char * mName
The name for this tile.
Definition: TileInfo.hpp:54

+ Here is the caller graph for this function:

const TileRow& torc::architecture::TileInfo::getRow ( void  ) const
inline

Returns the row for this tile.

Definition at line 94 of file TileInfo.hpp.

94 { return mRow; }
TileRow mRow
The row for this tile.
Definition: TileInfo.hpp:50

+ Here is the caller graph for this function:

const TileTypeIndex& torc::architecture::TileInfo::getTypeIndex ( void  ) const
inline

Returns the tile type index for this tile.

Definition at line 92 of file TileInfo.hpp.

92 { return mTypeIndex; }
TileTypeIndex mTypeIndex
The tile type index for this tile.
Definition: TileInfo.hpp:48

+ Here is the caller graph for this function:

void torc::architecture::TileInfo::set ( const TileTypeIndex inTypeIndex,
const TileRow inRow,
const TileCol inCol,
const char *  inName 
)
inlineprotected

Protected initializer intended for use by the Tiles class.

Parameters
inTypeIndexThe tile type index.
inRowThe tile row.
inColThe tile column.
inNameThe tile name.

Definition at line 61 of file TileInfo.hpp.

62  {
63  // release the current name if applicable
64  if(mName != 0) { free(const_cast<char*>(mName)); mName = 0; }
65  // make a private copy of the tile name
66  mName = strdup(inName);
67  // copy the remaining fields
68  mTypeIndex = inTypeIndex;
69  mRow = inRow;
70  mCol = inCol;
71  }
TileCol mCol
The column for this tile.
Definition: TileInfo.hpp:52
TileTypeIndex mTypeIndex
The tile type index for this tile.
Definition: TileInfo.hpp:48
const char * mName
The name for this tile.
Definition: TileInfo.hpp:54
TileRow mRow
The row for this tile.
Definition: TileInfo.hpp:50

+ Here is the caller graph for this function:

Friends And Related Function Documentation

uint32_t manhattanDistance ( const TileInfo inA,
const TileInfo inB 
)
friend

Returns the Manhattan distance between two tiles.

Definition at line 86 of file TileInfo.hpp.

86  {
87  return uint32_t(abs(int32_t(inA.mRow) - int32_t(inB.mRow)))
88  + uint32_t(abs(int32_t(inA.mCol) - int32_t(inB.mCol)));
89  }
boost::int32_t int32_t
Imported type name.
Definition: TileInfo.hpp:42
boost::uint32_t uint32_t
Imported type name.
Definition: TileInfo.hpp:41
friend class Tiles
friend

The Tiles class has access to our protected members.

Definition at line 36 of file TileInfo.hpp.

friend class torc::architecture::architecture::TileInfoUnitTest
friend

Our unit test has direct access to our internals.

Definition at line 38 of file TileInfo.hpp.

Field Documentation

TileCol torc::architecture::TileInfo::mCol
protected

The column for this tile.

Definition at line 52 of file TileInfo.hpp.

const char* torc::architecture::TileInfo::mName
protected

The name for this tile.

Definition at line 54 of file TileInfo.hpp.

TileRow torc::architecture::TileInfo::mRow
protected

The row for this tile.

Definition at line 50 of file TileInfo.hpp.

TileTypeIndex torc::architecture::TileInfo::mTypeIndex
protected

The tile type index for this tile.

Definition at line 48 of file TileInfo.hpp.


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