4/10/2013

Plan for a new MacBookPro: Writing specification

When we have a plan to purchase something, our administrators require us to write a specification to open for a bidding. I can not, however, just write "I want a MacBook Pro quad-core Intel Core i7, 2.8 GHz model." They don't accept names of commercial products and I can not use words like "Mac" nor "Intel". They accept only descriptions of characteristics which I need for my purpose. So, only "quad-core" and "2.8 GHz" are accepted in the sentence above. This is something like

namespace admin{

class Specification{

     public:
        Specification & cpu_arch(std::string const& arg);
        Specification & cpu_speed(double const& arg);
        Specification & memory_size(double const& arg);
        Specification & memory_speed(double const& arg);
        Specification & storage_size(double const& arg);
       ........
};

} // admin namespace

to use it as

using namespace admin;

Specification I_want_a_MacBookPro(
          Specification.cpu_arch(X86-64)
                            .cpu_speed(2.8)
                            .memory_size(16)
                            .memory_speed(1.6)
                            .storage_size(512));


No comments:

Post a Comment