annotate dmutil.h @ 19:a329f0216491

Implement PLY file format parsing and extremely simplistic scene setup file format. Not finished yet.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 07 Nov 2019 20:15:33 +0200
parents
children 1404dfcee7b8
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 //
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 //
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 //
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #ifndef DMUTIL_H
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 #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
6
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #include <string>
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #include <vector>
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #include <cstdio>
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #include <iostream>
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
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 #define SET_WHITESPACE "\t\n\v\f\r "
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 std::string dmStrLTrim(const std::string& str, const std::string& delim = SET_WHITESPACE);
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 std::string dmStrRTrim(const std::string& str, const std::string& delim = SET_WHITESPACE);
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 std::string dmStrTrim(const std::string& str, const std::string& delim = SET_WHITESPACE);
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 std::vector<std::string> dmStrSplit(const std::string& str, const std::string& delim = SET_WHITESPACE);
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 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
22
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 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
24 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
25
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 #endif