add info class

yimian
IoTgod 5 years ago
parent 4e1404dea9
commit 33d458b5e0
  1. 33
      docs/info/ovo_info.md
  2. 49
      src/ovo.cpp
  3. 41
      src/ovo.h
  4. BIN
      test/a.exe
  5. 49
      test/ovo.cpp
  6. BIN
      test/ovo.exe
  7. 41
      test/ovo.h
  8. BIN
      test/ovo.h.gch
  9. 12
      test/test.cpp

@ -0,0 +1,33 @@
## Class info
### info.version
This is a `static` `string` variable with the version info. A simple demo like this:
````C++
ovo::info obj;
std::cout << obj.version << endl;
````
The screen should show like this:
>Version 0.0.1
### info.hi()
This function can print a welcome info with a `void` return value. Demo like this:
````C++
ovo::info obj;
obj.hi();
````
Expected screen:
>Hellow OvO~
### info.detail()
This function return with void, print detail info about this library. Use like this:
````C++
ovo::info obj;
obj.detail();
````
Expected screen:
>Lib Name: ovo
>Org: EEENeko (https://github.com/eeeNeko)
>Author: Jianzhi Fan, Yimian Liu
>license GNU General Public License 2.0
>copyright Copyright (c) 2019 EEENeko

@ -0,0 +1,49 @@
/**
* ovo Main File
*
* @category ovo
* @package ovo.cpp
* @copyright Copyright (c) 2019 EEENeko (https://github.com/eeeneko)
* @license GNU General Public License 2.0
* @version 0.0.1
*/
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <cstring>
#include "ovo.h"
/****** Class info ******/
/**
* Display version
*
* @access public
*/
string ovo::info::version = "Version 0.0.1";
/**
* Display a welcome string
*
* @access public
* @param void
* @return void
*/
void ovo::info::detail()
{
cout << endl << "Lib Name: ovo" <<endl;
cout << "Org: EEENeko (https://github.com/eeeNeko)" << endl;
cout << "Author: Jianzhi Fan, Yimian Liu" << endl;
cout << "license GNU General Public License 2.0" << endl;
cout << "copyright Copyright (c) 2019 EEENeko" << endl << endl;
}

@ -0,0 +1,41 @@
/**
* ovo Main File
*
* @category ovo
* @package ovo.cpp
* @copyright Copyright (c) 2019 EEENeko (https://github.com/eeeneko)
* @license GNU General Public License 2.0
* @version 0.0.1
*/
#ifndef _OVO_H
#define _OVO_H
#include <iostream>
#include <string>
#include <vector>
using namespace std;
namespace ovo{
/**
* Show info about ovo
*
* @author yimian
* @category ovo
* @package ovo
*/
class info{
public:
static string version;
inline void hi(){cout << "Hello OvO~" << endl;};
void detail();
};
}
#endif

Binary file not shown.

@ -0,0 +1,49 @@
/**
* ovo Main File
*
* @category ovo
* @package ovo.cpp
* @copyright Copyright (c) 2019 EEENeko (https://github.com/eeeneko)
* @license GNU General Public License 2.0
* @version 0.0.1
*/
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <cstring>
#include "ovo.h"
/****** Class info ******/
/**
* Display version
*
* @access public
*/
string ovo::info::version = "Version 0.0.1";
/**
* Display a welcome string
*
* @access public
* @param void
* @return void
*/
void ovo::info::detail()
{
cout << endl << "Lib Name: ovo" <<endl;
cout << "Org: EEENeko (https://github.com/eeeNeko)" << endl;
cout << "Author: Jianzhi Fan, Yimian Liu" << endl;
cout << "license GNU General Public License 2.0" << endl;
cout << "copyright Copyright (c) 2019 EEENeko" << endl << endl;
}

Binary file not shown.

@ -0,0 +1,41 @@
/**
* ovo Main File
*
* @category ovo
* @package ovo.cpp
* @copyright Copyright (c) 2019 EEENeko (https://github.com/eeeneko)
* @license GNU General Public License 2.0
* @version 0.0.1
*/
#ifndef _OVO_H
#define _OVO_H
#include <iostream>
#include <string>
#include <vector>
using namespace std;
namespace ovo{
/**
* Show info about ovo
*
* @author yimian
* @category ovo
* @package ovo
*/
class info{
public:
static string version;
inline void hi(){cout << "Hello OvO~" << endl;};
void detail();
};
}
#endif

Binary file not shown.

@ -0,0 +1,12 @@
#include <iostream>
#include "ovo.h"
int main(int argc, char const *argv[])
{
ovo::info i;
i.hi();
std::cout << i.version << std::endl;
i.detail();
return 0;
}
Loading…
Cancel
Save