#line 1 "/user/cvsspst/ees1cg/RAVL/RAVL-0.7/SourceTools/CodeManager/LibInfo.hh" // This file is part of CxxDoc, The RAVL C++ Documentation tool // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU General // Public License (GPL). See the gpl.licence file for details or // see http://www.gnu.org/copyleft/gpl.html // file-header-ends-here #ifndef RAVL_LIBINFO_HEADER #define RAVL_LIBINFO_HEADER 1 //////////////////////////////////////////////////////////////// //! rcsid="$Id: LibInfo.hh,v 1.9 2002/03/05 16:28:45 craftit Exp $" //! userlevel=Normal //! docentry="Ravl.Source Tools" //! lib=RavlSourceTools //! author="Charles Galambos" //! file="Ravl/SourceTools/CodeManager/LibInfo.hh" #include "Ravl/RefCounter.hh" #include "Ravl/String.hh" #include "Ravl/DList.hh" namespace RavlN { class DefsMkFileC; //! userlevel=Develop //: Header info. // All you wanted to know about header files, but where // afraid to ask. class HeaderInfoC { public: HeaderInfoC(const StringC &headerName,const StringC &nPackage = StringC(),const StringC &sourceFile = StringC()) : name(headerName), package(nPackage), src(sourceFile) {} //: Constructor. StringC &Name() { return name; } //: Name of headerfile (without path.) StringC &Package() { return package; } //: Where is should be installed. StringC &SrcFile() { return src; } //: Where it is in the source tree. protected: StringC name; // Name of headerfile (without path.) StringC package; // Where is should be installed. StringC src; // Where it is in the source tree. }; //! userlevel=Develop //: Information about library. class LibInfoBodyC : public RCBodyC { public: LibInfoBodyC(const StringC &ln,bool isDummy = false) : dummy(isDummy), libName(ln.Copy()) {} //: Constructor. bool Add(DefsMkFileC &defs,const StringC &fromDir); //: Add information from defs file 'defs'. // True is returned if operation succeeded. const StringC &Name() const { return libName; } //: Get library name. DListC &UsesLibs() { return useslibs; } //: Libraries required by this one. DListC Sources() { return sources; } //: Source files in the library. DListC Headers() { return headers; } //: Headers for the library. bool IsDummy() const { return dummy; } //: Is this a dummy library ? const StringC &MustLink() const { return mustLink; } //: Required object file. // If none this is an empty string. protected: bool dummy; // Is this a dummy library ? StringC libName; DListC useslibs;// Libraries required by this one. DListC sources; // Source files in the library. DListC headers; // Headers for the library. StringC mustLink; // Is there an object file required for linking ? }; //! userlevel=Normal //: Information about library. class LibInfoC : public RCHandleC { public: LibInfoC() {} //: Default constructor, // creates an invalid handle. LibInfoC(const StringC &libraryName,bool isDummy = false) : RCHandleC(*new LibInfoBodyC(libraryName,isDummy)) {} //: Constructor. bool Add(DefsMkFileC &defs,const StringC &fromDir) { return Body().Add(defs,fromDir); } //: Add information from defs file 'defs'. // True is returned if operation succeeded. const StringC &Name() const { return Body().Name(); } //: Get library name. DListC &UsesLibs() { return Body().UsesLibs(); } //: Libraries directly required by this one. DListC Sources() { return Body().Sources(); } //: Source files in the library. DListC Headers() { return Body().Headers(); } //: Headers for the library. bool IsDummy() const { return Body().IsDummy(); } //: Is this a dummy library ? const StringC &MustLink() const { return Body().MustLink(); } //: Required object file. // If none this is an empty string. }; } #endif