Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxImgFtorKey Class Reference

Base class for keys for image functors. More...

#include <HxImgFtorKey.h>

Inheritance diagram for HxImgFtorKey::

HxImgFtorI1Key HxImgFtorI2Key HxImgFtorI3Key HxImgFtorI4Key HxImgFtorIMKey HxImgFtorIMNKey HxImgFtorI1CastKey HxImgFtorI2CastKey HxImgFtorI3CastKey HxImgFtorI4CastKey HxImgFtorIMCastKey HxImgFtorIMNCastKey HxImgFtorInOutKey HxImgFtorRgbKey HxImgFtorSetBorderKey HxImgFtorDiyKey HxImgFtorExportExtraKey HxImgFtorNgbKey HxImgFtorRecGenConvK1dKey HxImgFtorRecGenConvKey HxImgFtorSetKey HxImgFtorUpoKey HxImgFtorBpoKey HxImgFtorGenConvK1dKey HxImgFtorGenConvKey HxImgFtorKernelNgbKey HxImgFtorNgbExtraKey HxImgFtorQueueBasedKey HxImgFtorGenConv2dSepKey HxImgFtorNgbExtra2Key HxImgFtorMpoKey HxImgFtorMNpoKey List of all members.

Public Methods

 HxImgFtorKey ()
 Constructor. More...

 HxImgFtorKey (const HxImgFtorKey &)
 Copy constructor. More...

 HxImgFtorKey (HxString className, HxStringListIter argListBegin, HxStringListIter argListEnd)
 Constructor. More...

 HxImgFtorKey (HxString className)
 Constructor. More...

void addArgument (HxString argName)
 Add argument. More...

void setArguments (HxStringListIter argListBegin, HxStringListIter argListEnd)
 Set arguments. More...

HxString getArgument (int) const
 Get argument. More...

HxString getClassName () const
 Get class name. More...

HxString toString () const
 Convert key to string. More...

int compare (const HxImgFtorKey &) const
 Compare keys. More...

STD_OSTREAM & put (STD_OSTREAM &) const
 Put on given stream. More...


Detailed Description

Base class for keys for image functors.

A key is a list of strings where the first string corresponds to the name of the image functor and all other (existing) strings correspond to the template parameters of the functor class.


Constructor & Destructor Documentation

HxImgFtorKey::HxImgFtorKey (    ) 
 

Constructor.

00015 {
00016     for(int i = 0;i<maxKeySize;i++)
00017         _key[i] = 0;
00018 }

HxImgFtorKey::HxImgFtorKey (  const HxImgFtorKey &    arg ) 
 

Copy constructor.

00021 {
00022     for(int i = 0;i<maxKeySize;i++)
00023         _key[i] = arg._key[i];
00024 }

HxImgFtorKey::HxImgFtorKey (  HxString    className,
HxStringListIter    argListBegin,
HxStringListIter    argListEnd
) 
 

Constructor.

00028 {
00029     for(int i = 0;i<maxKeySize;i++)
00030         _key[i] = 0;
00031     _key[0] = uShort(nameTable().getClassNameId(className));
00032     setArguments(argListBegin, argListEnd);
00033 }

HxImgFtorKey::HxImgFtorKey (  HxString    className ) 
 

Constructor.

00036 {
00037     for(int i = 0;i<maxKeySize;i++)
00038         _key[i] = 0;
00039     _key[0] = uShort(nameTable().getClassNameId(className));
00040 }


Member Function Documentation

void HxImgFtorKey::addArgument (  HxString    argName ) 
 

Add argument.

00044 {
00045     int i;
00046     for (i=1; i<maxKeySize; i++)
00047         if (!_key[i]) break;
00048     if ((!_key[i]) && (i<maxKeySize-1))
00049     {
00050         _key[i] = uShort(nameTable().getTypeNameId(argName));
00051         _key[i+1] = 0;
00052     }
00053 }

void HxImgFtorKey::setArguments (  HxStringListIter    argListBegin,
HxStringListIter    argListEnd
) 
 

Set arguments.

00059 {
00060     int i;
00061     for(    i = 1;
00062             (argListBegin != argListEnd) && (i < maxKeySize - 1);
00063             i++, argListBegin++)
00064         _key[i] = uShort(nameTable().getTypeNameId(*argListBegin));
00065     _key[i] = 0;
00066 }

HxString HxImgFtorKey::getArgument (  int    i )  const
 

Get argument.

00070 {
00071     return ((i < maxKeySize-1) && _key[i+1]) ?
00072         nameTable().getTypeName(_key[i+1]) : HxString("");
00073 }

HxString HxImgFtorKey::getClassName (    )  const
 

Get class name.

00077 {
00078     return nameTable().getClassName(_key[0]);
00079 }

HxString HxImgFtorKey::toString (    )  const
 

Convert key to string.

00083 {
00084     HxString s(nameTable().getClassName(_key[0]));
00085     
00086     int i;
00087     
00088     for(i = 1;_key[i];i++)
00089     {
00090         if(i == 1) 
00091             s += "<";
00092         else
00093             s += ", ";
00094         s += nameTable().getTypeName(_key[i]);
00095     }   
00096 
00097     if(i > 1) 
00098         s += ">";
00099 
00100     return(s);
00101 }

int HxImgFtorKey::compare (  const HxImgFtorKey &    arg )  const
 

Compare keys.

00105 {
00106     int i;
00107     for(i=0;_key[i] && arg._key[i]; i++) 
00108         if(_key[i] != arg._key[i]) 
00109             break;
00110     return(_key[i] - arg._key[i]);
00111 }

STD_OSTREAM & HxImgFtorKey::put (  STD_OSTREAM &    os )  const
 

Put on given stream.

00115 {
00116     return os << toString();
00117 }


The documentation for this class was generated from the following files:
Generated on Mon Jan 27 15:49:03 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001