OpenStudioCore:project
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | List of all members
openstudio::project::RemoveUndo Class Reference

#include <ProjectDatabase.hpp>

Public Types

enum  RemoveSource { FromNew, FromDirty, FromClean, FromRemoved }
 Map that Record was removed from. More...
 

Public Member Functions

void concat (const RemoveUndo &other)
 Concatenate this RemoveUndo object with another one. More...
 
UUID primaryHandle () const
 Returns the handle of the primary Record removed, e.g. More...
 
std::vector< std::pair< UUID,
RemoveSource > > 
removedObjects () const
 Returns a vector of pairs with Record handle and RemoveSource. More...
 
 RemoveUndo (UUID handle, RemoveSource removeSource)
 Constructor takes Record handle and RemoveSource. More...
 

Detailed Description

RemoveUndo is a simple class used to commit or revert a removeRecord operation in the ProjectDatabase.

Member Enumeration Documentation

Map that Record was removed from.

Enumerator
FromNew 
FromDirty 
FromClean 
FromRemoved 

Constructor & Destructor Documentation

openstudio::project::RemoveUndo::RemoveUndo ( UUID  handle,
RemoveSource  removeSource 
)

Constructor takes Record handle and RemoveSource.

Member Function Documentation

void openstudio::project::RemoveUndo::concat ( const RemoveUndo other)

Concatenate this RemoveUndo object with another one.

Does not change the primaryHandle.

UUID openstudio::project::RemoveUndo::primaryHandle ( ) const

Returns the handle of the primary Record removed, e.g.

the one passed to removeRecord.

std::vector<std::pair<UUID, RemoveSource> > openstudio::project::RemoveUndo::removedObjects ( ) const

Returns a vector of pairs with Record handle and RemoveSource.