summaryrefslogtreecommitdiff
path: root/revdep/elf.h
blob: f7b18602ee0a7f66d0c689819f883c66bb936c09 (plain)
    1 // Copyright (C) 2016 James Buren
    2 //
    3 // This file is part of revdep.
    4 //
    5 // revdep is free software: you can redistribute it and/or modify
    6 // it under the terms of the GNU General Public License as published by
    7 // the Free Software Foundation, either version 3 of the License, or
    8 // (at your option) any later version.
    9 //
   10 // revdep is distributed in the hope that it will be useful,
   11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
   12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13 // GNU General Public License for more details.
   14 //
   15 // You should have received a copy of the GNU General Public License
   16 // along with revdep.  If not, see <http://www.gnu.org/licenses/>.
   17 
   18 #pragma once
   19 
   20 #include "utility.h"
   21 
   22 class Elf {
   23 private:
   24 	int _machine;
   25 	StringVector _needed;
   26 	StringVector _rpath;
   27 	StringVector _runpath;
   28 	std::string _path;
   29 	bool _initialized;
   30 
   31 public:
   32 	Elf(const std::string &path);
   33 
   34 	      int           Machine() const { return _machine;     }
   35 	const StringVector& Needed()  const { return _needed;      }
   36 	const StringVector& RPath()   const { return _rpath;       }
   37 	const StringVector& RunPath() const { return _runpath;     }
   38 	const std::string&  Path()    const { return _path;        }
   39 	      bool          Valid()   const { return _initialized; }
   40 
   41 	bool Compatible(const Elf &elf) const { return _machine == elf._machine; }
   42 };

Generated by cgit