diff options
| author | Vincent Richard <[email protected]> | 2005-04-12 18:42:54 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2005-04-12 18:42:54 +0000 |
| commit | f879a9794c4908df8e7484250b56b13342a66038 (patch) | |
| tree | 83f91b9f743eb70d5398c6ce543596b434274c16 /src/parameterFactory.cpp | |
| parent | Added attachMDNRequest(). (diff) | |
| download | vmime-f879a9794c4908df8e7484250b56b13342a66038.tar.gz vmime-f879a9794c4908df8e7484250b56b13342a66038.zip | |
Added support for RFC-2231.
Diffstat (limited to 'src/parameterFactory.cpp')
| -rw-r--r-- | src/parameterFactory.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/parameterFactory.cpp b/src/parameterFactory.cpp index 77450409..a5a7a81c 100644 --- a/src/parameterFactory.cpp +++ b/src/parameterFactory.cpp @@ -73,4 +73,27 @@ parameter* parameterFactory::create } +parameter* parameterFactory::create(const string& name, const component& value) +{ + const string lcName = utility::stringUtils::toLower(name); + + NameMap::const_iterator pos = m_nameMap.find(lcName); + parameter* param = NULL; + + if (pos != m_nameMap.end()) + { + param = ((*pos).second)(); + } + else + { + param = registerer <defaultParameter>::creator(); + } + + param->m_name = name; + param->setValue(value); + + return (param); +} + + } // vmime |
