~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/plugins/contrib/lib_finder/lib_finder.h

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::BlocksĀ 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* This file is part of lib_finder plugin for Code::Blocks Studio
 
3
* Copyright (C) 2006-2008  Bartlomiej Swiecki
 
4
*
 
5
* wxSmith 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 2 of the License, or
 
8
* (at your option) any later version.
 
9
*
 
10
* wxSmith 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 wxSmith; if not, write to the Free Software
 
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 
18
*
 
19
* $Revision: 7109 $
 
20
* $Id: lib_finder.h 7109 2011-04-15 11:53:16Z mortenmacfly $
 
21
* $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-16.xx/src/plugins/contrib/lib_finder/lib_finder.h $
 
22
*/
 
23
 
 
24
#ifndef LIB_AUTO_CONF_H
 
25
#define LIB_AUTO_CONF_H
 
26
 
 
27
#include <cbplugin.h>
 
28
#include <settings.h>
 
29
#include <sdk_events.h>
 
30
#include <tinyxml/tinyxml.h>
 
31
 
 
32
#include "librarydetectionmanager.h"
 
33
#include "resultmap.h"
 
34
#include "projectconfiguration.h"
 
35
#include "libraryresult.h"
 
36
#include "pkgconfigmanager.h"
 
37
 
 
38
class LibraryResult;
 
39
 
 
40
class lib_finder: public cbToolPlugin
 
41
{
 
42
        public:
 
43
 
 
44
                lib_finder();
 
45
                ~lib_finder();
 
46
                int Configure(){ return 0; }
 
47
                int Execute();
 
48
                void OnAttach();
 
49
                void OnRelease(bool appShutDown);
 
50
 
 
51
                static bool IsExtraEvent();
 
52
 
 
53
    private:
 
54
 
 
55
        virtual cbConfigurationPanel* GetProjectConfigurationPanel(wxWindow* parent, cbProject* project);
 
56
 
 
57
        void OnProjectHook(cbProject* project,TiXmlElement* elem,bool loading);
 
58
        void OnProjectClose(CodeBlocksEvent& event);
 
59
        void OnCompilerStarted(CodeBlocksEvent& event);
 
60
        void OnCompilerFinished(CodeBlocksEvent& event);
 
61
        void OnCompilerSetBuildOptions(CodeBlocksEvent& event);
 
62
        void SetupTarget(CompileTargetBase* Target,const wxArrayString& Libs);
 
63
        bool TryAddLibrary(CompileTargetBase* Target,LibraryResult* Result);
 
64
        void RegisterScripting();
 
65
        void UnregisterScripting();
 
66
        bool TryDownload(const wxString& ShortCode,const wxString& FileName);
 
67
 
 
68
        // These functions are used in scripting bindings
 
69
                static bool AddLibraryToProject(const wxString& LibName,cbProject* Project,const wxString& TargetName);
 
70
                static bool RemoveLibraryFromProject(const wxString& LibName,cbProject* Project,const wxString& TargetName);
 
71
                static bool IsLibraryInProject(const wxString& LibName,cbProject* Project,const wxString& TargetName);
 
72
                static bool SetupTargetManually(CompileTargetBase* Target);
 
73
                static bool EnsureIsDefined(const wxString& ShortCode);
 
74
 
 
75
        ProjectConfiguration* GetProject(cbProject* Project);
 
76
 
 
77
        WX_DECLARE_HASH_MAP(cbProject*,ProjectConfiguration*,wxPointerHash,wxPointerEqual,ProjectMapT);
 
78
        WX_DECLARE_HASH_MAP(CompileTargetBase*,wxArrayString,wxPointerHash,wxPointerEqual,TargetLibsMapT);
 
79
 
 
80
        ResultMap m_KnownLibraries[rtCount];
 
81
 
 
82
        PkgConfigManager m_PkgConfig;
 
83
        ProjectMapT m_Projects;         ///< \brief Extra data for projects
 
84
        TargetLibsMapT m_Targets;       ///< \brief Libs for targets in project which is currently being built
 
85
        int m_HookId;
 
86
 
 
87
        static lib_finder* m_Singleton;
 
88
};
 
89
 
 
90
#endif