Skip to content

Commit

Permalink
Add setters/getters to catalogSearchParam for invesId. Refs #8757.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawrainey committed Feb 3, 2014
1 parent 3966212 commit 617c25d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Expand Up @@ -63,6 +63,8 @@ namespace Mantid
void setInvestigationType(const std::string& invstType);
/// Set the "my data only" flag to search only user's data if true.
void setMyData(bool flag);
/// Set the investigation id to search for.
void setInvestigationId(const std::string&);

/// Get the start run from user input.
const double& getRunStart() const;
Expand All @@ -88,6 +90,8 @@ namespace Mantid
const std::string& getInvestigationType() const;
/// Get the "my data only" flag.
bool getMyData() const;
/// Get the investigation id.
const std::string& getInvestigationId() const;
/// Saves the start/end date times to time_t value.
time_t getTimevalue(const std::string& sDate);

Expand Down Expand Up @@ -116,6 +120,8 @@ namespace Mantid
std::string m_investigationType;
/// My data checkbox
bool m_myData;
/// investigation id
std::string m_investigationId;
};
}
}
Expand Down
18 changes: 18 additions & 0 deletions Code/Mantid/Framework/ICat/src/CatalogSearchParam.cpp
Expand Up @@ -121,6 +121,15 @@ namespace Mantid
m_myData = flag;
}

/**
* Sets the investigation id to search for.
* @param investigationId :: investigation id to search for.
*/
void CatalogSearchParam::setInvestigationId(const std::string& investigationId)
{
m_investigationId = investigationId;
}

/**
* This method returns the start run number
* @return Run start number
Expand Down Expand Up @@ -229,6 +238,15 @@ namespace Mantid
return m_myData;
}

/**
* Gets the input from the investigation id field.
* @return Investigation id of the investigation.
*/
const std::string& CatalogSearchParam::getInvestigationId() const
{
return m_investigationId;
}

/**
* Creates a time_t value from an input date ("23/06/2003").
* @param inputDate :: string containing the date.
Expand Down

0 comments on commit 617c25d

Please sign in to comment.