aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-09-30 18:30:38 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-09-30 18:30:38 +0000
commit31a6b81915e32bd38db09b380aafbac4a35df917 (patch)
tree0a15649a2477dfdd1780a328355a5c6cd60bd75b
parenta5eab14b5b42edebbffb3aa22c014020dca6aaae (diff)
downloadpaludis-31a6b81915e32bd38db09b380aafbac4a35df917.tar.gz
paludis-31a6b81915e32bd38db09b380aafbac4a35df917.tar.xz
More visibility work
-rw-r--r--paludis/util/Makefile.am.m42
-rw-r--r--paludis/util/collection.hh6
-rw-r--r--paludis/util/collection_concrete.hh6
-rw-r--r--paludis/util/counted_ptr.hh3
-rw-r--r--paludis/util/destringify.hh3
-rw-r--r--paludis/util/dir_iterator.hh5
-rw-r--r--paludis/util/exception.hh13
-rw-r--r--paludis/util/fd_holder.hh2
-rw-r--r--paludis/util/fd_output_stream.hh6
-rw-r--r--paludis/util/fs_entry.hh14
-rw-r--r--paludis/util/is_file_with_extension.hh2
-rw-r--r--paludis/util/pipe.hh2
-rw-r--r--paludis/util/pstream.hh9
-rw-r--r--paludis/util/random.hh3
-rw-r--r--paludis/util/strip.hh9
-rw-r--r--paludis/util/system.hh24
-rw-r--r--paludis/util/tokeniser.hh2
17 files changed, 61 insertions, 50 deletions
diff --git a/paludis/util/Makefile.am.m4 b/paludis/util/Makefile.am.m4
index 3c02276..1adce6b 100644
--- a/paludis/util/Makefile.am.m4
+++ b/paludis/util/Makefile.am.m4
@@ -32,7 +32,7 @@ include(`paludis/util/files.m4')
CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda
MAINTAINERCLEANFILES = Makefile.in Makefile.am paludis.hh \
hashed_containers.hh util.hh attributes.hh
-AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
+AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
DEFS=\
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DLIBEXECDIR=\"$(libexecdir)\"
diff --git a/paludis/util/collection.hh b/paludis/util/collection.hh
index 0980f7d..6ad6785 100644
--- a/paludis/util/collection.hh
+++ b/paludis/util/collection.hh
@@ -44,7 +44,7 @@ namespace paludis
* \ingroup grpcollections
*/
template <typename T_>
- class SequentialCollection :
+ class PALUDIS_VISIBLE SequentialCollection :
private InstantiationPolicy<SequentialCollection<T_>, instantiation_method::NonCopyableTag>,
public InternalCounted<SequentialCollection<T_> >,
public std::iterator<typename std::iterator_traits<
@@ -136,7 +136,7 @@ namespace paludis
* \ingroup grpcollections
*/
template <typename T_, typename C_ = std::less<T_> >
- class SortedCollection :
+ class PALUDIS_VISIBLE SortedCollection :
private InstantiationPolicy<SortedCollection<T_, C_>, instantiation_method::NonCopyableTag>,
public InternalCounted<SortedCollection<T_, C_> >,
public std::iterator<typename std::iterator_traits<
@@ -248,7 +248,7 @@ namespace paludis
* \ingroup grpcollections
*/
template <typename K_, typename V_>
- class AssociativeCollection :
+ class PALUDIS_VISIBLE AssociativeCollection :
private InstantiationPolicy<AssociativeCollection<K_, V_>, instantiation_method::NonCopyableTag>,
public InternalCounted<AssociativeCollection<K_, V_> >,
public std::iterator<typename std::iterator_traits<
diff --git a/paludis/util/collection_concrete.hh b/paludis/util/collection_concrete.hh
index 4124cbe..af2031a 100644
--- a/paludis/util/collection_concrete.hh
+++ b/paludis/util/collection_concrete.hh
@@ -44,7 +44,7 @@ namespace paludis
* \ingroup grpcollections
*/
template <typename T_>
- class SequentialCollection<T_>::Concrete :
+ class PALUDIS_VISIBLE SequentialCollection<T_>::Concrete :
public SequentialCollection<T_>
{
private:
@@ -113,7 +113,7 @@ namespace paludis
* \ingroup grpcollections
*/
template <typename T_, typename C_ = std::less<T_> >
- class SortedCollection<T_, C_>::Concrete :
+ class PALUDIS_VISIBLE SortedCollection<T_, C_>::Concrete :
public SortedCollection<T_, C_>
{
private:
@@ -213,7 +213,7 @@ namespace paludis
* \ingroup grpcollections
*/
template <typename K_, typename V_>
- class AssociativeCollection<K_, V_>::Concrete :
+ class PALUDIS_VISIBLE AssociativeCollection<K_, V_>::Concrete :
public AssociativeCollection<K_, V_>
{
private:
diff --git a/paludis/util/counted_ptr.hh b/paludis/util/counted_ptr.hh
index 22f99a8..883ee47 100644
--- a/paludis/util/counted_ptr.hh
+++ b/paludis/util/counted_ptr.hh
@@ -38,7 +38,8 @@ namespace paludis
* \ingroup grppointers
* \ingroup grpexceptions
*/
- class CountedPtrError : public Exception
+ class PALUDIS_VISIBLE CountedPtrError :
+ public Exception
{
public:
///\name Basic operations
diff --git a/paludis/util/destringify.hh b/paludis/util/destringify.hh
index 4dd6eea..c272d29 100644
--- a/paludis/util/destringify.hh
+++ b/paludis/util/destringify.hh
@@ -38,7 +38,8 @@ namespace paludis
* \ingroup grpdestringify
* \ingroup grpexceptions
*/
- class DestringifyError : public Exception
+ class PALUDIS_VISIBLE DestringifyError :
+ public Exception
{
public:
///\name Basic operations
diff --git a/paludis/util/dir_iterator.hh b/paludis/util/dir_iterator.hh
index 5993c8c..3892ae4 100644
--- a/paludis/util/dir_iterator.hh
+++ b/paludis/util/dir_iterator.hh
@@ -39,7 +39,8 @@ namespace paludis
* \ingroup grpfilesystem
* \ingroup grpexceptions
*/
- class DirOpenError : public FSError
+ class PALUDIS_VISIBLE DirOpenError :
+ public FSError
{
public:
///\name Basic operations
@@ -59,7 +60,7 @@ namespace paludis
*
* \ingroup grpfilesystem
*/
- class DirIterator :
+ class PALUDIS_VISIBLE DirIterator :
public std::iterator<std::forward_iterator_tag, FSEntry>,
private PrivateImplementationPattern<DirIterator>
{
diff --git a/paludis/util/exception.hh b/paludis/util/exception.hh
index 08df9f0..42f406a 100644
--- a/paludis/util/exception.hh
+++ b/paludis/util/exception.hh
@@ -40,7 +40,7 @@ namespace paludis
*
* \ingroup grpexceptions
*/
- class Context
+ class PALUDIS_VISIBLE Context
{
private:
Context(const Context &);
@@ -70,7 +70,7 @@ namespace paludis
*
* \ingroup grpexceptions
*/
- class Exception :
+ class PALUDIS_VISIBLE Exception :
public std::exception
{
private:
@@ -120,7 +120,8 @@ namespace paludis
*
* \ingroup grpexceptions
*/
- class InternalError : public Exception
+ class PALUDIS_VISIBLE InternalError :
+ public Exception
{
public:
/**
@@ -150,7 +151,8 @@ namespace paludis
* \ingroup grpexceptions
* \ingroup grpnames
*/
- class NameError : public Exception
+ class PALUDIS_VISIBLE NameError :
+ public Exception
{
protected:
/**
@@ -168,7 +170,8 @@ namespace paludis
* \ingroup grpexceptions
* \ingroup grpconfigfile
*/
- class ConfigurationError : public Exception
+ class PALUDIS_VISIBLE ConfigurationError :
+ public Exception
{
public:
/**
diff --git a/paludis/util/fd_holder.hh b/paludis/util/fd_holder.hh
index 40676c8..2798fd9 100644
--- a/paludis/util/fd_holder.hh
+++ b/paludis/util/fd_holder.hh
@@ -27,7 +27,7 @@ namespace paludis
/**
* RAII holder for a file descriptor.
*/
- class FDHolder
+ class PALUDIS_VISIBLE FDHolder
{
private:
const int _fd;
diff --git a/paludis/util/fd_output_stream.hh b/paludis/util/fd_output_stream.hh
index f4480e4..84ee6ed 100644
--- a/paludis/util/fd_output_stream.hh
+++ b/paludis/util/fd_output_stream.hh
@@ -33,7 +33,7 @@ namespace paludis
*
* \ingroup grpfdotputstream
*/
- class FDOutputStreamBuf :
+ class PALUDIS_VISIBLE FDOutputStreamBuf :
public std::streambuf
{
protected:
@@ -74,7 +74,7 @@ namespace paludis
*
* \ingroup grpfdotputstream
*/
- class FDOutputStreamBase
+ class PALUDIS_VISIBLE FDOutputStreamBase
{
protected:
FDOutputStreamBuf buf;
@@ -96,7 +96,7 @@ namespace paludis
*
* \ingroup grpfdotputstream
*/
- class FDOutputStream :
+ class PALUDIS_VISIBLE FDOutputStream :
protected FDOutputStreamBase,
public std::ostream
{
diff --git a/paludis/util/fs_entry.hh b/paludis/util/fs_entry.hh
index 13d8343..9462229 100644
--- a/paludis/util/fs_entry.hh
+++ b/paludis/util/fs_entry.hh
@@ -43,7 +43,8 @@ namespace paludis
* \ingroup grpexceptions
* \ingroup grpfilesystem
*/
- class FSError : public Exception
+ class PALUDIS_VISIBLE FSError :
+ public Exception
{
public:
///\name Basic operations
@@ -83,10 +84,11 @@ namespace paludis
*
* \ingroup grpfilesystem
*/
- class FSEntry : public ComparisonPolicy<
- FSEntry,
- comparison_mode::FullComparisonTag,
- comparison_method::CompareByMemberTag<std::string> >
+ class PALUDIS_VISIBLE FSEntry :
+ public ComparisonPolicy<
+ FSEntry,
+ comparison_mode::FullComparisonTag,
+ comparison_method::CompareByMemberTag<std::string> >
{
friend std::ostream & operator<< (std::ostream & s, const FSEntry & f);
@@ -315,7 +317,7 @@ namespace paludis
*
* \ingroup grpfilesystem
*/
- std::ostream & operator<< (std::ostream & s, const FSEntry & f);
+ std::ostream & operator<< (std::ostream & s, const FSEntry & f) PALUDIS_VISIBLE;
template <typename T_> class SequentialCollection;
diff --git a/paludis/util/is_file_with_extension.hh b/paludis/util/is_file_with_extension.hh
index 2ce5116..a96d290 100644
--- a/paludis/util/is_file_with_extension.hh
+++ b/paludis/util/is_file_with_extension.hh
@@ -39,7 +39,7 @@ namespace paludis
*
* \ingroup grpfilesystem
*/
- class IsFileWithExtension :
+ class PALUDIS_VISIBLE IsFileWithExtension :
public std::unary_function<bool, FSEntry>
{
private:
diff --git a/paludis/util/pipe.hh b/paludis/util/pipe.hh
index 9e7567c..048f9fa 100644
--- a/paludis/util/pipe.hh
+++ b/paludis/util/pipe.hh
@@ -35,7 +35,7 @@ namespace paludis
*
* \ingroup grppipe
*/
- class Pipe :
+ class PALUDIS_VISIBLE Pipe :
InstantiationPolicy<Pipe, instantiation_method::NonCopyableTag>
{
private:
diff --git a/paludis/util/pstream.hh b/paludis/util/pstream.hh
index 0acb153..035eb18 100644
--- a/paludis/util/pstream.hh
+++ b/paludis/util/pstream.hh
@@ -44,7 +44,8 @@ namespace paludis
* \ingroup grpsystem
* \ingroup grpexceptions
*/
- class PStreamError : public Exception
+ class PALUDIS_VISIBLE PStreamError :
+ public Exception
{
public:
///\name Basic operations
@@ -66,7 +67,7 @@ namespace paludis
*
* \ingroup grpsystem
*/
- class PStreamInBuf :
+ class PALUDIS_VISIBLE PStreamInBuf :
public std::streambuf,
private InstantiationPolicy<PStreamInBuf, instantiation_method::NonCopyableTag>
{
@@ -146,7 +147,7 @@ namespace paludis
*
* \ingroup grpsystem
*/
- struct PStreamInBufBase :
+ struct PALUDIS_VISIBLE PStreamInBufBase :
private paludis::InstantiationPolicy<PStreamInBufBase, instantiation_method::NonCopyableTag>
{
/**
@@ -170,7 +171,7 @@ namespace paludis
*
* \ingroup grpsystem
*/
- class PStream :
+ class PALUDIS_VISIBLE PStream :
private InstantiationPolicy<PStream, instantiation_method::NonCopyableTag>,
protected pstream_internals::PStreamInBufBase,
public std::istream
diff --git a/paludis/util/random.hh b/paludis/util/random.hh
index 8e7d1ad..38a67f6 100644
--- a/paludis/util/random.hh
+++ b/paludis/util/random.hh
@@ -22,6 +22,7 @@
#include <cstdlib>
#include <inttypes.h>
+#include <paludis/util/attributes.hh>
namespace paludis
{
@@ -34,7 +35,7 @@ namespace paludis
*
* \ingroup grprandom
*/
- class Random
+ class PALUDIS_VISIBLE Random
{
private:
static uint32_t global_seed;
diff --git a/paludis/util/strip.hh b/paludis/util/strip.hh
index 2bcd166..6a3790a 100644
--- a/paludis/util/strip.hh
+++ b/paludis/util/strip.hh
@@ -22,6 +22,7 @@
#include <functional>
#include <string>
+#include <paludis/util/attributes.hh>
/** \file
* Strip functions and adapters.
@@ -37,7 +38,7 @@ namespace paludis
*
* \ingroup grpstrippers
*/
- std::string strip_leading_string(const std::string & s, const std::string & prefix);
+ std::string strip_leading_string(const std::string & s, const std::string & prefix) PALUDIS_VISIBLE;
/**
* Return a string equal to s, minus the string remove if remove occurs at
@@ -45,7 +46,7 @@ namespace paludis
*
* \ingroup grpstrippers
*/
- std::string strip_leading(const std::string & s, const std::string & remove);
+ std::string strip_leading(const std::string & s, const std::string & remove) PALUDIS_VISIBLE;
/**
* Return a string equal to s minus any trailing characters that are
@@ -53,7 +54,7 @@ namespace paludis
*
* \ingroup grpstrippers
*/
- std::string strip_trailing_string(const std::string & s, const std::string & suffix);
+ std::string strip_trailing_string(const std::string & s, const std::string & suffix) PALUDIS_VISIBLE;
/**
* Return a string equal to s, minus the string remove if remove occurs at
@@ -61,7 +62,7 @@ namespace paludis
*
* \ingroup grpstrippers
*/
- std::string strip_trailing(const std::string & s, const std::string & remove);
+ std::string strip_trailing(const std::string & s, const std::string & remove) PALUDIS_VISIBLE;
/**
* Adapt one of the strip_ functions for use as a std::unary_function by
diff --git a/paludis/util/system.hh b/paludis/util/system.hh
index 4d94e96..4183a45 100644
--- a/paludis/util/system.hh
+++ b/paludis/util/system.hh
@@ -39,7 +39,7 @@ namespace paludis
* \ingroup grpexceptions
* \ingroup grpsystem
*/
- class GetenvError : public Exception
+ class PALUDIS_VISIBLE GetenvError : public Exception
{
public:
///\name Basic operations
@@ -56,7 +56,7 @@ namespace paludis
* \ingroup grpexceptions
* \ingroup grpsystem
*/
- class RunCommandError : public Exception
+ class PALUDIS_VISIBLE RunCommandError : public Exception
{
public:
/**
@@ -71,7 +71,7 @@ namespace paludis
*
* \ingroup grpsystem
*/
- std::string getenv_with_default(const std::string & key, const std::string & def);
+ std::string getenv_with_default(const std::string & key, const std::string & def) PALUDIS_VISIBLE;
/**
* Fetch the value of environment variable key, or throw a GetenvError if
@@ -79,14 +79,14 @@ namespace paludis
*
* \ingroup grpsystem
*/
- std::string getenv_or_error(const std::string & key);
+ std::string getenv_or_error(const std::string & key) PALUDIS_VISIBLE;
/**
* Fetch the kernel version, for $KV.
*
* \ingroup grpsystem
*/
- std::string kernel_version();
+ std::string kernel_version() PALUDIS_VISIBLE;
/**
* Run a command, wait for it to terminate and return its exit status.
@@ -95,7 +95,7 @@ namespace paludis
*
* \ingroup grpsystem
*/
- int run_command(const std::string & cmd);
+ int run_command(const std::string & cmd) PALUDIS_VISIBLE;
/**
* Run a command in a directory, wait for it to terminate and return
@@ -103,7 +103,7 @@ namespace paludis
*
* \ingroup grpsystem
*/
- int run_command_in_directory(const std::string & cmd, const FSEntry & fsentry);
+ int run_command_in_directory(const std::string & cmd, const FSEntry & fsentry) PALUDIS_VISIBLE;
/**
* Set the stderr and close for stdout fds used by run_command and
@@ -111,7 +111,7 @@ namespace paludis
*
* \ingroup grpsystem
*/
- void set_run_command_stdout_fds(const int, const int);
+ void set_run_command_stdout_fds(const int, const int) PALUDIS_VISIBLE;
/**
* Set the stderr and close for stderr fds used by run_command and
@@ -119,12 +119,12 @@ namespace paludis
*
* \ingroup grpsystem
*/
- void set_run_command_stderr_fds(const int, const int);
+ void set_run_command_stderr_fds(const int, const int) PALUDIS_VISIBLE;
/**
* Make a command that's run in a particular environment.
*/
- class MakeEnvCommand
+ class PALUDIS_VISIBLE MakeEnvCommand
{
private:
std::string cmd;
@@ -154,14 +154,14 @@ namespace paludis
*
* \ingroup grpsystem
*/
- const MakeEnvCommand make_env_command(const std::string & cmd);
+ const MakeEnvCommand make_env_command(const std::string & cmd) PALUDIS_VISIBLE;
/**
* Make a command that is run inside the sandbox, if sandbox is enabled.
*
* \ingroup grpsystem
*/
- const std::string make_sandbox_command(const std::string & cmd);
+ const std::string make_sandbox_command(const std::string & cmd) PALUDIS_VISIBLE;
}
#endif
diff --git a/paludis/util/tokeniser.hh b/paludis/util/tokeniser.hh
index 8ee3737..2768a7d 100644
--- a/paludis/util/tokeniser.hh
+++ b/paludis/util/tokeniser.hh
@@ -231,7 +231,7 @@ namespace paludis
*
* \ingroup grptokenise
*/
- class WhitespaceTokeniser :
+ class PALUDIS_VISIBLE WhitespaceTokeniser :
public InstantiationPolicy<WhitespaceTokeniser, instantiation_method::SingletonAtStartupTag>,
public Tokeniser<delim_kind::AnyOfTag, delim_mode::DelimiterTag>
{