OpenStudio:model
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
openstudio::model::ModelMerger Class Reference

#include <ModelMerger.hpp>

Public Member Functions

std::vector< LogMessageerrors () const
 Get error messages generated by the last translation. More...
 
std::vector< IddObjectTypeiddObjectTypesToMerge () const
 List of IddObjectTypes which are merged. More...
 
void mergeModels (Model &currentModel, const Model &newModel, const std::map< UUID, UUID > &handleMapping)
 Merges changes from newModel into currentModel Handle mapping is mapping of handles in currentModel (keys) to handles in newModel (values) More...
 
 ModelMerger ()
 
bool setIddObjectTypesToMerge (const std::vector< IddObjectType > &iddObjectTypesToMerge)
 Allow users to specify which IddObjectTypes to merge, not yet implemented (always returns false) More...
 
std::vector< LogMessagewarnings () const
 Get warning messages generated by the last translation. More...
 

Detailed Description

ModelMerger updates content in a current OpenStudio Model based on data from a new OpenStudio Model.

A map of handles which relates objects in the current OpenStudio Model to objects in the new OpenStudio Model is required. Objects in current OpenStudio Model may map to 0-1 objects in new OpenStudio Model. If an object in the new OpenStudio Model does not correspond to an object in the current OpenStudio Model it is assumed to be a new object.

Constructor & Destructor Documentation

openstudio::model::ModelMerger::ModelMerger ( )

Member Function Documentation

std::vector<LogMessage> openstudio::model::ModelMerger::errors ( ) const

Get error messages generated by the last translation.

std::vector<IddObjectType> openstudio::model::ModelMerger::iddObjectTypesToMerge ( ) const

List of IddObjectTypes which are merged.

void openstudio::model::ModelMerger::mergeModels ( Model currentModel,
const Model newModel,
const std::map< UUID, UUID > &  handleMapping 
)

Merges changes from newModel into currentModel Handle mapping is mapping of handles in currentModel (keys) to handles in newModel (values)

bool openstudio::model::ModelMerger::setIddObjectTypesToMerge ( const std::vector< IddObjectType > &  iddObjectTypesToMerge)

Allow users to specify which IddObjectTypes to merge, not yet implemented (always returns false)

std::vector<LogMessage> openstudio::model::ModelMerger::warnings ( ) const

Get warning messages generated by the last translation.