Commit dbe5709b by Marcus Winter

fixed cpplint warnings

parent f28aa800
......@@ -96,8 +96,8 @@ class TaskWrapper {
Function function,
const embb::tasks::ExecutionPolicy& policy)
: function_(function), task_() {
embb::tasks::Action action(embb::base::MakeFunction(*this, &TaskWrapper::Run),
policy);
embb::tasks::Action action(embb::base::MakeFunction(
*this, &TaskWrapper::Run), policy);
task_ = embb::tasks::Node::GetInstance().Spawn(action);
}
......
......@@ -127,7 +127,8 @@ class Action {
mtapi_action_attributes_t const * attributes
) {
mtapi_status_t status;
handle_ = mtapi_action_create(job_id, func, node_local_data, node_local_data_size,
handle_ = mtapi_action_create(job_id, func,
node_local_data, node_local_data_size,
attributes, &status);
internal::CheckStatus(status);
}
......
......@@ -40,7 +40,7 @@ namespace mtapi {
* \ingroup CPP_MTAPI
*/
class ActionAttributes {
public:
public:
/**
* Constructs an ActionAttributes object.
*/
......@@ -111,7 +111,7 @@ public:
return attributes_;
}
private:
private:
mtapi_action_attributes_t attributes_;
};
......
......@@ -39,7 +39,7 @@ namespace mtapi {
* \ingroup CPP_MTAPI
*/
class Affinity {
public:
public:
/**
* Constructs an Affinity object.
*/
......@@ -135,7 +135,7 @@ public:
return affinity_;
}
private:
private:
mtapi_affinity_t affinity_;
};
......
......@@ -39,7 +39,7 @@ namespace mtapi {
* \ingroup CPP_MTAPI
*/
class GroupAttributes {
public:
public:
/**
* Constructs a GroupAttributes object.
*/
......@@ -60,7 +60,7 @@ public:
return attributes_;
}
private:
private:
mtapi_group_attributes_t attributes_;
};
......
......@@ -39,7 +39,7 @@ namespace mtapi {
* \ingroup CPP_MTAPI
*/
class Job {
public:
public:
/**
* Constructs a Job.
* The Job object will be invalid.
......@@ -91,11 +91,11 @@ public:
return handle_;
}
private:
private:
mtapi_job_hndl_t handle_;
};
} // namespace mtapi
} // namespace embb
#endif // EMBB_MTAPI_GROUP_ATTRIBUTES_H_
#endif // EMBB_MTAPI_JOB_H_
......@@ -73,8 +73,7 @@ class Node {
if (IsInitialized()) {
EMBB_THROW(StatusException,
"MTAPI: node was already initialized.");
}
else {
} else {
NodeAttributes attributes; // default attributes
node_instance_ = embb::base::Allocation::New<Node>(
domain_id, node_id, attributes);
......@@ -96,8 +95,7 @@ class Node {
if (IsInitialized()) {
EMBB_THROW(StatusException,
"MTAPI: node was already initialized.");
}
else {
} else {
node_instance_ = embb::base::Allocation::New<Node>(
domain_id, node_id, attributes);
}
......@@ -121,8 +119,7 @@ class Node {
static Node & GetInstance() {
if (IsInitialized()) {
return *node_instance_;
}
else {
} else {
EMBB_THROW(StatusException,
"MTAPI: node is not initialized.");
}
......@@ -137,8 +134,7 @@ class Node {
if (IsInitialized()) {
embb::base::Allocation::Delete(node_instance_);
node_instance_ = NULL;
}
else {
} else {
EMBB_THROW(StatusException,
"MTAPI: node is not initialized.");
}
......
......@@ -40,7 +40,7 @@ namespace mtapi {
* \ingroup CPP_MTAPI
*/
class NodeAttributes {
public:
public:
/**
* Constructs a NodeAttributes object.
*/
......@@ -226,7 +226,7 @@ public:
return attributes_;
}
private:
private:
mtapi_node_attributes_t attributes_;
};
......
......@@ -39,7 +39,7 @@ namespace mtapi {
* \ingroup CPP_MTAPI
*/
class QueueAttributes {
public:
public:
/**
* Constructs a QueueAttributes object.
*/
......@@ -166,7 +166,7 @@ public:
return attributes_;
}
private:
private:
mtapi_queue_attributes_t attributes_;
};
......
......@@ -121,7 +121,7 @@ class Task {
}
private:
Task(mtapi_task_hndl_t handle)
explicit Task(mtapi_task_hndl_t handle)
: handle_(handle) {
// empty
}
......
......@@ -39,7 +39,7 @@ namespace mtapi {
* \ingroup CPP_MTAPI
*/
class TaskAttributes {
public:
public:
/**
* Constructs a TaskAttributes object.
*/
......@@ -115,7 +115,7 @@ public:
return attributes_;
}
private:
private:
mtapi_task_attributes_t attributes_;
};
......
......@@ -50,7 +50,7 @@ class TaskContext {
: context_(task_context) {
// empty
}
/**
* Queries whether the Task running in the TaskContext should finish.
* \return \c true if the Task should finish, otherwise \c false
......
......@@ -111,7 +111,8 @@ void TaskTest::TestBasic() {
{
embb::mtapi::Job job_error(JOB_TEST_ERROR, THIS_DOMAIN_ID);
embb::mtapi::Action action_error(JOB_TEST_ERROR, testErrorAction, embb::mtapi::ActionAttributes());
embb::mtapi::Action action_error(JOB_TEST_ERROR, testErrorAction,
embb::mtapi::ActionAttributes());
std::string test;
embb::mtapi::Task task = node.Start(job_error, "simple", &test);
......
......@@ -24,8 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef MTAPI_CPP_TEST_MTAPI_CPP_TEST_TASK_H_
#define MTAPI_CPP_TEST_MTAPI_CPP_TEST_TASK_H_
#ifndef TASKS_CPP_TEST_TASKS_CPP_TEST_TASK_H_
#define TASKS_CPP_TEST_TASKS_CPP_TEST_TASK_H_
#include <partest/partest.h>
......@@ -37,4 +37,4 @@ class TaskTest : public partest::TestCase {
void TestBasic();
};
#endif // MTAPI_CPP_TEST_MTAPI_CPP_TEST_TASK_H_
#endif // TASKS_CPP_TEST_TASKS_CPP_TEST_TASK_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment