Commit 64ccf67b authored by Jiachen,Chen's avatar Jiachen,Chen
Browse files

Added TestUseDataStructure

parent f3c8ce08
/*
* File: TestDataStructure.cc
* Author: Jiachen
*
* Created on April 30, 2019, 2:55 AM
*/
#include "TestDataStructure.hh"
#include <stdio.h>
CLICK_DECLS
TestDataStructure::TestDataStructure() {
printf("Using TestDatastructure!\n");
}
TestDataStructure::~TestDataStructure() = default;
void TestDataStructure::testFunction() {
printf("This is a test function!\n");
}
CLICK_ENDDECLS
ELEMENT_PROVIDES(TestDataStructure)
\ No newline at end of file
/*
* File: TestDataStructure.hh
* Author: ubuntu
*
* Created on April 30, 2019, 2:55 AM
*/
#ifndef TESTDATASTRUCTURE_HH
#define TESTDATASTRUCTURE_HH
#include <click/config.h>
CLICK_DECLS
class TestDataStructure {
public:
TestDataStructure();
~TestDataStructure();
void testFunction();
private:
};
CLICK_ENDDECLS
#endif /* TESTDATASTRUCTURE_HH */
/*
* File: TestUseDataStructure.cc
* Author: Jiachen Chen
*
* Created on April 30, 2019, 2:57 AM
*/
#include "TestUseDataStructure.hh"
CLICK_DECLS
TestUseDataStructure::TestUseDataStructure() = default;
TestUseDataStructure::~TestUseDataStructure() = default;
int TestUseDataStructure::initialize(ErrorHandler* errh __attribute ((__unused__))) {
TestDataStructure structure;
structure.testFunction();
return 0;
}
CLICK_ENDDECLS
EXPORT_ELEMENT(TestUseDataStructure)
\ No newline at end of file
require(package "click_for_comnet");
test :: TestUseDataStructure;
DriverManager(stop);
/*
* File: TestUseDataStructure.hh
* Author: ubuntu
*
* Created on April 30, 2019, 2:57 AM
*/
#ifndef TESTUSEDATASTRUCTURE_HH
#define TESTUSEDATASTRUCTURE_HH
#include <click/config.h>
#include <click/element.hh>
#include "TestDataStructure.hh"
CLICK_DECLS
class TestUseDataStructure : public Element {
public:
TestUseDataStructure();
~TestUseDataStructure();
const char *class_name() const { return "TestUseDataStructure"; }
int initialize(ErrorHandler *errh);
private:
};
CLICK_ENDDECLS
#endif /* TESTUSEDATASTRUCTURE_HH */
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 to comment