Skip to content
Snippets Groups Projects

aql: basic tab-completion using readline

Merged Tomáš Pecka requested to merge readline into master
Files
4
@@ -55,6 +55,16 @@ public:
@@ -55,6 +55,16 @@ public:
throw exception::CommonException ( "Binded value of name " + name + " not found." );
throw exception::CommonException ( "Binded value of name " + name + " not found." );
}
}
 
const std::set < std::string > getBindingNames ( ) const {
 
std::set < std::string > res;
 
 
for ( const std::pair < const std::string, std::string > & kv : m_bindings ) {
 
res.insert ( kv.first );
 
}
 
 
return res;
 
}
 
void setBinding ( std::string name, std::string value ) {
void setBinding ( std::string name, std::string value ) {
m_bindings [ std::move ( name ) ] = std::move ( value );
m_bindings [ std::move ( name ) ] = std::move ( value );
}
}
@@ -75,6 +85,16 @@ public:
@@ -75,6 +85,16 @@ public:
return ptr->getConstValueReference ( );
return ptr->getConstValueReference ( );
}
}
 
const std::set < std::string > getVariableNames ( ) const {
 
std::set < std::string > res;
 
 
for ( const std::pair < const std::string, std::shared_ptr < abstraction::OperationAbstraction > > & kv : m_variables ) {
 
res.insert ( kv.first );
 
}
 
 
return res;
 
}
 
void setVariable ( std::string name, std::shared_ptr < abstraction::OperationAbstraction > value ) {
void setVariable ( std::string name, std::shared_ptr < abstraction::OperationAbstraction > value ) {
setVariableInt ( std::move ( name ), std::move ( value ) );
setVariableInt ( std::move ( name ), std::move ( value ) );
}
}
Loading