15 #ifndef SBMLDOCUMENTLOADER_H_
16 #define SBMLDOCUMENTLOADER_H_
25 #include <sbml/ListOf.h>
40 class Transformation2D;
41 class RenderInformationBase;
49 const ListOf & sbmlList,
50 const std::map<CCopasiObject*, SBase*> & copasimodelmap);
54 const std::map<std::string, std::string> & modelmap,
55 std::map<std::string, std::string> & layoutmap
56 ,
const std::map<std::string, std::string>& globalIdToKeyMap
66 const std::map<std::string, std::string> & layoutmap);
74 template<
typename RENDER_INFORMATION>
76 const std::map<std::string, std::string> & idToKeyMap)
78 size_t i, iMax = list.
size();
79 RENDER_INFORMATION* pRI = NULL;
80 std::map<std::string, std::string>::const_iterator pos;
82 for (i = 0; i < iMax; ++i)
86 if (pRI->getReferenceRenderInformationKey().find_first_not_of(
" \t\n\r") != std::string::npos)
88 pos = idToKeyMap.find(pRI->getReferenceRenderInformationKey());
89 assert(pos != idToKeyMap.end());
90 pRI->setReferenceRenderInformationKey(pos->second);
105 const std::map<std::string, std::string>& colorIdToKeyMap,
106 const std::map<std::string, std::string>& gradientIdToKeyMap,
107 const std::map<std::string, std::string>& lineEndingIdToKeyMap);
121 template<
typename RENDER_INFORMATION>
123 const std::map<std::string, std::string> & keyToIdMap)
125 size_t i, iMax = list.size();
126 RENDER_INFORMATION* pRI = NULL;
127 std::map<std::string, std::string>::const_iterator pos;
129 for (i = 0; i < iMax; ++i)
131 pRI =
dynamic_cast<RENDER_INFORMATION*
>(list.get((
unsigned int) i));
134 if (pRI->getReferenceRenderInformationId().find_first_not_of(
" \t\n\r") != std::string::npos)
136 pos = keyToIdMap.find(pRI->getReferenceRenderInformationId());
137 assert(pos != keyToIdMap.end());
138 pRI->setReferenceRenderInformationId(pos->second);
178 const std::map<std::string, std::string>& sourceMap,
179 std::map<std::string, std::string>& destMap
static void convertPropertyIds(CLTransformation2D *pObject, const std::map< std::string, std::string > &colorIdToKeyMap, const std::map< std::string, std::string > &gradientIdToKeyMap, const std::map< std::string, std::string > &lineEndingIdToKeyMap)
virtual size_t size() const
static void convertLayoutObjectKeys(LocalStyle &style, const std::map< std::string, std::string > &keyToIdMap)
static void convertRenderInformationReferencesIds(CCopasiVector< RENDER_INFORMATION > &list, const std::map< std::string, std::string > &idToKeyMap)
static CLayout * createLayout(const Layout &sbmlLayout, const std::map< std::string, std::string > &modelmap, std::map< std::string, std::string > &layoutmap, const std::map< std::string, std::string > &globalIdToKeyMap, const CCopasiContainer *pParent=NULL)
static void convertRenderInformationReferencesKeys(ListOf &list, const std::map< std::string, std::string > &keyToIdMap)
static void convertLayoutObjectIds(CLLocalStyle &style, const std::map< std::string, std::string > &idToKeyMap)
static void combineMaps(const std::map< std::string, std::string > &sourceMap, std::map< std::string, std::string > &destMap)
static void postprocessTextGlyph(const TextGlyph &sbml, const std::map< std::string, std::string > &layoutmap)
static void readListOfLayouts(CListOfLayouts &lol, const ListOf &sbmlList, const std::map< CCopasiObject *, SBase * > &copasimodelmap)