}
void Variable::setValue(const char* value)
-throw(RuntimeException) {
+noexcept(false) {
verifyMatchType(Type::String, ANNA_FILE_LOCATION);
a_isNull = false;
*a_value.a_string = value;
}
void Variable::setValue(const int value)
-throw(RuntimeException) {
+noexcept(false) {
verifyMatchType(Type::Integer, ANNA_FILE_LOCATION);
a_isNull = false;
*a_value.a_integer = value;
}
void Variable::setValue(const S64 value)
-throw(RuntimeException) {
+noexcept(false) {
verifyMatchType(Type::Integer64, ANNA_FILE_LOCATION);
a_isNull = false;
*a_value.a_longInteger = value;
}
void Variable::setValue(const bool value)
-throw(RuntimeException) {
+noexcept(false) {
verifyMatchType(Type::Boolean, ANNA_FILE_LOCATION);
a_isNull = false;
*a_value.a_boolean = value;
}
void Variable::setValue(const DataBlock& value)
-throw(RuntimeException) {
+noexcept(false) {
verifyMatchType(Type::Block, ANNA_FILE_LOCATION);
if(a_value.a_dataBlock->deepCopy() == false) {
}
void Variable::setValue(const float value)
-throw(RuntimeException) {
+noexcept(false) {
verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
if(a_type == Type::Float) {
}
void Variable::setValue(const double value)
-throw(RuntimeException) {
+noexcept(false) {
verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
if(a_type == Type::Float) {
}
const char* Variable::getStringValue() const
-throw(RuntimeException) {
+noexcept(false) {
verifyIsNotNull(ANNA_FILE_LOCATION);
verifyMatchType(Type::String, ANNA_FILE_LOCATION);
return a_value.a_string->c_str();
}
int Variable::getIntegerValue() const
-throw(RuntimeException) {
+noexcept(false) {
verifyIsNotNull(ANNA_FILE_LOCATION);
verifyMatchType(Type::Integer, ANNA_FILE_LOCATION);
return *a_value.a_integer;
}
S64 Variable::getInteger64Value() const
-throw(RuntimeException) {
+noexcept(false) {
int result(0);
verifyIsNotNull(ANNA_FILE_LOCATION);
verifyMatchSomeType(Type::Integer, Type::Integer64, ANNA_FILE_LOCATION);
}
bool Variable::getBooleanValue() const
-throw(RuntimeException) {
+noexcept(false) {
verifyIsNotNull(ANNA_FILE_LOCATION);
verifyMatchType(Type::Boolean, ANNA_FILE_LOCATION);
return *a_value.a_boolean;
}
const DataBlock& Variable::getDataBlockValue() const
-throw(RuntimeException) {
+noexcept(false) {
verifyIsNotNull(ANNA_FILE_LOCATION);
verifyMatchType(Type::Block, ANNA_FILE_LOCATION);
return *a_value.a_dataBlock;
}
float Variable::getFloatValue() const
-throw(RuntimeException) {
+noexcept(false) {
float result(0.0);
verifyIsNotNull(ANNA_FILE_LOCATION);
verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
}
double Variable::getDoubleValue() const
-throw(RuntimeException) {
+noexcept(false) {
double result(0.0);
verifyIsNotNull(ANNA_FILE_LOCATION);
verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
}
String Variable::asString() const
-throw() {
+{
String result("anna::Variable { Name: ");
result << a_name;
result << " | Type: " << Type::asNotNullCString(a_type);
}
void* Variable::buffer() const
-throw() {
+{
void* result(NULL);
switch(a_type) {
}
void* Variable::getReference() const
-throw() {
+{
void* result(NULL);
switch(a_type) {
}
void Variable::verifyMatchType(const Type::_v type, const char* file, const int lineno) const
-throw(RuntimeException) {
+noexcept(false) {
if(a_type != type) {
String msg("Variable: ");
msg << a_name << " | " << Type::asNotNullCString(type) << " mismatch data type";
}
void Variable::verifyMatchSomeType(const Type::_v firstType, const Type::_v secondType, const char* file, const int lineno) const
-throw(RuntimeException) {
+noexcept(false) {
if(a_type != firstType && a_type != secondType) {
String msg("Variable: ");
msg << a_name << " | Neihter " << Type::asNotNullCString(firstType);
}
void Variable::verifyIsNotNull(const char* file, const int lineno) const
-throw(RuntimeException) {
+noexcept(false) {
if(a_isNull == true) {
String msg("Variable: ");
msg << a_name << " | Variable does not have assigned value";