Skip to content

Commit

Permalink
Add headers and set license to boost license
Browse files Browse the repository at this point in the history
  • Loading branch information
lwinkler committed Jun 13, 2015
1 parent ed28cf6 commit 723b762
Show file tree
Hide file tree
Showing 21 changed files with 210 additions and 84 deletions.
22 changes: 0 additions & 22 deletions LICENSE

This file was deleted.

23 changes: 23 additions & 0 deletions LICENSE_1_0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
11 changes: 10 additions & 1 deletion alloc/alloc.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
//
// alloc.hpp
// ~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POP_ALLOC_H
#define POP_ALLOC_H


#include <boost/asio/ip/tcp.hpp>

#define MAX_STR 512
Expand Down
10 changes: 10 additions & 0 deletions alloc/local.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
//
// local.hpp
// ~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POP_ALLOC_LOCAL_H
#define POP_ALLOC_LOCAL_H

Expand Down
11 changes: 10 additions & 1 deletion alloc/manual.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
//
// manual.hpp
// ~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POP_ALLOC_MANUAL_H
#define POP_ALLOC_MANUAL_H


#include "alloc/alloc.hpp"

namespace pop{
Expand Down
10 changes: 10 additions & 0 deletions alloc/ssh.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
//
// ssh.hpp
// ~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POP_ALLOC_SSH_H
#define POP_ALLOC_SSH_H

Expand Down
15 changes: 13 additions & 2 deletions class/apply_tuple.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
//
// apply_tuple.hpp
// ~~~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// based on: http://stackoverflow.com/questions/687490/how-do-i-expand-a-tuple-into-variadic-template-functions-arguments
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// TODO: Avoid useless copy of return values

#ifndef POPLITE_APPLY_TUPLE_H
#define POPLITE_APPLY_TUPLE_H


// based on: http://stackoverflow.com/questions/687490/how-do-i-expand-a-tuple-into-variadic-template-functions-arguments
// TODO: Avoid useless copy of return values

namespace pop
{
Expand Down
15 changes: 12 additions & 3 deletions class/apply_tuple_constr.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
//
// interface_combox.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// based on: http://stackoverflow.com/questions/687490/how-do-i-expand-a-tuple-into-variadic-template-functions-arguments
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POPLITE_APPLY_TUPLE_CONSTR_H
#define POPLITE_APPLY_TUPLE_CONSTR_H


// based on: http://stackoverflow.com/questions/687490/how-do-i-expand-a-tuple-into-variadic-template-functions-arguments

namespace pop
{
/**
Expand Down
10 changes: 10 additions & 0 deletions class/broker.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
//
// broker.hpp
// ~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef POPLITE_BROKER_H
#define POPLITE_BROKER_H

Expand All @@ -15,6 +24,7 @@ namespace pop
{
template<class ParClass> using parallel_method = std::function<void(bufin&, bufout&, ParClass*&)>;

/// A broker is the (remote) part that contains the instanciation of the parallel object
template<class ParClass> class broker : private boost::noncopyable
{
public:
Expand Down
11 changes: 11 additions & 0 deletions class/interface.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
//
// interface.hpp
// ~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POPLITE_INTERFACE_H
#define POPLITE_INTERFACE_H

Expand All @@ -8,6 +18,7 @@

namespace pop{

/// Interface is the local part used to communicate with a broker (remote) that contains the instanciation of the parallel object
class interface : private boost::noncopyable
{
public:
Expand Down
12 changes: 11 additions & 1 deletion class/system.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
//
// system.hpp
// ~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POPLITE_SYSTEM_H
#define POPLITE_SYSTEM_H

Expand All @@ -9,7 +19,7 @@

namespace pop
{
#if 1
#ifndef POP_BINARY_SERIALIZATION
// use text serialization
typedef boost::archive::text_iarchive bufin;
typedef boost::archive::text_oarchive bufout;
Expand Down
9 changes: 9 additions & 0 deletions com/accesspoint.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
//
// accesspoint.hpp
// ~~~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef POP_ACCESSPOINT_HPP
#define POP_ACCESSPOINT_HPP

Expand Down
8 changes: 5 additions & 3 deletions com/broker_combox.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//
// broker_combox.cpp
// ~~~~~~~~~~
// broker_combox.hpp
// ~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Based on examples of 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down
2 changes: 2 additions & 0 deletions com/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// ~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Modifications 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down
8 changes: 5 additions & 3 deletions com/interface_combox.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//
// interface_combox.cpp
// ~~~~~~~~~~
// interface_combox.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Based on examples of 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down
54 changes: 10 additions & 44 deletions com/serialize.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
//
// serialize.hpp
// ~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef POPLITE_SERIALIZE_H
#define POPLITE_SERIALIZE_H

Expand All @@ -15,50 +25,6 @@
namespace pop
{

/*
class method_id
{
public:
method_id(int x_id) : id(x_id)
{}
int id;
private:
friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
ar & id;
}
};
template <typename T> T read(bufin& ia)
{
T t; ia >> t; return t;
}
template <typename T> void write(T tuple, bufout& oa)
{
t >> oa;
}
*/

/*
template <typename... Args>
std::tuple<Args...> parse(bufin& ia)
{
return std::make_tuple(read<Args>(ia)...);
}
template <typename... Args>
std::tuple<Args...> parse(const std::string& str)
{
std::istringstream ia(str);
return parse<Args...>(ia);
}
*/

// In and out
template<typename T> struct in
{
Expand Down
11 changes: 9 additions & 2 deletions example/test_class.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@


//
// test_class.hpp
// ~~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef TEST_CLASS_H
#define TEST_CLASS_H
Expand Down
12 changes: 12 additions & 0 deletions parser/parse.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//
// parse.hpp
// ~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

/// This file is used in the parser. It contains general functions used by other parser files.

#ifndef _POP_PARSE_HPP
#define _POP_PARSE_HPP

Expand Down
12 changes: 12 additions & 0 deletions parser/parse_broker.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//
// parse_broker.hpp
// ~~~~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

/// This file is used in the parser. It creates the code of the object broker

#ifndef _POP_PARSE_BROKER_HPP
#define _POP_PARSE_BROKER_HPP

Expand Down
12 changes: 12 additions & 0 deletions parser/parse_interface.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
//
// parse_interface.hpp
// ~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2015 Laurent Winkler lwinkler888 at gmail dot com
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

/// This file is used in the parser. It creates the code of the object interface

#ifndef _POP_PARSE_IFACE_HPP
#define _POP_PARSE_IFACE_HPP

Expand Down
Loading

0 comments on commit 723b762

Please sign in to comment.