Update of /cvsroot/simspark/simspark/spark/salt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3949
Modified Files:
sharedlibrary.h sharedlibrary.cpp
Log Message:
- added method GetName() that returns the name of the managed shared library
Index: sharedlibrary.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sharedlibrary.cpp 19 Dec 2005 19:52:24 -0000 1.2
--- sharedlibrary.cpp 22 Jan 2006 12:13:08 -0000 1.3
***************
*** 44,47 ****
--- 44,49 ----
}
+ mName = libName;
+
return (mLibHandle!=NULL);
}
***************
*** 62,67 ****
--- 64,76 ----
if (mLibHandle)
{
+ mName = "";
::dlclose(mLibHandle);
mLibHandle = NULL;
}
}
+
+ const std::string&
+ SharedLibrary::GetName() const
+ {
+ return mName;
+ }
Index: sharedlibrary.h
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** sharedlibrary.h 5 Dec 2005 20:56:00 -0000 1.1
--- sharedlibrary.h 22 Jan 2006 12:13:08 -0000 1.2
***************
*** 78,81 ****
--- 78,84 ----
void Close();
+ /** returns the name of the library */
+ const std::string& GetName() const;
+
//
// members
***************
*** 84,87 ****
--- 87,93 ----
/** a platform dependent handle to the managed library */
void *mLibHandle;
+
+ /** the name of the library */
+ std::string mName;
};
|