annotate dmutil.h @ 22:03b86b9c2f29

Add copyright blurbs and licenses.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 22 Nov 2019 05:29:02 +0200
parents 1404dfcee7b8
children 9909014498f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 //
22
03b86b9c2f29 Add copyright blurbs and licenses.
Matti Hamalainen <ccr@tnsp.org>
parents: 21
diff changeset
2 // GLDragon - OpenGL PLY model viewer / simple benchmark
03b86b9c2f29 Add copyright blurbs and licenses.
Matti Hamalainen <ccr@tnsp.org>
parents: 21
diff changeset
3 // -- Miscellaneous utility functions
03b86b9c2f29 Add copyright blurbs and licenses.
Matti Hamalainen <ccr@tnsp.org>
parents: 21
diff changeset
4 // Programmed and designed by Matti 'ccr' Hämäläinen <ccr@tnsp.org>
03b86b9c2f29 Add copyright blurbs and licenses.
Matti Hamalainen <ccr@tnsp.org>
parents: 21
diff changeset
5 // (C) Copyright 2019 Tecnic Software productions (TNSP)
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 //
22
03b86b9c2f29 Add copyright blurbs and licenses.
Matti Hamalainen <ccr@tnsp.org>
parents: 21
diff changeset
7 // See file "COPYING" for license information.
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 //
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #ifndef DMUTIL_H
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #define DMUTIL_H 1
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #include <string>
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 #include <vector>
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #include <cstdio>
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #include <iostream>
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
21
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
18 #define DMUTIL_WHITESPACE "\t\n\v\f\r "
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20
21
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
21 std::string dmStrLTrim(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE);
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
22 std::string dmStrRTrim(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE);
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
23 std::string dmStrTrim(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE);
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
21
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
25 std::vector<std::string> dmStrSplit(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE);
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 std::string dmStrJoin(const std::vector<std::string> &list, const std::string &delim);
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
21
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
28 std::string dmGetPath(const std::string &path);
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
29
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 bool dmReadText(const std::string &filename, std::string &buf, const int maxSize);
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 bool dmFileExists(const std::string &filename, std::ios_base::openmode mode = std::ios_base::in);
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #endif