Namespaces | |
archive | |
color | |
tool | |
Classes | |
class | Archive |
class | ArchiveContent |
class | BaseNoise |
class | Color |
class | Fifo |
class | FSNode |
class | FSNodeRight |
class | Hash |
class | HashData |
class | Matrix |
class | Matrix2 |
class | Matrix4 |
class | Noise |
class | Plane |
class | Vector2D |
class | Vector3D |
class | Vector4D |
Functions | |
etk::Color< uint8_t, 4 > | parseStringStartWithSharp (const std::string &_input) |
etk::Color< uint8_t, 4 > | parseStringStartWithRGBGen (const std::string &_input) |
etk::Color< double, 4 > | parseStringStartWithRGB (const std::string &_input) |
etk::Color< uint32_t, 4 > | parseStringStartWithRGBUnsigned32 (const std::string &_input) |
etk::Color< uint16_t, 4 > | parseStringStartWithRGBUnsigned16 (const std::string &_input) |
etk::Color< uint8_t, 4 > | parseStringStartWithRGBUnsigned8 (const std::string &_input) |
etk::Color< uint8_t, 4 > | parseStringColorNamed (const std::string &_input) |
void | init (int _argc, const char **_argv) |
std::string | getApplicationName () |
void | clearLowerTriangle () |
Matrix2 | mat2Rotate (float _angleRad) |
Matrix2 | mat2Scale (const vec2 &_scale) |
Matrix2 | mat2Scale (float _scale) |
Matrix2 | mat2Translate (const vec2 &_translate) |
Matrix2 | mat2Skew (const vec2 &_skew) |
template<class T > | |
T | degreeToRadian (T _val) |
template<class T > | |
T | radianToDegree (T _val) |
Matrix4 | matFrustum (float _xmin, float _xmax, float _ymin, float _ymax, float _zNear, float _zFar) |
Matrix4 | matPerspective (float _foxy, float _aspect, float _zNear, float _zFar) |
Matrix4 | matOrtho (float _left, float _right, float _bottom, float _top, float _nearVal, float _farVal) |
Matrix4 | matTranslate (vec3 _translate) |
Matrix4 | matScale (vec3 _scale) |
Matrix4 | matRotate (vec3 _normal, float _angleRad=0.0) |
Matrix4 | matLookAt (const vec3 &_eye, const vec3 &_target, const vec3 &_up) |
void | setArgZero (const std::string &_val) |
std::string | simplifyPath (std::string _input) |
std::string | FSNodeGetApplicationName () |
void | setBaseFolderData (const char *_folder, const char *_applName=nullptr) |
void | setBaseFolderDataUser (const char *_folder) |
void | setBaseFolderCache (const char *_folder) |
void | initDefaultFolder (const char *_applName) |
std::string | getUserHomeFolder () |
std::string | getUserRunFolder () |
bool | FSNodeRemove (const std::string &_path) |
int64_t | FSNodeGetCount (const std::string &_path) |
bool | FSNodeCreate (const std::string &_path, etk::FSNodeRight _right, enum etk::typeNode _type=etk::typeNode_folder) |
bool | FSNodeExist (const std::string &_path) |
bool | FSNodeMove (const std::string &_path1, const std::string &_path2) |
etk::FSNodeRight | FSNodeGetRight (const std::string &_path) |
enum etk::typeNode | FSNodeGetType (const std::string &_path) |
uint64_t | FSNodeGetTimeCreated (const std::string &_path) |
uint64_t | FSNodeGetTimeModified (const std::string &_path) |
uint64_t | FSNodeGetTimeAccessed (const std::string &_path) |
bool | FSNodeTouch (const std::string &_path) |
bool | FSNodeEcho (const std::string &_path, const std::string &_dataTowrite) |
bool | FSNodeEchoAdd (const std::string &_path, const std::string &_dataTowrite) |
void | FSNodeHistory (const std::string &_path, int32_t _historyCount) |
std::string | FSNodeReadAllData (const std::string &_path) |
void | FSNodeWriteAllData (const std::string &_path, const std::string &_data) |
template<typename TTT > | |
std::vector< TTT > | FSNodeReadAllDataType (const std::string &_path) |
template<typename TTT > | |
void | FSNodeWriteAllDataType (const std::string &_path, const std::vector< TTT > &_data) |
std::string | FSNodeGetRealName (const std::string &_path) |
std::vector< std::string > | FSNodeExplodeMultiplePath (const std::string &_path) |
template<class TYPE > | |
std::string | to_string (const TYPE &_variable) |
template<class TYPE > | |
std::string | to_string (const std::vector< TYPE > &_list) |
template<class TYPE > | |
bool | from_string (TYPE &_variableRet, const std::string &_value) |
template<class TYPE > | |
const TYPE & | avg (const TYPE &_min, const TYPE &_val, const TYPE &_max) |
Detailed Description
basic namespace of the etk library. (it might contain all the etk fuctions/class/structures without macro)
Enumeration Type Documentation
§ FSNType
enum etk::FSNType |
Type of the file/folder/... accessible in the Node.
§ noiseType
enum etk::noiseType |
List of noise type supported.
- Todo:
- Remove this from ETK
Enumerator | |
---|---|
noiseType_base | basic random noise |
noiseType_smooth | Noise smoothed. |
noiseType_turbulence | Noise in turbulence mode. |
noiseType_turbulenceNoSmooth | Noise Turbulence with no smooth apply. |
noiseType_cloud | Noise like a cloud. |
noiseType_marble | Noise like marble. |
noiseType_wood | Noise like wood. |
§ seekNode
enum etk::seekNode |
§ typeNode
enum etk::typeNode |
List of Type that a node can have (this wrap some type that not exist on Windows)
Enumerator | |
---|---|
typeNode_unknow | Type of the node is not known. |
typeNode_block | The node is a block aceess device (Not availlable on Windows) |
typeNode_character | The node is a Char device type (Not availlable on Windows) |
typeNode_folder | The node is a folder. |
typeNode_fifo | The node is a Fifo (Not availlable on Windows) |
typeNode_link | The node is a Link. |
typeNode_file | The node is a File. |
typeNode_socket | The node is a socket. |
Function Documentation
§ avg()
const TYPE& etk::avg | ( | const TYPE & | _min, |
const TYPE & | _val, | ||
const TYPE & | _max | ||
) |
in std, we have min, max but not avg ==> it is missing... the Defineing avg template.
- Parameters
-
[in] _min Minimum value of the range [in] _val The value that we want a min/max [in] _max Maximum value of the range
- Returns
- Value that min/max applied
§ clearLowerTriangle()
void etk::clearLowerTriangle | ( | ) |
Clear the Lower triangle of the current Matrix.
x x x x x 0 x x x x 0 0 x x x 0 0 0 x x 0 0 0 0 x
§ degreeToRadian()
T etk::degreeToRadian | ( | T | _val | ) |
Convert degree in radian.
- Parameters
-
[in] _val Value to converted in degree
- Returns
- Angle in radian
§ from_string()
bool etk::from_string | ( | TYPE & | _variableRet, |
const std::string & | _value | ||
) |
Template to declare convertion from string to anything.
- Parameters
-
[out] _variableRet Output value [in] _value input property
- Returns
- true if the can be converted.
§ FSNodeCreate()
bool etk::FSNodeCreate | ( | const std::string & | _path, |
etk::FSNodeRight | _right, | ||
enum etk::typeNode | _type = etk::typeNode_folder |
||
) |
Simple access for : Create a file or a folder depending of the request.
- Parameters
-
[in] _path Folder/File/Pipe path of the node [in] _right Right of the creation [in] _type Type of the element that might be created
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeEcho()
bool etk::FSNodeEcho | ( | const std::string & | _path, |
const std::string & | _dataTowrite | ||
) |
Simple access for : Basic write on the node (like console echo)
- Parameters
-
[in] _path Folder/File/Pipe path of the node [in] _dataTowrite write data in the Node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeEchoAdd()
bool etk::FSNodeEchoAdd | ( | const std::string & | _path, |
const std::string & | _dataTowrite | ||
) |
Simple access for : Basic write on the node (like console echo) in adding mode (>>)
- Parameters
-
[in] _path Folder/File/Pipe path of the node [in] _dataTowrite write data in the Node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeExist()
bool etk::FSNodeExist | ( | const std::string & | _path | ) |
Simple access for : chexk the exestance of an element.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeExplodeMultiplePath()
std::vector<std::string> etk::FSNodeExplodeMultiplePath | ( | const std::string & | _path | ) |
Get all the Path contain in the specidy path:
- Parameters
-
[in] _path Generic path to parse ...
- Returns
- The list of path found // out contain: {"DATA:font", "{@ewol}DATA:font"}// out contain: {"{@ewol}DATA:font"}
§ FSNodeGetApplicationName()
std::string etk::FSNodeGetApplicationName | ( | ) |
Get application name.
- Returns
- The application name
§ FSNodeGetCount()
int64_t etk::FSNodeGetCount | ( | const std::string & | _path | ) |
Simple access for : count the number of element in a path (if it is not a path ==> return -1)
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- number of File inside
- -1 : An error occured
§ FSNodeGetRealName()
std::string etk::FSNodeGetRealName | ( | const std::string & | _path | ) |
get the system name of the current path
- Parameters
-
[in] _path "DATA:xxx" etk file name.
- Returns
- return real file name "/aaa/bbb/ccc/xxx"
§ FSNodeGetRight()
etk::FSNodeRight etk::FSNodeGetRight | ( | const std::string & | _path | ) |
Simple access for : Get right of the current Node.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeGetTimeAccessed()
uint64_t etk::FSNodeGetTimeAccessed | ( | const std::string & | _path | ) |
Simple access for : Getting Accessing time of the current node.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeGetTimeCreated()
uint64_t etk::FSNodeGetTimeCreated | ( | const std::string & | _path | ) |
Simple access for : Getting creation time of the current node.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeGetTimeModified()
uint64_t etk::FSNodeGetTimeModified | ( | const std::string & | _path | ) |
Simple access for : Getting Modification time of the current node.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeGetType()
enum etk::typeNode etk::FSNodeGetType | ( | const std::string & | _path | ) |
Simple access for : Get type of the current node.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeHistory()
void etk::FSNodeHistory | ( | const std::string & | _path, |
int32_t | _historyCount | ||
) |
move file to generate an history of the current file
- Parameters
-
[in] _path Folder/File/Pipe path of the node [in] _historyCount number of saved file in the history (-xxx)
§ FSNodeMove()
bool etk::FSNodeMove | ( | const std::string & | _path1, |
const std::string & | _path2 | ||
) |
Simple access for : chexk the exestance of an element.
- Parameters
-
[in] _path1 Folder/File/Pipe path of the node sources [in] _path2 Folder/File/Pipe path of the node destination
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeReadAllData()
std::string etk::FSNodeReadAllData | ( | const std::string & | _path | ) |
Read all the data from a file.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- all the data of the file in a string
§ FSNodeReadAllDataType()
std::vector<TTT> etk::FSNodeReadAllDataType | ( | const std::string & | _path | ) |
Read all the data from a file.
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- all the data of the file in a typed vector
§ FSNodeRemove()
bool etk::FSNodeRemove | ( | const std::string & | _path | ) |
Simple access for : Remove folder and subFolder, files pipes ...
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeTouch()
bool etk::FSNodeTouch | ( | const std::string & | _path | ) |
Simple access for : Update Modification time with the current time of the node (>)
- Parameters
-
[in] _path Folder/File/Pipe path of the node
- Returns
- true : Action done corectly
- false : An error occured
§ FSNodeWriteAllData()
void etk::FSNodeWriteAllData | ( | const std::string & | _path, |
const std::string & | _data | ||
) |
Write all the data in a file.
- Parameters
-
[in] _path Folder/File/Pipe path of the node [in] _data All the data of the file in a string
§ FSNodeWriteAllDataType()
void etk::FSNodeWriteAllDataType | ( | const std::string & | _path, |
const std::vector< TTT > & | _data | ||
) |
Write all the data in a file.
- Parameters
-
[in] _path Folder/File/Pipe path of the node [in] _data All the data of the file in a vector Typed bits ...
§ getApplicationName()
std::string etk::getApplicationName | ( | ) |
Get application name.
- Returns
- The application name
§ getUserHomeFolder()
std::string etk::getUserHomeFolder | ( | ) |
Get the home folder of the user.
- Returns
- the home folder : like : "/home/machin/"
§ getUserRunFolder()
std::string etk::getUserRunFolder | ( | ) |
Get the folder of the Program is running.
- Returns
- the basic folder name (ex : run ./appl in the pwd=/home/machin/sousFolder ==> this return the pwd folder)
§ init()
void etk::init | ( | int | _argc, |
const char ** | _argv | ||
) |
Initialize etk.
- Parameters
-
[in] _argc Number of argument list [in] _argv List of arguments
§ initDefaultFolder()
void etk::initDefaultFolder | ( | const char * | _applName | ) |
Initialyse all the subFolder usable by the user like DATA/HOME/CACHE/USERDATA.
- Parameters
-
[in] _applName the name of the application
§ mat2Rotate()
Matrix2 etk::mat2Rotate | ( | float | _angleRad | ) |
Create a matrix 2D with a simple rotation.
- Parameters
-
[in] _angleRad Radian angle to set at the matrix
- Returns
- New matrix of the transformation requested
§ mat2Scale() [1/2]
Create a matrix 2D with a simple scale.
- Parameters
-
[in] _scale 2 dimention scale
- Returns
- New matrix of the transformation requested
§ mat2Scale() [2/2]
Matrix2 etk::mat2Scale | ( | float | _scale | ) |
Create a matrix 2D with a simple scale.
- Parameters
-
[in] _scale same scale in 2 and Y
- Returns
- New matrix of the transformation requested
§ mat2Skew()
Create a matrix 2D with a simple skew.
- Parameters
-
[in] _skew 2 dimention skew
- Returns
- New matrix of the transformation requested
§ mat2Translate()
Create a matrix 2D with a simple translation.
- Parameters
-
[in] _translate 2 dimention translation
- Returns
- New matrix of the transformation requested
§ matFrustum()
Matrix4 etk::matFrustum | ( | float | _xmin, |
float | _xmax, | ||
float | _ymin, | ||
float | _ymax, | ||
float | _zNear, | ||
float | _zFar | ||
) |
Create projection matrix with the box parameter (camera view in -z axis)
- Parameters
-
[in] _xmin X minimum size of the frustum [in] _xmax X maximum size of the frustum [in] _ymin Y minimum size of the frustum [in] _ymax Y maximum size of the frustum [in] _zNear Z minimum size of the frustum [in] _zFar Z maximum size of the frustum
- Returns
- New matrix of the transformation requested
§ matLookAt()
Create projection matrix with camera property (camera view in -z axis)
- Parameters
-
[in] _eye Optical center of the camera [in] _target Point of where the camera is showing [in] _up Up vector of the camera
- Returns
- New matrix of the transformation requested
§ matOrtho()
Matrix4 etk::matOrtho | ( | float | _left, |
float | _right, | ||
float | _bottom, | ||
float | _top, | ||
float | _nearVal, | ||
float | _farVal | ||
) |
Create orthogonal projection matrix with the box parameter (camera view in -z axis)
- Parameters
-
[in] _left left size of the camera [in] _right Right size of the camera [in] _bottom Buttom size of the camera [in] _top Top Size of the camera [in] _nearVal Z near size of the camera [in] _farVal Z far size of the camera
- Returns
- New matrix of the transformation requested
§ matPerspective()
Matrix4 etk::matPerspective | ( | float | _foxy, |
float | _aspect, | ||
float | _zNear, | ||
float | _zFar | ||
) |
Create projection matrix with human repensentation view (camera view in -z axis)
- Parameters
-
[in] _foxy Focal in radian of the camera [in] _aspect aspect ratio of the camera [in] _zNear Z near size of the camera [in] _zFar Z far size of the camera
- Returns
- New matrix of the transformation requested
§ matRotate()
Create a matrix 3D with a simple rotation.
- Parameters
-
[in] _normal vector aroud witch apply the rotation [in] _angleRad Radian angle to set at the matrix
- Returns
- New matrix of the transformation requested
§ matScale()
Create a matrix 3D with a simple scale.
- Parameters
-
[in] _scale 3 dimention scale
- Returns
- New matrix of the transformation requested
§ matTranslate()
Create a matrix 3D with a simple translation.
- Parameters
-
[in] _translate 3 dimention translation
- Returns
- New matrix of the transformation requested
§ parseStringColorNamed()
etk::Color<uint8_t, 4> etk::parseStringColorNamed | ( | const std::string & | _input | ) |
Get a color value started with a "named" converted in uint8 like red, geen ...
- Parameters
-
[in] _input String to parse
- Returns
- Value parsed
§ parseStringStartWithRGB()
etk::Color<double, 4> etk::parseStringStartWithRGB | ( | const std::string & | _input | ) |
Get a color value started with a "rgb()" keep in double.
- Parameters
-
[in] _input String to parse
- Returns
- Value parsed
§ parseStringStartWithRGBGen()
etk::Color<uint8_t, 4> etk::parseStringStartWithRGBGen | ( | const std::string & | _input | ) |
Get a color value started with a "rgb()" converted in uint8.
- Parameters
-
[in] _input String to parse
- Returns
- Value parsed
§ parseStringStartWithRGBUnsigned16()
etk::Color<uint16_t, 4> etk::parseStringStartWithRGBUnsigned16 | ( | const std::string & | _input | ) |
Get a color value started with a "rgb()" converted in uint16.
- Parameters
-
[in] _input String to parse
- Returns
- Value parsed
§ parseStringStartWithRGBUnsigned32()
etk::Color<uint32_t, 4> etk::parseStringStartWithRGBUnsigned32 | ( | const std::string & | _input | ) |
Get a color value started with a "rgb()" converted in uint32.
- Parameters
-
[in] _input String to parse
- Returns
- Value parsed
§ parseStringStartWithRGBUnsigned8()
etk::Color<uint8_t, 4> etk::parseStringStartWithRGBUnsigned8 | ( | const std::string & | _input | ) |
Get a color value started with a "rgb()" converted in uint6.
- Parameters
-
[in] _input String to parse
- Returns
- Value parsed
§ parseStringStartWithSharp()
etk::Color<uint8_t, 4> etk::parseStringStartWithSharp | ( | const std::string & | _input | ) |
Get a color value started with a "#".
- Parameters
-
[in] _input String to parse
- Returns
- Value parsed
§ radianToDegree()
T etk::radianToDegree | ( | T | _val | ) |
Convert radian in degree.
- Parameters
-
[in] _val Value to converted in radian
- Returns
- Angle in degree
§ setArgZero()
void etk::setArgZero | ( | const std::string & | _val | ) |
Set the firt argument of the application start (this permit to get the real position of the execution path and executable position.
- Parameters
-
[in] _val First parameter.
§ setBaseFolderCache()
void etk::setBaseFolderCache | ( | const char * | _folder | ) |
Set the Cach folder for the application (like /tmp)
- Parameters
-
[in] _folder folder path of the cathegorie
§ setBaseFolderData()
void etk::setBaseFolderData | ( | const char * | _folder, |
const char * | _applName = nullptr |
||
) |
Set manualy the folder of the Data.(like /usr/shared/applName/ for linux)
- Parameters
-
[in] _folder folder path of the cathegorie [in] _applName Base name of the application
§ setBaseFolderDataUser()
void etk::setBaseFolderDataUser | ( | const char * | _folder | ) |
Set the user data folder (like /home/machin/.local/applName/ for linux)
- Parameters
-
[in] _folder folder path of the cathegorie
§ simplifyPath()
std::string etk::simplifyPath | ( | std::string | _input | ) |
Simplify a path with all the complication that mean ".." or "///\//".
- Parameters
-
[in] _input Parth to simplify
- Returns
- the simplified path.
§ to_string() [1/2]
std::string etk::to_string | ( | const TYPE & | _variable | ) |
Template to declare convertion from anything in std::string.
- Parameters
-
[in] _variable Variable to convert
- Returns
- String of the value
§ to_string() [2/2]
std::string etk::to_string | ( | const std::vector< TYPE > & | _list | ) |
Template to declare convertion from std::vector<anything> in std::string.
- Parameters
-
[in] _list Variable to convert
- Returns
- String of the value: {...,...,...}