Skip to content
Permalink
Browse files

clang-format

  • Loading branch information...
Stefan Eilemann authored and eile committed May 19, 2017
1 parent bb95de0 commit e190e821de3eed195d5c4dca32cd994b54677028
Showing 631 changed files with 38,792 additions and 37,744 deletions.
@@ -0,0 +1,51 @@
---
AccessModifierOffset: -4
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackParameters: true
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Allman # brace on new line
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerBinding: true
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: false
IndentFunctionDeclarationAfterType: true
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyBreakComment: 60
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerBindsToType: true
SortIncludes: true
SpaceAfterControlStatementKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false # '< ' style
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false # '(' style
Standard: Cpp11
TabWidth: 4
UseTab: Never
...
@@ -1,15 +1,15 @@

/* Copyright (c) 2010-2011, Stefan Eilemann <eile@eyescale.ch>
/* Copyright (c) 2010-2011, Stefan Eilemann <eile@eyescale.ch>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 2.1 as published
* by the Free Software Foundation.
*
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -19,7 +19,8 @@
#define EQ_ADMIN_H

#pragma warning(push)
#pragma warning(disable: 4244) //conversion from .. to ..,possible loss of data
#pragma warning(disable : 4244) // conversion from .. to ..,possible loss of
// data

#include <eq/admin/canvas.h>
#include <eq/admin/channel.h>
@@ -37,8 +38,8 @@
#include <eq/admin/visitorResult.h>
#include <eq/admin/window.h>

#include <eq/fabric/base.h>
#include <co/co.h>
#include <eq/fabric/base.h>

#pragma warning(pop)
#endif // EQ_ADMIN_H
@@ -1,15 +1,15 @@

/* Copyright (c) 2008-2010, Stefan Eilemann <eile@equalizergraphics.com>
/* Copyright (c) 2008-2010, Stefan Eilemann <eile@equalizergraphics.com>
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 2.1 as published
* by the Free Software Foundation.
*
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -21,4 +21,3 @@
#include <eq/admin/admin.h>

#endif // EQADMIN_H

@@ -27,10 +27,10 @@ namespace eq
{
namespace admin
{
typedef fabric::Canvas< Config, Canvas, Segment, Layout > Super;
typedef fabric::Canvas<Config, Canvas, Segment, Layout> Super;

Canvas::Canvas( Config* parent )
: Super( parent )
Canvas::Canvas(Config* parent)
: Super(parent)
{
}

@@ -41,19 +41,17 @@ Canvas::~Canvas()
ServerPtr Canvas::getServer()
{
Config* config = getConfig();
LBASSERT( config );
return ( config ? config->getServer() : 0 );
LBASSERT(config);
return (config ? config->getServer() : 0);
}

}
}

#include "../fabric/canvas.ipp"
template class eq::fabric::Canvas< eq::admin::Config, eq::admin::Canvas,
eq::admin::Segment, eq::admin::Layout >;
template class eq::fabric::Canvas<eq::admin::Config, eq::admin::Canvas,
eq::admin::Segment, eq::admin::Layout>;

/** @cond IGNORE */
template EQFABRIC_API std::ostream& eq::fabric::operator << ( std::ostream&,
const eq::admin::Super& );
template EQFABRIC_API std::ostream& eq::fabric::operator<<(
std::ostream&, const eq::admin::Super&);
/** @endcond */

@@ -25,11 +25,11 @@ namespace eq
{
namespace admin
{
class Canvas : public fabric::Canvas< Config, Canvas, Segment, Layout >
class Canvas : public fabric::Canvas<Config, Canvas, Segment, Layout>
{
public:
/** Construct a new canvas. @version 1.0 */
EQADMIN_API explicit Canvas( Config* parent );
EQADMIN_API explicit Canvas(Config* parent);

/** Destruct this canvas. @version 1.0 */
EQADMIN_API virtual ~Canvas();
@@ -4,12 +4,12 @@
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 2.1 as published
* by the Free Software Foundation.
*
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -24,57 +24,57 @@ namespace eq
{
namespace admin
{
typedef fabric::Channel< Window, Channel > Super;
typedef fabric::Channel<Window, Channel> Super;

Channel::Channel( Window* parent )
: Super( parent )
{}
Channel::Channel(Window* parent)
: Super(parent)
{
}

Channel::~Channel()
{}
{
}

Pipe* Channel::getPipe()
{
Window* window = getWindow();
LBASSERT( window );
return ( window ? window->getPipe() : 0 );
LBASSERT(window);
return (window ? window->getPipe() : 0);
}
const Pipe* Channel::getPipe() const
{
const Window* window = getWindow();
LBASSERT( window );
return ( window ? window->getPipe() : 0 );
LBASSERT(window);
return (window ? window->getPipe() : 0);
}

Config* Channel::getConfig()
{
Window* window = getWindow();
LBASSERT( window );
return ( window ? window->getConfig() : 0 );
LBASSERT(window);
return (window ? window->getConfig() : 0);
}

const Config* Channel::getConfig() const
{
const Window* window = getWindow();
LBASSERT( window );
return ( window ? window->getConfig() : 0 );
LBASSERT(window);
return (window ? window->getConfig() : 0);
}

ServerPtr Channel::getServer()
{
Window* window = getWindow();
LBASSERT( window );
return ( window ? window->getServer() : 0 );
LBASSERT(window);
return (window ? window->getServer() : 0);
}

}
}

#include "../fabric/channel.ipp"
template class eq::fabric::Channel< eq::admin::Window, eq::admin::Channel >;
template class eq::fabric::Channel<eq::admin::Window, eq::admin::Channel>;

/** @cond IGNORE */
template EQFABRIC_API std::ostream& eq::fabric::operator << ( std::ostream&,
const eq::admin::Super& );
template EQFABRIC_API std::ostream& eq::fabric::operator<<(
std::ostream&, const eq::admin::Super&);
/** @endcond */

@@ -18,18 +18,18 @@
#ifndef EQADMIN_CHANNEL_H
#define EQADMIN_CHANNEL_H

#include <eq/admin/types.h> // typedefs
#include <eq/fabric/channel.h> // base class
#include <eq/admin/types.h> // typedefs
#include <eq/fabric/channel.h> // base class

namespace eq
{
namespace admin
{
class Channel : public fabric::Channel< Window, Channel >
class Channel : public fabric::Channel<Window, Channel>
{
public:
/** Construct a new channel. @version 1.0 */
EQADMIN_API explicit Channel( Window* parent );
EQADMIN_API explicit Channel(Window* parent);

/** Destruct a channel. @version 1.0 */
EQADMIN_API virtual ~Channel();
@@ -26,15 +26,14 @@ namespace eq
{
namespace admin
{

/** @cond IGNORE */
typedef fabric::Client Super;
/** @endcond */

Client::Client()
: Super()
, _mainThreadQueue( co::Global::getCommandQueueLimit( ))
, _private( 0 )
, _mainThreadQueue(co::Global::getCommandQueueLimit())
, _private(0)
{
}

@@ -43,47 +42,46 @@ Client::~Client()
close();
}

bool Client::connectServer( ServerPtr server )
bool Client::connectServer(ServerPtr server)
{
// connect to local server, if any
co::ConnectionPtr connection = server::connectLocalServer();
if( connection && connect( server, connection ))
if (connection && connect(server, connection))
{
server->setClient( this );
server->setClient(this);
server->map();
return true;
}

if( !Super::connectServer( server ))
if (!Super::connectServer(server))
return false;

server->setClient( this );
server->setClient(this);
server->map();
return true;
}

bool Client::disconnectServer( ServerPtr server )
bool Client::disconnectServer(ServerPtr server)
{
server->unmap();
server->setClient( 0 );
return Super::disconnectServer( server.get( ));
server->setClient(0);
return Super::disconnectServer(server.get());
}

co::NodePtr Client::createNode( const uint32_t type )
co::NodePtr Client::createNode(const uint32_t type)
{
switch( type )
switch (type)
{
case fabric::NODETYPE_SERVER:
{
case fabric::NODETYPE_SERVER:
{
Server* server = new Server;
server->setClient( this );
return server;
}
Server* server = new Server;
server->setClient(this);
return server;
}

default:
return Super::createNode( type );
default:
return Super::createNode(type);
}
}

}
}

0 comments on commit e190e82

Please sign in to comment.
You can’t perform that action at this time.