feisty meow concerns codebase 2.140
unhandled_request.h
Go to the documentation of this file.
1#ifndef UNHANDLED_REQUEST_CLASS
2#define UNHANDLED_REQUEST_CLASS
3
4/*****************************************************************************\
5* *
6* Name : unhandled_request *
7* Author : Chris Koeritz *
8* *
9*******************************************************************************
10* Copyright (c) 2004-$now By Author. This program is free software; you can *
11* redistribute it and/or modify it under the terms of the GNU General Public *
12* License as published by the Free Software Foundation; either version 2 of *
13* the License or (at your option) any later version. This is online at: *
14* http://www.fsf.org/copyleft/gpl.html *
15* Please send any updates to: fred@gruntose.com *
16\*****************************************************************************/
17
18#include "entity_defs.h"
19#include "infoton.h"
20#include "tentacle_helper.h"
21
23
24namespace octopi {
25
26// forward.
27class octopus_request_id;
28
30
40{
41public:
42 // these members are informational so they're exposed out in public.
46
48 const structures::string_array &original_classifier = structures::string_array(),
49 const basis::outcome &reason = basis::common::NO_HANDLER);
50
51 DEFINE_CLASS_NAME("unhandled_request");
52
55
59 virtual void text_form(basis::base_string &fill) const;
60 virtual void pack(basis::byte_array &packed_form) const;
61 virtual bool unpack(basis::byte_array &packed_form);
62 virtual clonable *clone() const;
63 virtual int packed_size() const;
64};
65
67
69: public tentacle_helper<unhandled_request>
70{
71public:
72 unhandled_request_tentacle(bool backgrounded = false)
74 backgrounded) {}
75};
76
77} //namespace.
78
79#endif
80
Defines the base class for all string processing objects in hoople.
Definition base_string.h:28
A very common template for a dynamic array of bytes.
Definition byte_array.h:36
Outcomes describe the state of completion for an operation.
Definition outcome.h:31
An infoton is an individual request parcel with accompanying information.
Definition infoton.h:32
virtual basis::astring text_form() const
local version just makes text_form() more functional.
Definition infoton.h:108
Identifies requests made on an octopus by users.
provides prefab implementations for parts of the tentacle object.
unhandled_request_tentacle(bool backgrounded=false)
Informs the caller that a request type was unknown to the server octopus.
virtual int packed_size() const
reports how large the infoton will be when packed.
octopus_request_id _original_id
the failed request's identifier.
virtual clonable * clone() const
must be provided to allow creation of a copy of this object.
static structures::string_array the_classifier()
the classifier for unknown infotons makes unhandled requests unique.
DEFINE_CLASS_NAME("unhandled_request")
virtual void pack(basis::byte_array &packed_form) const
stuffs the data in the infoton into the "packed_form".
virtual bool unpack(basis::byte_array &packed_form)
restores an infoton from a packed form.
basis::outcome _reason
the reason why this request was provided.
structures::string_array _original_classifier
the original name of the request.
An array of strings with some additional helpful methods.
Automates some common tasks for tentacle implementations. This template provides some default impleme...