Skip to content
This repository was archived by the owner on Sep 19, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>scratch-Source@cpp-boilerplate</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
<linkedResources>
<link>
<name>[Subprojects]</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Subprojects]/gtest</name>
<type>2</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/vendor/googletest/googletest</location>
</link>
</linkedResources>
</projectDescription>
1 change: 1 addition & 0 deletions app/AnalogSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ int AnalogSensor::Read()
std::vector<int> *readings = new std::vector<int>(mSamples, 10);

double result = std::accumulate( readings->begin(), readings->end(), 0.0 ) / readings->size();
delete readings;
return result;
}

Expand Down
23 changes: 23 additions & 0 deletions app/AnalogSensor.cpp~
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <AnalogSensor.hpp>
#include <numeric>
#include <vector>

AnalogSensor::AnalogSensor(unsigned int samples)
: mSamples(samples)
{
}

AnalogSensor::~AnalogSensor()
{
}

int AnalogSensor::Read()
{
std::vector<int> *readings = new std::vector<int>(mSamples, 10);

double result = std::accumulate( readings->begin(), readings->end(), 0.0 ) / readings->size();
delete readings;
return result;
}


18 changes: 8 additions & 10 deletions app/main.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
#include <iostream>
#include <AnalogSensor.hpp>

int main()
{
AnalogSensor lightSensor(5);
std::cout << "Averaged sensor reading: " << lightSensor.Read() << std::endl;
bool terminator;
if( terminator )
{
std::cout << "DONE" << std::endl;
}
return 0;
int main() {
AnalogSensor lightSensor(5);
std::cout << "Averaged sensor reading: " << lightSensor.Read() << std::endl;
bool terminator = true;
if (terminator) {
std::cout << "DONE" << std::endl;
}
return 0;
}
14 changes: 14 additions & 0 deletions app/main.cpp~
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>
#include <AnalogSensor.hpp>

int main()
{
AnalogSensor lightSensor(5);
std::cout << "Averaged sensor reading: " << lightSensor.Read() << std::endl;
bool terminator;
if( terminator )
{
std::cout << "DONE" << std::endl;
}
return 0;
}
566 changes: 566 additions & 0 deletions import/.cproject

Large diffs are not rendered by default.

297 changes: 297 additions & 0 deletions import/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,297 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>scratch-Debug@import</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.make.core.makeBuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.command</key>
<value>/usr/bin/make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.target.inc</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.arguments</key>
<value>-j2</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/import</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.environment</key>
<value>VERBOSE=1|CMAKE_NO_VERBOSE=1|</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.target.auto</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.target.clean</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.build.location</key>
<value>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/import</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.core.errorOutputParser</key>
<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.make.core.makeNature</nature>
<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.core.cnature</nature>
</natures>
<linkedResources>
<link>
<name>[Subprojects]</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Subprojects]/gtest</name>
<type>2</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/vendor/googletest/googletest</location>
</link>
<link>
<name>[Targets]</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] shell-app</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] shell-app/</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] shell-app/Source Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] shell-app/Source Files/main.cpp</name>
<type>1</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/app/main.cpp</location>
</link>
<link>
<name>[Targets]/[exe] shell-app/Source Files/AnalogSensor.cpp</name>
<type>1</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/app/AnalogSensor.cpp</location>
</link>
<link>
<name>[Targets]/[exe] shell-app/Header Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] shell-app/CMake Rules</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] shell-app/Resources</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] shell-app/Object Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] cpp-test</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] cpp-test/</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] cpp-test/Source Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] cpp-test/Source Files/main.cpp</name>
<type>1</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/test/main.cpp</location>
</link>
<link>
<name>[Targets]/[exe] cpp-test/Source Files/test.cpp</name>
<type>1</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/test/test.cpp</location>
</link>
<link>
<name>[Targets]/[exe] cpp-test/Header Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] cpp-test/CMake Rules</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] cpp-test/Resources</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[exe] cpp-test/Object Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest/</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest/Source Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest/Source Files/gtest-all.cc</name>
<type>1</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/vendor/googletest/googletest/src/gtest-all.cc</location>
</link>
<link>
<name>[Targets]/[lib] gtest/Header Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest/CMake Rules</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest/Resources</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest/Object Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest_main</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest_main/</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest_main/Source Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest_main/Source Files/gtest_main.cc</name>
<type>1</type>
<location>/home/viki/workspace/Extra-Credit-Eclipse/cpp-boilerplate/vendor/googletest/googletest/src/gtest_main.cc</location>
</link>
<link>
<name>[Targets]/[lib] gtest_main/Header Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest_main/CMake Rules</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest_main/Resources</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>[Targets]/[lib] gtest_main/Object Files</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
</linkedResources>
</projectDescription>
Loading