1#include "image_reader.h"
2#include <cgv/base/register.h>
55 static std::vector<base_ptr>& ref_readers()
57 static std::vector<base_ptr>
readers;
65 ref_readers().push_back(
object);
69 for (
unsigned int i=0;
i<ref_readers().size(); ++
i) {
70 if (
object == ref_readers()[
i]) {
71 ref_readers().erase(ref_readers().begin()+
i);
87 static std::string
exts;
89 std::vector<base_ptr>&
readers = reader_listener::ref_readers();
90 for (
unsigned int i=0;
i<
readers.size(); ++
i) {
103 std::string text =
"Image Files (";
104 std::string
exts =
"*.";
145 std::string::size_type pos = file_name.find_last_of(
'.');
146 if (pos == std::string::npos)
148 std::string
ext =
to_lower(file_name.substr(pos+1));
149 std::vector<base_ptr>&
readers = reader_listener::ref_readers();
151 for (
unsigned int i=0;
i<
readers.size(); ++
i) {
162 last_error =
"could not find a suitable reader for " + file_name +
" (supported formats are " +
308 return "cmi::image_reader";
base class for all classes that can be registered with support for dynamic properties (see also secti...
virtual std::string get_property_declarations()
return a semicolon separated list of property declarations
virtual bool set_void(const std::string &property, const std::string &value_type, const void *value_ptr)
abstract interface for the setter of a dynamic property.
virtual std::string get_type_name() const
overload to return the type name of this object. By default the type interface is queried over get_ty...
virtual bool get_void(const std::string &property, const std::string &value_type, void *value_ptr)
abstract interface for the getter of a dynamic property.
complete implementation of method actions that only call one method when entering a node
bool empty() const
return whether the data pointer is a null pointer
the data view gives access to a data array of one, two, three or four dimensions.
void set_ptr(unsigned char *ptr, bool manage_ptr)
set a different data pointer that will be deleted with the delete [] operator of type (unsigned char*...
the base namespace holds the base hierarchy, support for plugin registration and signals
namespace for data management components
namespace that holds tools that dont fit any other namespace
unsigned int replace(std::string &s, char c1, char c2)
replace char c1 with c2 in the given string _s and return number of replacements
char to_lower(char c)
convert char to lower case
bool is_element(char c, const std::string &s)
check if char c arises in string s
Helper functions to process strings.
interfaces that allows to listen to registration events.
interfaces that add provides very basic functionality.