Go to the documentation of this file.
27 #include "utilities.h"
29 #if (defined __GNUC__)
30 #define BTL_ALWAYS_INLINE __attribute__((always_inline)) inline
32 #define BTL_ALWAYS_INLINE inline
35 #if (defined __GNUC__)
36 #define BTL_DONT_INLINE __attribute__((noinline))
38 #define BTL_DONT_INLINE
41 #if (defined __GNUC__)
42 #define BTL_ASM_COMMENT(X) asm("#" X)
44 #define BTL_ASM_COMMENT(X)
48 #include "xmmintrin.h"
50 #define BTL_DISABLE_SSE_EXCEPTIONS() { _mm_setcsr(_mm_getcsr() | 0x8040); }
52 #define BTL_DISABLE_SSE_EXCEPTIONS()
65 operator const char* ()
const {
return c_str(); }
69 int lspaces, rspaces,
len = length(),
i;
70 lspaces = rspaces = 0;
73 for (
i=0;
i<
len && (at(
i)==
' '||at(
i)==
'\t'||at(
i)==
'\r'||at(
i)==
'\n'); ++lspaces,++
i);
76 for(
i=
len-1;
i>=0 && (at(
i)==
' '||at(
i)==
'\t'||at(
i)==
'\r'||at(
i)==
'\n'); rspaces++,
i--);
78 *
this = substr(lspaces,
len-lspaces-rspaces);
83 std::vector<BtlString>
ret;
84 unsigned int numSplits = 0;
89 pos = find_first_of(delims, start);
96 ret.push_back( substr(start) );
99 ret.push_back( substr(start,
pos - start) );
104 }
while (
pos != npos);
112 return this->substr(this->
size()-str.size(),
str.size()) ==
str;
116 return this->find(
str)<this->
size();
122 return this->substr(0,
str.size()) ==
str;
152 std::vector<BtlString> elements = this->
split(
"/\\");
156 if (this->at(0)==
'/')
158 for (
unsigned int i=0 ;
i<elements.size() ; ++
i)
159 path += elements[
i] +
"/";
170 _config = getenv (
"BTL_CONFIG");
173 std::vector<BtlString> config =
BtlString(_config).
split(
" \t\n");
174 for (
unsigned int i = 0;
i<config.size();
i++)
176 if (config[
i].beginsWith(
"-a"))
178 if (
i+1==config.size())
180 std::cerr <<
"error processing option: " << config[
i] <<
"\n";
187 else if (config[
i].beginsWith(
"-t"))
189 if (
i+1==config.size())
191 std::cerr <<
"error processing option: " << config[
i] <<
"\n";
198 else if (config[
i].beginsWith(
"--overwrite"))
202 else if (config[
i].beginsWith(
"--nocheck"))
206 else if (config[
i].beginsWith(
"--real"))
240 BtlConfig BtlConfig::Instance
BtlString(const std::string &str)
BtlString(const char *str)
Annotation for function names.
BtlString toUpperCase(void)
bool contains(const BtlString &str) const
void trim(bool left=true, bool right=true)
BtlString(const BtlString &str)
bool beginsWith(const BtlString &str) const
bool isEquiv(const BtlString &str) const
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
std::vector< BtlString > split(const BtlString &delims="\t\n ") const
std::vector< BtlString > m_selectedActionNames
const char * c_str(Args &&...args)
size_t len(handle h)
Get the length of a Python object.
void decomposePathAndFile(BtlString &path, BtlString &filename) const
static const EIGEN_DEPRECATED end_t end
static BTL_DONT_INLINE bool skipAction(const std::string &_name)
#define BTL_DISABLE_SSE_EXCEPTIONS()
bool endsWith(const BtlString &str) const
static BtlConfig Instance
BtlString toLowerCase(void)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:01:56