BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_Ascii.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_CL_ASCII_HPP
13
#define BELFEM_CL_ASCII_HPP
14
15
16
17
#include "
typedefs.hpp
"
18
#include "
cl_Cell.hpp
"
19
#include "
filetools.hpp
"
20
21
namespace
belfem
22
{
23
//------------------------------------------------------------------------------
24
31
class
Ascii
32
{
33
//------------------------------------------------------------------------------
34
protected
:
35
//------------------------------------------------------------------------------
36
37
string
mPath
;
38
const
FileMode
mMode
;
39
Cell< string >
mBuffer
;
40
41
bool
mChangedSinceLastSave
=
false
;
42
43
//------------------------------------------------------------------------------
44
public
:
45
//------------------------------------------------------------------------------
46
47
Ascii
(
const
string
& aPath,
48
const
enum
FileMode
& aMode );
49
50
//------------------------------------------------------------------------------
51
52
virtual
~Ascii
();
53
54
//------------------------------------------------------------------------------
55
56
// save the buffer to the file
57
bool
58
save
();
59
60
//------------------------------------------------------------------------------
61
62
void
63
print
(
const
std::string & aLine );
64
65
//------------------------------------------------------------------------------
66
70
index_t
71
length
()
const
;
72
73
//------------------------------------------------------------------------------
74
75
string
&
76
line
(
const
index_t
aLineNumber );
77
78
//------------------------------------------------------------------------------
79
80
const
string
&
81
line
(
const
index_t
aLineNumber )
const
;
82
//------------------------------------------------------------------------------
83
private
:
84
//------------------------------------------------------------------------------
85
86
void
87
load_buffer(
const
bool
aParallelMode );
88
89
//------------------------------------------------------------------------------
90
};
91
92
//------------------------------------------------------------------------------
93
}
94
#endif
//BELFEM_CL_ASCII_HPP
cl_Cell.hpp
belfem::Ascii::mPath
string mPath
Definition
cl_Ascii.hpp:37
belfem::Ascii::mMode
const FileMode mMode
Definition
cl_Ascii.hpp:38
belfem::Ascii::length
index_t length() const
return the number of lines
Definition
cl_Ascii.cpp:111
belfem::Ascii::mChangedSinceLastSave
bool mChangedSinceLastSave
Definition
cl_Ascii.hpp:41
belfem::Ascii::save
bool save()
Definition
cl_Ascii.cpp:76
belfem::Ascii::mBuffer
Cell< string > mBuffer
Definition
cl_Ascii.hpp:39
belfem::Ascii::line
string & line(const index_t aLineNumber)
Definition
cl_Ascii.cpp:119
belfem::Ascii::print
void print(const std::string &aLine)
Definition
cl_Ascii.cpp:135
belfem::Ascii::Ascii
Ascii(const string &aPath, const enum FileMode &aMode)
Definition
cl_Ascii.cpp:25
belfem::Cell< string >
filetools.hpp
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::FileMode
FileMode
Definition
filetools.hpp:27
belfem::index_t
uint32_t index_t
Definition
typedefs.hpp:52
typedefs.hpp
src
io
cl_Ascii.hpp
Generated by
1.18.0