[cmake-commits] king committed cmSourceFile.cxx 1.38 1.39
cmSourceFile.h 1.22 1.23
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Dec 17 10:12:21 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv13904/Source
Modified Files:
cmSourceFile.cxx cmSourceFile.h
Log Message:
ENH: Added cmSourceFile::GetLocation method to get a read-only reference to the Location ivar. This partially addresses issue #6137.
Index: cmSourceFile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.cxx,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- cmSourceFile.cxx 19 Nov 2007 19:27:31 -0000 1.38
+++ cmSourceFile.cxx 17 Dec 2007 15:12:19 -0000 1.39
@@ -76,6 +76,12 @@
}
//----------------------------------------------------------------------------
+cmSourceFileLocation const& cmSourceFile::GetLocation() const
+{
+ return this->Location;
+}
+
+//----------------------------------------------------------------------------
std::string const& cmSourceFile::GetFullPath()
{
if(this->FullPath.empty())
Index: cmSourceFile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmSourceFile.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- cmSourceFile.h 18 Jun 2007 15:59:23 -0000 1.22
+++ cmSourceFile.h 17 Dec 2007 15:12:19 -0000 1.23
@@ -53,12 +53,24 @@
bool GetPropertyAsBool(const char *prop) const;
/**
- * The full path to the file.
+ * The full path to the file. The non-const version of this method
+ * may attempt to locate the file on disk and finalize its location.
+ * The const version of this method may return an empty string if
+ * the non-const version has not yet been called (yes this is a
+ * horrible interface, but is necessary for backwards
+ * compatibility).
*/
std::string const& GetFullPath();
std::string const& GetFullPath() const;
/**
+ * Get the information currently known about the source file
+ * location without attempting to locate the file as GetFullPath
+ * would. See cmSourceFileLocation documentation.
+ */
+ cmSourceFileLocation const& GetLocation() const;
+
+ /**
* Get the file extension of this source file.
*/
std::string const& GetExtension() const;
More information about the Cmake-commits
mailing list