Commit 5630b522 authored by Kitware Robot's avatar Kitware Robot Committed by Ben Boeckel

clang-format: format the entire codebase

This allows the robot to enforce formatting and fix formatting issues
automatically.
parent 6a034a08

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -9,12 +9,14 @@
//=========================================================================
#include <functional>
struct favorite_int {
int operator() () { return 42; }
struct favorite_int
{
int operator()() { return 42; }
};
struct conditional_int {
int operator() (float x) { return 2 * static_cast<int>(x); }
struct conditional_int
{
int operator()(float x) { return 2 * static_cast<int>(x); }
};
int main(int, char**)
......@@ -23,5 +25,5 @@ int main(int, char**)
f = favorite_int();
std::function<int()> g;
g = std::bind<float>(conditional_int(), 21.0);
return (f() == 42 && g() == 42 ) ? 0 : 1;
return (f() == 42 && g() == 42) ? 0 : 1;
}
......@@ -13,12 +13,14 @@
#include <boost/functional.hpp>
#include <boost/mpl/placeholders.hpp>
struct favorite_int {
int operator() () { return 42; }
struct favorite_int
{
int operator()() { return 42; }
};
struct conditional_int {
int operator() (float x) { return 2 * static_cast<int>(x); }
struct conditional_int
{
int operator()(float x) { return 2 * static_cast<int>(x); }
};
int main(int, char**)
......@@ -27,5 +29,5 @@ int main(int, char**)
f = favorite_int();
boost::function<int()> g;
g = boost::bind<float>(conditional_int(), 21.0);
return (f() == 42 && g() == 42 ) ? 0 : 1;
return (f() == 42 && g() == 42) ? 0 : 1;
}
......@@ -9,12 +9,14 @@
//=========================================================================
#include <tr1/functional>
struct favorite_int {
int operator() () { return 42; }
struct favorite_int
{
int operator()() { return 42; }
};
struct conditional_int {
int operator() (float x) { return 2 * static_cast<int>(x); }
struct conditional_int
{
int operator()(float x) { return 2 * static_cast<int>(x); }
};
int main(int, char**)
......@@ -23,5 +25,5 @@ int main(int, char**)
f = favorite_int();
std::tr1::function<int()> g;
g = std::tr1::bind<float>(conditional_int(), 21.0);
return (f() == 42 && g() == 42 ) ? 0 : 1;
return (f() == 42 && g() == 42) ? 0 : 1;
}
......@@ -19,26 +19,30 @@
class vtkUnstructuredGrid;
namespace smtk {
namespace bridge {
namespace tutorial {
namespace smtk
{
namespace bridge
{
namespace tutorial
{
// ++ 2 ++
/// The types of entities in a VTK "model"
enum EntityType
{
VTK_POINT, // The entity is a point
VTK_CELL, // The entity is a vertex, edge, face, or volume
VTK_GROUP, // The entity is a group (of points and/or cells)
VTK_POINT_DATUM, // The entity is a property associated with a point
VTK_CELL_DATUM // The entity is a property associated with a cell
VTK_POINT, // The entity is a point
VTK_CELL, // The entity is a vertex, edge, face, or volume
VTK_GROUP, // The entity is a group (of points and/or cells)
VTK_POINT_DATUM, // The entity is a property associated with a point
VTK_CELL_DATUM // The entity is a property associated with a cell
};
/// A "handle" for a VTK entity (point, cell, property, etc.)
struct EntityHandle {
EntityType entityType; //!< Describes the type of VTK entity
int entityRelation; //!< A modifier for the entity type (to select an array or boundary)
vtkIdType entityId; //!< The offset in the array of entities describing this entity.
struct EntityHandle
{
EntityType entityType; //!< Describes the type of VTK entity
int entityRelation; //!< A modifier for the entity type (to select an array or boundary)
vtkIdType entityId; //!< The offset in the array of entities describing this entity.
};
// -- 2 --
......@@ -61,41 +65,31 @@ public:
smtk::model::EntityRef toEntityRef(const EntityHandle& ent);
// These methods may be provided as needed.
static int staticSetup(
const std::string& optName,
const smtk::model::StringList& optVal);
virtual int setup(
const std::string& optName,
const smtk::model::StringList& optVal);
static int staticSetup(const std::string& optName, const smtk::model::StringList& optVal);
virtual int setup(const std::string& optName, const smtk::model::StringList& optVal);
protected:
Session();
// This is required of every session:
virtual SessionInfoBits transcribeInternal(
const smtk::model::EntityRef& entity,
SessionInfoBits requestedInfo);
const smtk::model::EntityRef& entity, SessionInfoBits requestedInfo);
vtkSmartPointer<vtkUnstructuredGrid> Model;
// ... };
// -- 1 --
void addRelations(
smtk::model::EntityRef& entityref,
std::vector<EntityHandle>& rels,
SessionInfoBits requestedInfo,
int depth);
bool addTessellation(
const smtk::model::EntityRef&,
const EntityHandle&);
void addRelations(smtk::model::EntityRef& entityref, std::vector<EntityHandle>& rels,
SessionInfoBits requestedInfo, int depth);
bool addTessellation(const smtk::model::EntityRef&, const EntityHandle&);
private:
Session(const Session&); // Not implemented.