29using std::dynamic_pointer_cast;
43 std::unique_ptr<priv> priv_;
69 std::unique_ptr<priv> priv_;
74 ABSTRACT_PROPERTY_VALUE = 0,
75 STRING_PROPERTY_VALUE = 1,
76 LIST_PROPERTY_VALUE = 2,
77 TUPLE_PROPERTY_VALUE = 3,
87 as_string()
const = 0;
89 operator const string& ()
const;
103 std::unique_ptr<priv> priv_;
112 virtual const string&
115 operator string()
const;
144 std::unique_ptr<priv> priv_;
150 const vector<string>&
156 virtual const string&
179 std::unique_ptr<priv> priv_;
184 const vector<property_value_sptr>&
187 vector<property_value_sptr>&
190 virtual const string&
193 operator string()
const;
213 std::unique_ptr<priv> priv_;
257 std::unique_ptr<priv> priv_;
289 std::unique_ptr<priv> priv_;
324 std::unique_ptr<priv> priv_;
339 config(
const string& path,
361 std::unique_ptr<priv> priv_;
413 std::ostream& output);
421 std::ostream& output);
436 std::unique_ptr<priv> priv_;
442 const vector<string>& args);
447 const vector<string>&
The abstraction of one section of the .ini config.
const string & get_name() const
Get the name of the section.
void set_properties(const properties_type &properties)
Set the properties of the section.
property_sptr find_property(const string &prop_name) const
Find a property that has a given name.
const properties_type & get_properties() const
Get the properties of the section.
virtual ~section()
Destructor of config::section.
void add_property(const property_sptr prop)
Add one property to this section.
The abstraction of the structured content of an .ini file. This roughly follows what is explained at ...
vector< property_sptr > properties_type
A convenience typedef for a vector of property_sptr.
shared_ptr< section > section_sptr
A convenience typedef for a shared pointer to a config::section.
void set_path(const string &path)
Set the path to the config file.
void set_sections(const sections_type §ions)
Set new sections to the ini config.
vector< section_sptr > sections_type
A convenience typedef for a vector of config::section_sptr.
const sections_type & get_sections() const
const string & get_path() const
The abstraction of a function call expression.
const vector< string > & get_arguments() const
Getter for the arguments of the function call expression.
const string & get_name() const
Getter of the name of the function being called.
Abstracts the value of a property representing a list of strings.
list_property_value()
Default constructor of the list_property_value type.
void set_content(const vector< string > &)
Setter of the content of the list_property_value.
virtual const string & as_string() const
Return a string representation of the @list_property_value.
const vector< string > & get_content() const
Getter of the content of the list_property_value.
A class representing a list property.
list_property()
Default constructor for list_property.
virtual ~list_property()
Destructor of the list_property type.
const list_property_value_sptr & get_value() const
Getter for the value of the list_property_value.
void set_value(const list_property_value_sptr &value)
Setter for the value of the list_property.
Base class of propertie values.
property_value()
Default constructor for the property_value type.
value_kind get_kind() const
Getter for the kind of the property_value type.
virtual ~property_value()
Destructor for the proprerty_value type.
The base class of the different kinds of properties of an INI file.
property()
Constructor of property.
virtual ~property()
Destructor of the property.
const string & get_name() const
Getter of the name of the property.
void set_name(const string &name)
Setter of the name of the property.
A simple property. That is, one which value is a string_property_value.
void set_value(const string_property_value_sptr &value)
Setter for the string value of the property.
bool has_empty_value() const
Test if the property has an empty value.
const string_property_value_sptr & get_value() const
Getter for the string value of the property.
virtual ~simple_property()
Destructor of the simple_property type.
simple_property()
Default constructor of the simple_property type.
A property value which is a string.
virtual ~string_property_value()
Destructor for the string_property_value.
void set_content(const string &)
Setter of the content of the string property value.
virtual const string & as_string() const
Convert the string property value into a string.
string_property_value()
Constructor of the string_property_value type.
A property value that is a tuple.
virtual ~tuple_property_value()
Destructor of the tuple_property_value type.
tuple_property_value(const vector< property_value_sptr > &)
Constructor for the tuple_property_value type.
const vector< property_value_sptr > & get_value_items() const
Getter for the content of the tuple_property_value instance.
virtual const string & as_string() const
Convert to the instance of tuple_property_value to a string.
Abstraction of a tuple property. A tuple property is a property which value is a tuple_property_value...
tuple_property()
Default constructor of the tuple_property type.
void set_value(const tuple_property_value_sptr value)
Setter for the tuple value of the property.
virtual ~tuple_property()
Destructor for the tuple_property type.
const tuple_property_value_sptr & get_value() const
Getter for the tuple value of the property.
shared_ptr< property_value > property_value_sptr
Convenience typedef for a shared_ptr to property_value.
shared_ptr< list_property_value > list_property_value_sptr
A convenience typedef for a shared_ptr to list_property_value.
bool read_function_call_expr(std::istream &input, function_call_expr_sptr &expr)
Read a function call expression and build its representation.
list_property * is_list_property(const property *p)
Test if an instance of a property is actually an instance of list_property.
bool write_config(const config &conf, std::ostream &output)
Serialize an instance of config to an output stream.
shared_ptr< property > property_sptr
Convenience typefef for shared_ptr to property.
shared_ptr< list_property > list_property_sptr
A convenience typedef for a shared_ptr to a list_property.
shared_ptr< config > config_sptr
A convenience typedef for a shared pointer to config.
list_property_value * is_list_property_value(const property_value *v)
Test if an instance of @property_value is a list_property_value.
bool read_config(istream &input, config &conf)
Parse an ini config file from an input stream.
bool read_sections(std::istream &input, config::sections_type §ions)
Parse the sections of an *.ini file.
shared_ptr< tuple_property > tuple_property_sptr
Convenience typedef for a shared_ptr of tuple_property.
shared_ptr< simple_property > simple_property_sptr
Convenience typedef for a shared_ptr to an simple_property.
shared_ptr< function_call_expr > function_call_expr_sptr
Convenience typedef for a shared pointer to function_call_expr.
shared_ptr< string_property_value > string_property_value_sptr
A convenience typedef for a shared_ptr to string_property_value.
string_property_value * is_string_property_value(const property_value *v)
Test if a given property value is a string property value.
tuple_property * is_tuple_property(const property *p)
Test if an instance of property is an instance of tuple_property.
shared_ptr< tuple_property_value > tuple_property_value_sptr
Convenience typedef for a shared_ptr to a tuple_property_value.
simple_property * is_simple_property(const property *p)
Tests if a property is a simple property.
tuple_property_value * is_tuple_property_value(const property_value *v)
Test if a given instance of property_value is an instance of tuple_property_value too.
bool write_sections(const config::sections_type §ions, std::ostream &out)
Serialize a vector of sections that make up an ini config file to an output stream.
Toplevel namespace for libabigail.