[DOC] add basic doc with sample
This commit is contained in:
parent
d4d832fa72
commit
a9699e3e00
1
authors.txt
Normal file
1
authors.txt
Normal file
@ -0,0 +1 @@
|
||||
Mr DUPIN Edouard <yui.heero@gmail.com>
|
27
date/date.h
27
date/date.h
@ -9,12 +9,39 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief date library namespace
|
||||
*/
|
||||
namespace date {
|
||||
/**
|
||||
* @brief Get the Build year of the program
|
||||
* @return The number of the year (ex: 2015 or 1995)
|
||||
*/
|
||||
int32_t getYear();
|
||||
/**
|
||||
* @brief Get the Build month id
|
||||
* @return The number of the month (ex: 1 for january or 9 for september ...)
|
||||
*/
|
||||
int32_t getMonth();
|
||||
/**
|
||||
* @brief Get the Build day in the month
|
||||
* @return The number of the month day [1..31]
|
||||
*/
|
||||
int32_t getDay();
|
||||
/**
|
||||
* @brief Get the Build hour
|
||||
* @return The number of the hour [0..23]
|
||||
*/
|
||||
int32_t getHour();
|
||||
/**
|
||||
* @brief Get the Build Minute
|
||||
* @return The number of the minute [0..59]
|
||||
*/
|
||||
int32_t getMinute();
|
||||
/**
|
||||
* @brief Get the Build second
|
||||
* @return The number of the second [0..59]
|
||||
*/
|
||||
int32_t getSecond();
|
||||
};
|
||||
|
||||
|
60
doc/mainpage.md
Normal file
60
doc/mainpage.md
Normal file
@ -0,0 +1,60 @@
|
||||
DATE library {#mainpage}
|
||||
===============
|
||||
|
||||
@tableofcontents
|
||||
|
||||
What is DATE, and how can I use it? {#date_mainpage_what}
|
||||
====================================
|
||||
|
||||
Get the build date of the binary (simply externalyse to permit to not change the compilation flags of the program (just regenerate the SO and binary)
|
||||
|
||||
What languages are supported? {#date_mainpage_lang}
|
||||
=============================
|
||||
|
||||
DATE is written in C++.
|
||||
|
||||
Are there any licensing restrictions? {#date_mainpage_license_restriction}
|
||||
=====================================
|
||||
|
||||
DATE is **FREE software** and _all sub-library are FREE and staticly linkable !!!_
|
||||
|
||||
License (APACHE-2.0) {#date_mainpage_license}
|
||||
====================
|
||||
|
||||
Copyright DATE Edouard DUPIN
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
<http://www.apache.org/licenses/LICENSE-2.0>
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Usage? {#date_mainpage_tutorial}
|
||||
======
|
||||
|
||||
Use Date lib is really simple:
|
||||
|
||||
Include library header
|
||||
```{.cpp}
|
||||
#include <date/date.h>
|
||||
```
|
||||
Call the fucntion you need:
|
||||
```{.cpp}
|
||||
std::cout << "Build year:" << date::getYear() << std::endl;
|
||||
std::cout << "Build month:" << date::getMonth() << std::endl;
|
||||
std::cout << "Build day:" << date::getDay() << std::endl;
|
||||
std::cout << "Build hour:" << date::getHour() << std::endl;
|
||||
std::cout << "Build minute:" << date::getMinute() << std::endl;
|
||||
std::cout << "Build second:" << date::getSecond() << std::endl;
|
||||
// or :
|
||||
std::cout << "Build date:" << date::getDay() << "/" << date::getMonth() << "/" << date::getYear() << std::endl;
|
||||
std::cout << "Build time:" << date::getHour() << "h" << date::getMinute() << ":" << date::getSecond() << std::endl;
|
||||
```
|
||||
|
22
doxy_date.py
Normal file
22
doxy_date.py
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/python
|
||||
import os
|
||||
import doxy.module as module
|
||||
import doxy.debug as debug
|
||||
import doxy.tools as tools
|
||||
|
||||
def create(target, module_name):
|
||||
my_module = module.Module(__file__, module_name)
|
||||
my_module.set_version("version.txt")
|
||||
my_module.set_title("date: basic build dator")
|
||||
my_module.set_website("http://atria-soft.github.io/" + module_name)
|
||||
my_module.set_website_sources("http://github.com/atria-soft/" + module_name)
|
||||
my_module.add_path([
|
||||
module_name,
|
||||
"doc"
|
||||
])
|
||||
my_module.add_file_patterns([
|
||||
'*.h',
|
||||
'*.md',
|
||||
])
|
||||
|
||||
return my_module
|
@ -4,7 +4,7 @@ import lutin.tools as tools
|
||||
import datetime
|
||||
|
||||
def get_type():
|
||||
return "LIBRARY"
|
||||
return "LIBRARY_STATIC"
|
||||
|
||||
def get_desc():
|
||||
return "Date buid date of the program"
|
||||
@ -19,10 +19,10 @@ def get_compagny_name():
|
||||
return "atria-soft"
|
||||
|
||||
def get_maintainer():
|
||||
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
||||
return "authors.txt"
|
||||
|
||||
def get_version():
|
||||
return [0,2,"dev"]
|
||||
return "version.txt"
|
||||
|
||||
def create(target, module_name):
|
||||
my_module = module.Module(__file__, module_name, get_type())
|
||||
|
1
version.txt
Normal file
1
version.txt
Normal file
@ -0,0 +1 @@
|
||||
0.2-dev
|
Loading…
Reference in New Issue
Block a user