C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
vector_access_rtc Struct Referencefinal
Inheritance diagram for vector_access_rtc:
[legend]
Collaboration diagram for vector_access_rtc:
[legend]

Public Types

typedef std::map< void *, std::string > map_t
 

Public Member Functions

bool handle_runtime_violation (violation_context &) override
 
bool handle_runtime_violation (violation_context &) override
 
bool handle_runtime_violation (violation_context &context)
 
- Public Member Functions inherited from exprtk::vector_access_runtime_check
virtual ~vector_access_runtime_check ()
 

Public Attributes

map_t vector_map
 

Detailed Description

Definition at line 75 of file exprtk_loop_timeout_rtc.cpp.

Member Typedef Documentation

◆ map_t

typedef std::map<void*, std::string> vector_access_rtc::map_t

Definition at line 30 of file exprtk_simple_example_20.cpp.

Member Function Documentation

◆ handle_runtime_violation() [1/3]

bool vector_access_rtc::handle_runtime_violation ( violation_context )
inlineoverridevirtual

Reimplemented from exprtk::vector_access_runtime_check.

Definition at line 77 of file exprtk_loop_timeout_rtc.cpp.

78 {
79 throw std::runtime_error("Runtime vector access violation.");
80 return false;
81 }

◆ handle_runtime_violation() [2/3]

bool vector_access_rtc::handle_runtime_violation ( violation_context )
inlineoverridevirtual

Reimplemented from exprtk::vector_access_runtime_check.

Definition at line 28 of file exprtk_rtc_overhead.cpp.

29 {
30 throw std::runtime_error("Runtime vector access violation.");
31 return false;
32 }

◆ handle_runtime_violation() [3/3]

bool vector_access_rtc::handle_runtime_violation ( violation_context context)
inlinevirtual

Reimplemented from exprtk::vector_access_runtime_check.

Definition at line 33 of file exprtk_simple_example_20.cpp.

34 {
35 const map_t::iterator itr = vector_map.find(static_cast<void*>(context.base_ptr));
36 std::string vector_name = (itr != vector_map.end()) ?
37 itr->second : "Unknown" ;
38
39 printf("Runtime vector access violation\n"
40 "Vector: %s base: %p end: %p access: %p typesize: %d\n",
41 vector_name.c_str(),
42 context.base_ptr ,
43 context.end_ptr ,
44 context.access_ptr ,
45 static_cast<unsigned int>(context.type_size));
46
47 throw std::runtime_error
48 ("Runtime vector access violation. Vector: " + vector_name);
49
50 return false;
51 }

References exprtk::vector_access_runtime_check::violation_context::access_ptr, exprtk::vector_access_runtime_check::violation_context::base_ptr, exprtk::vector_access_runtime_check::violation_context::end_ptr, exprtk::vector_access_runtime_check::violation_context::type_size, and vector_map.

Member Data Documentation

◆ vector_map

map_t vector_access_rtc::vector_map

The documentation for this struct was generated from the following files: