The complete source code of IdealIRC
http://www.idealirc.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
778 B
35 lines
778 B
/*
|
|
* IdealIRC Script Engine - Scripting tailored for IRC clients.
|
|
* Copyright (C) 2021 Tom-Andre Barstad.
|
|
* This software is licensed under the Software Attribution License.
|
|
* See LICENSE for more information.
|
|
*/
|
|
|
|
#ifndef VALUEEXTRACT_H
|
|
#define VALUEEXTRACT_H
|
|
|
|
#include "ValueHolder.h"
|
|
#include <string>
|
|
|
|
class ValueExtract
|
|
{
|
|
public:
|
|
explicit ValueExtract(ValueHolder& val);
|
|
ValueExtract(const ValueExtract&) = delete;
|
|
ValueExtract(ValueExtract&&) = delete;
|
|
~ValueExtract() = default;
|
|
|
|
ValueExtract& operator=(ValueExtract&) = delete;
|
|
|
|
bool isVoid() const;
|
|
int toInt() const;
|
|
double toReal() const;
|
|
bool toBool() const;
|
|
std::string& toString();
|
|
ValueArray& toMap();
|
|
|
|
private:
|
|
ValueHolder& value;
|
|
};
|
|
|
|
#endif // VALUEEXTRACT_H
|
|
|