#include <HxImgFtorKey.h>
Inheritance diagram for HxImgFtorKey::

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... | |
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.
00015 {
00016 for(int i = 0;i<maxKeySize;i++)
00017 _key[i] = 0;
00018 }
|
|
|
Copy constructor.
00021 {
00022 for(int i = 0;i<maxKeySize;i++)
00023 _key[i] = arg._key[i];
00024 }
|
|
||||||||||||||||
|
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 }
|
|
|
Constructor.
00036 {
00037 for(int i = 0;i<maxKeySize;i++)
00038 _key[i] = 0;
00039 _key[0] = uShort(nameTable().getClassNameId(className));
00040 }
|
|
|
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 }
|
|
||||||||||||
|
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 }
|
|
|
Get argument.
00070 {
00071 return ((i < maxKeySize-1) && _key[i+1]) ?
00072 nameTable().getTypeName(_key[i+1]) : HxString("");
00073 }
|
|
|
Get class name.
00077 {
00078 return nameTable().getClassName(_key[0]);
00079 }
|
|
|
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 }
|
|
|
Compare keys.
|
|
|
Put on given stream.
00115 {
00116 return os << toString();
00117 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001