]> git.tdb.fi Git - builder.git/blobdiff - source/sharedlibrary.h
Convert all list containers to vectors
[builder.git] / source / sharedlibrary.h
index 076cfdb71ab89bb82493b90608c0280dd28b7c98..54822aadcd0bfd794606a1444a80c06837df38a6 100644 (file)
@@ -3,28 +3,37 @@
 
 #include "binary.h"
 
+class ImportLibrary;
+
 /**
 Represents a shared library.  It has two special properties: libname and
 soname.  Libname is the name used by the linker.  Soname is the canonical
 filename of the library, including version number.  If the owning package has
 no version, soname will be empty.
+
+A SharedLibrary can also store a pointer to the associated ImportLibrary, for
+platforms that need one.
 */
 class SharedLibrary: public Binary
 {
 private:
        std::string libname;
        std::string soname;
+       ImportLibrary *import_lib;
 
 public:
        SharedLibrary(Builder &, const Msp::FS::Path &);
-       SharedLibrary(Builder &, const Component &, const std::list<ObjectFile *> &);
+       SharedLibrary(Builder &, const Component &, const std::vector<ObjectFile *> &);
+private:
+       static std::string generate_filename(const Component &);
 
-       virtual const char *get_type() const { return "SharedLibrary"; }
+public:
+       const char *get_type() const override { return "SharedLibrary"; }
        const std::string &get_libname() const { return libname; }
        const std::string &get_soname() const { return soname; }
 
-private:
-       static std::string generate_filename(const Component &);
+       void set_import_library(ImportLibrary *);
+       ImportLibrary *get_import_library() const { return import_lib; }
 };
 
 #endif