45 lines
1 KiB
C++
45 lines
1 KiB
C++
#pragma once
|
|
#ifndef REAL_BUILD
|
|
# include "externals.hh"
|
|
#endif
|
|
|
|
#include <ebcl/Sets.hh>
|
|
|
|
struct T_Project;
|
|
|
|
class A_ProjectPathListener
|
|
{
|
|
friend struct T_Project;
|
|
public:
|
|
virtual ~A_ProjectPathListener( ) = 0;
|
|
protected:
|
|
virtual void projectPathChanged( ) noexcept = 0;
|
|
};
|
|
|
|
struct T_Project
|
|
{
|
|
explicit T_Project( T_FSPath const& path ) noexcept
|
|
{ setBasePath( path ); }
|
|
|
|
void setBasePath( T_FSPath const& path ) noexcept;
|
|
|
|
T_FSPath const& basePath( ) const noexcept
|
|
{ return basePath_; }
|
|
|
|
T_FSPath pathOf( T_FSPath const& file ) const noexcept;
|
|
T_FSPath pathOf( char const* file ) const noexcept;
|
|
|
|
T_String strPathOf( T_FSPath const& file ) const noexcept;
|
|
T_String strPathOf( char const* file ) const noexcept;
|
|
|
|
void addListener( A_ProjectPathListener* listener ) noexcept
|
|
{ listeners_.add( listener ); }
|
|
void removeListener( A_ProjectPathListener* listener ) noexcept
|
|
{ listeners_.remove( listener ); }
|
|
|
|
private:
|
|
T_FSPath basePath_;
|
|
ebcl::T_Set< A_ProjectPathListener* > listeners_{
|
|
ebcl::UseTag< ebcl::ArrayBacked< 16 > >( )
|
|
};
|
|
};
|