Skip to content

Commit dde50df

Browse files
committed
[artifactory-release] Release version 3.7
1 parent 2d50146 commit dde50df

File tree

13 files changed

+440
-440
lines changed

13 files changed

+440
-440
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
/*
2-
* File: TextWriter.cpp
3-
* Author: gidis
4-
*
5-
* Created on December 29, 2012, 12:23 PM
6-
*/
7-
8-
#include "TextWriter.h"
9-
#include <string>
10-
#include <iostream>
11-
#include <fstream>
12-
13-
TextWriter::TextWriter() {
14-
//buffer=new std::string;
15-
}
16-
17-
TextWriter::TextWriter(const TextWriter& orig) {
18-
}
19-
20-
void TextWriter::writeLine(std::string text){
21-
if(buffer.empty()!=true){
22-
buffer.append("\n");
23-
}
24-
append(text);
25-
26-
}
27-
28-
void TextWriter::append(std::string text){
29-
buffer.append(text);
30-
}
31-
32-
void TextWriter::writeToConsole(){
33-
std::cout<<buffer;
34-
}
35-
36-
void TextWriter::writeToFile(std::string path){
37-
std::ofstream theStream;
38-
theStream.open(path.c_str());
39-
theStream << buffer.c_str() << std::endl;
40-
theStream.close();
41-
}
42-
43-
TextWriter::~TextWriter() {
44-
}
45-
1+
/*
2+
* File: TextWriter.cpp
3+
* Author: gidis
4+
*
5+
* Created on December 29, 2012, 12:23 PM
6+
*/
7+
8+
#include "TextWriter.h"
9+
#include <string>
10+
#include <iostream>
11+
#include <fstream>
12+
13+
TextWriter::TextWriter() {
14+
//buffer=new std::string;
15+
}
16+
17+
TextWriter::TextWriter(const TextWriter& orig) {
18+
}
19+
20+
void TextWriter::writeLine(std::string text){
21+
if(buffer.empty()!=true){
22+
buffer.append("\n");
23+
}
24+
append(text);
25+
26+
}
27+
28+
void TextWriter::append(std::string text){
29+
buffer.append(text);
30+
}
31+
32+
void TextWriter::writeToConsole(){
33+
std::cout<<buffer;
34+
}
35+
36+
void TextWriter::writeToFile(std::string path){
37+
std::ofstream theStream;
38+
theStream.open(path.c_str());
39+
theStream << buffer.c_str() << std::endl;
40+
theStream.close();
41+
}
42+
43+
TextWriter::~TextWriter() {
44+
}
45+
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
/*
2-
* File: TextWriter.h
3-
* Author: gidis
4-
*
5-
* Created on December 29, 2012, 12:23 PM
6-
*/
7-
8-
#ifndef TEXTWRITER_H
9-
#define TEXTWRITER_H
10-
#include <string>
11-
class TextWriter {
12-
public:
13-
TextWriter();
14-
TextWriter(const TextWriter& orig);
15-
void writeLine(std::string text);
16-
void append(std::string text);
17-
void writeToConsole();
18-
void writeToFile(std::string path);
19-
virtual ~TextWriter();
20-
private:
21-
std::string buffer;
22-
23-
};
24-
25-
#endif /* TEXTWRITER_H */
26-
1+
/*
2+
* File: TextWriter.h
3+
* Author: gidis
4+
*
5+
* Created on December 29, 2012, 12:23 PM
6+
*/
7+
8+
#ifndef TEXTWRITER_H
9+
#define TEXTWRITER_H
10+
#include <string>
11+
class TextWriter {
12+
public:
13+
TextWriter();
14+
TextWriter(const TextWriter& orig);
15+
void writeLine(std::string text);
16+
void append(std::string text);
17+
void writeToConsole();
18+
void writeToFile(std::string path);
19+
virtual ~TextWriter();
20+
private:
21+
std::string buffer;
22+
23+
};
24+
25+
#endif /* TEXTWRITER_H */
26+
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
/*
2-
* File: TextWriterDemo.cpp
3-
* Author: gidis
4-
*
5-
* Created on December 29, 2012, 12:23 PM
6-
*/
7-
8-
#include "TextWriterDemo.h"
9-
10-
TextWriterDemo::TextWriterDemo() {
11-
}
12-
13-
TextWriterDemo::TextWriterDemo(const TextWriterDemo& orig) {
14-
}
15-
16-
/**
17-
* An example of TextWriter usage
18-
*/
19-
void TextWriterDemo:: run(){
20-
demo.writeLine("writing first line");
21-
demo.writeLine("writing second line");
22-
demo.append("appending text to second line");
23-
std::string path="text.writer.demo.out";
24-
demo.writeLine(path);
25-
// if(textScanner.contains("where","here")){
26-
// demo.writeLine("String found");
27-
// } else {
28-
// demo.writeLine("String not found");
29-
// }
30-
demo.writeToConsole();
31-
}
32-
33-
TextWriterDemo::~TextWriterDemo() {
34-
}
35-
1+
/*
2+
* File: TextWriterDemo.cpp
3+
* Author: gidis
4+
*
5+
* Created on December 29, 2012, 12:23 PM
6+
*/
7+
8+
#include "TextWriterDemo.h"
9+
10+
TextWriterDemo::TextWriterDemo() {
11+
}
12+
13+
TextWriterDemo::TextWriterDemo(const TextWriterDemo& orig) {
14+
}
15+
16+
/**
17+
* An example of TextWriter usage
18+
*/
19+
void TextWriterDemo:: run(){
20+
demo.writeLine("writing first line");
21+
demo.writeLine("writing second line");
22+
demo.append("appending text to second line");
23+
std::string path="text.writer.demo.out";
24+
demo.writeLine(path);
25+
// if(textScanner.contains("where","here")){
26+
// demo.writeLine("String found");
27+
// } else {
28+
// demo.writeLine("String not found");
29+
// }
30+
demo.writeToConsole();
31+
}
32+
33+
TextWriterDemo::~TextWriterDemo() {
34+
}
35+
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
/*
2-
* File: main.cpp
3-
* Author: gidis
4-
*
5-
* Created on December 29, 2012, 12:22 PM
6-
*/
7-
8-
#include <cstdlib>
9-
10-
#include "TextWriterDemo.h"
11-
12-
using namespace std;
13-
14-
/*
15-
* The main function creates an instance of TextWriterDemo run it.
16-
*/
17-
int main(int argc, char** argv) {
18-
TextWriterDemo* demo=new TextWriterDemo();
19-
demo->run();
20-
return 0;
21-
}
22-
1+
/*
2+
* File: main.cpp
3+
* Author: gidis
4+
*
5+
* Created on December 29, 2012, 12:22 PM
6+
*/
7+
8+
#include <cstdlib>
9+
10+
#include "TextWriterDemo.h"
11+
12+
using namespace std;
13+
14+
/*
15+
* The main function creates an instance of TextWriterDemo run it.
16+
*/
17+
int main(int argc, char** argv) {
18+
TextWriterDemo* demo=new TextWriterDemo();
19+
demo->run();
20+
return 0;
21+
}
22+
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
/*
2-
* File: TextWriterDemo.h
3-
* Author: gidis
4-
*
5-
* Created on December 29, 2012, 12:23 PM
6-
*/
7-
8-
#ifndef TEXTWRITERDEMO_H
9-
#define TEXTWRITERDEMO_H
10-
#include "TextWriter.h"
11-
#include "TextScanner.h"
12-
13-
class TextWriterDemo {
14-
public:
15-
TextWriterDemo();
16-
TextWriterDemo(const TextWriterDemo& orig);
17-
void run();
18-
virtual ~TextWriterDemo();
19-
private:
20-
TextWriter demo ;
21-
TextScanner textScanner;
22-
};
23-
24-
#endif /* TEXTWRITERDEMO_H */
25-
1+
/*
2+
* File: TextWriterDemo.h
3+
* Author: gidis
4+
*
5+
* Created on December 29, 2012, 12:23 PM
6+
*/
7+
8+
#ifndef TEXTWRITERDEMO_H
9+
#define TEXTWRITERDEMO_H
10+
#include "TextWriter.h"
11+
#include "TextScanner.h"
12+
13+
class TextWriterDemo {
14+
public:
15+
TextWriterDemo();
16+
TextWriterDemo(const TextWriterDemo& orig);
17+
void run();
18+
virtual ~TextWriterDemo();
19+
private:
20+
TextWriter demo ;
21+
TextScanner textScanner;
22+
};
23+
24+
#endif /* TEXTWRITERDEMO_H */
25+

cpp-example/build.gradle

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
allprojects {
2-
apply plugin: 'idea'
3-
version = '1.0-SNAPSHOT'
4-
status = 'integration'
5-
group = 'org.jfrog.example.cpp'
6-
}
7-
8-
subprojects {
9-
idea {
10-
module {
11-
sourceDirs += [file('src/main/cpp'), file('src/main/headers')]
12-
}
13-
}
14-
}
15-
16-
project(":TextWriter") {
17-
apply plugin: "cpp-lib"
18-
}
19-
20-
task wrapper(type: Wrapper) {
21-
gradleVersion = '1.3'
22-
}
1+
allprojects {
2+
apply plugin: 'idea'
3+
version = '1.0-SNAPSHOT'
4+
status = 'integration'
5+
group = 'org.jfrog.example.cpp'
6+
}
7+
8+
subprojects {
9+
idea {
10+
module {
11+
sourceDirs += [file('src/main/cpp'), file('src/main/headers')]
12+
}
13+
}
14+
}
15+
16+
project(":TextWriter") {
17+
apply plugin: "cpp-lib"
18+
}
19+
20+
task wrapper(type: Wrapper) {
21+
gradleVersion = '1.3'
22+
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Thu Jan 03 10:56:31 IST 2013
2-
distributionBase=GRADLE_USER_HOME
3-
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
5-
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.3-bin.zip
1+
#Thu Jan 03 10:56:31 IST 2013
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-1.3-bin.zip

0 commit comments

Comments
 (0)