18#ifndef _DECAF_UTIL_PROPERTIES_H_
19#define _DECAF_UTIL_PROPERTIES_H_
39 class PropertiesInternal;
56 PropertiesInternal* internal;
118 std::string
getProperty(
const std::string& name,
const std::string& defaultValue)
const;
131 std::string
setProperty(
const std::string& name,
const std::string& value);
151 std::string
remove(
const std::string& name);
169 std::vector<std::pair<std::string, std::string> >
toArray()
const;
Base interface for any class that wants to represent an output stream of bytes.
Definition OutputStream.h:39
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
bool equals(const Properties &source) const
Test whether two Properties objects are equivalent.
void store(decaf::io::Writer *writer, const std::string &comments)
Writes this property list (key and element pairs) in this Properties table to the output character st...
Properties * clone() const
Clones this object.
bool hasProperty(const std::string &name) const
Check to see if the Property exists in the set.
const char * getProperty(const std::string &name) const
Looks up the value for the given property.
bool isEmpty() const
Returns true if the properties object is empty.
std::string setProperty(const std::string &name, const std::string &value)
Sets the value for a given property.
void clear()
Clears all properties from the map.
decaf::lang::Pointer< Properties > defaults
Default list used to answer for any keys not found in the properties list, can be filled in by anothe...
Definition Properties.h:64
Properties(const Properties &src)
std::string getProperty(const std::string &name, const std::string &defaultValue) const
Looks up the value for the given property.
std::string toString() const
Formats the contents of the Properties Object into a string that can be logged, etc.
std::vector< std::string > propertyNames() const
Returns an enumeration of all the keys in this property list, including distinct keys in the default ...
void copy(const Properties &source)
Copies the contents of the given properties object to this one, if the given Properties instance in e...
void load(decaf::io::InputStream *stream)
Reads a property list (key and element pairs) from the input byte stream.
std::vector< std::pair< std::string, std::string > > toArray() const
Method that serializes the contents of the property map to an array.
void store(decaf::io::OutputStream *out, const std::string &comment)
Writes this property list (key and element pairs) in this Properties table to the output stream in a ...
void load(decaf::io::Reader *reader)
Reads a property list (key and element pairs) from the input character stream in a simple line-orient...
Properties & operator=(const Properties &src)
Assignment Operator.
std::string remove(const std::string &name)
Removes the property with the given name.
Map template that wraps around a std::map to provide a more user-friendly interface and to provide co...
Definition StlMap.h:48
#define DECAF_API
Definition Config.h:29
Definition BlockingByteArrayInputStream.h:25
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25