Lowering the visibility of some typdefs

This commit is contained in:
Strahinja Val Markovic 2012-09-06 11:58:16 -07:00
parent 909450ec13
commit 607b25e16b
2 changed files with 25 additions and 24 deletions

View File

@ -39,13 +39,17 @@ using boost::thread;
namespace YouCompleteMe
{
typedef boost::function< std::vector< std::string >() >
FunctionReturnsStringVector;
extern const unsigned int MAX_ASYNC_THREADS = 4;
extern const unsigned int MIN_ASYNC_THREADS = 2;
namespace
{
void QueryThreadMain( LatestQueryTask &latest_query_task )
void QueryThreadMain( IdentifierCompleter::LatestQueryTask &latest_query_task )
{
while ( true )
{
@ -62,7 +66,8 @@ void QueryThreadMain( LatestQueryTask &latest_query_task )
}
void BufferIdentifiersThreadMain(
BufferIdentifiersTaskStack &buffer_identifiers_task_stack )
IdentifierCompleter::BufferIdentifiersTaskStack
&buffer_identifiers_task_stack )
{
while ( true )
{

View File

@ -38,28 +38,6 @@ class CandidateRepository;
typedef boost::shared_ptr< std::vector< std::string > > AsyncResults;
// TODO: cpp?
typedef boost::function< std::vector< std::string >() >
FunctionReturnsStringVector;
// TODO: move to private
// filepath -> *( *candidate )
typedef boost::unordered_map< std::string,
boost::shared_ptr< std::list< const Candidate* > > >
FilepathToCandidates;
// filetype -> *( filepath -> *( *candidate ) )
typedef boost::unordered_map< std::string,
boost::shared_ptr< FilepathToCandidates > > FiletypeMap;
typedef boost::shared_ptr<
boost::packaged_task< AsyncResults > > QueryTask;
typedef ConcurrentLatestValue< QueryTask > LatestQueryTask;
typedef ConcurrentStack< VoidTask > BufferIdentifiersTaskStack;
class IdentifierCompleter : boost::noncopyable
{
@ -103,6 +81,13 @@ public:
const std::string &query,
const std::string &filetype ) const;
typedef boost::shared_ptr<
boost::packaged_task< AsyncResults > > QueryTask;
typedef ConcurrentLatestValue< QueryTask > LatestQueryTask;
typedef ConcurrentStack< VoidTask > BufferIdentifiersTaskStack;
private:
void ResultsForQueryAndType( const std::string &query,
@ -119,6 +104,17 @@ private:
void InitThreads();
// filepath -> *( *candidate )
typedef boost::unordered_map< std::string,
boost::shared_ptr< std::list< const Candidate* > > >
FilepathToCandidates;
// filetype -> *( filepath -> *( *candidate ) )
typedef boost::unordered_map< std::string,
boost::shared_ptr< FilepathToCandidates > > FiletypeMap;
/////////////////////////////
// PRIVATE MEMBER VARIABLES
/////////////////////////////