Returns or sets the property value for the called declaration.
std::string declaration::value();1st Variety
void declaration::value(2nd Variety
const std::string& value
);
Parameters
value
The new value to set for the declaration.
Returns
In the first variety, returns a string which specifies the property
value of the called declaration.
Remarks
This operation is used to set or reveal the property value of the called declaration. The first variety of this operation returns a string value
representing the value of the declaration's property. The second variety of this operation allows you to set the property value of an existing
declaration.
Complexity
Constant
Example
#include "xhtml_doc.h"
#include "xport_brochure.h"
#include <iostream>
int main(int argc, char* argv[])
{
using namespace Xport;
document doc(root_doc);
stylesheet ss;
xport_brochure broch;
broch.create(doc, ss);
stylesheet_formatter fmtr(std::cout);
std::cout << "List all color declarations in Xport Brochure's stylesheet.\n\n";
stylesheet::const_iterator sit = ss.begin();
for (; sit != ss.end(); ++sit) {
if (sit->stylesheet_item_type() == sit_rule) {
stylesheet_item::const_iterator it = sit->begin();
for (; it != sit->end(); ++it) {
if (it->property() == css::color) {
std::cout << "Found color property in rule '" << sit->selector() << "'.\n";
std::cout << it->property_name() << ": " << it->value() << "\n\n";
}
}
}
}
std::cout << "\n\n";
}
Datasoft Solutions is proud to present their landmark product, Work Time Studio. Utilizing the tree container library, Work Time Studio provides
unparalleled features in personal time, project and task management
software. If you're looking for a way to increase your productivity,
visit Work Time Studio's product website, and start being more productive
today.